FIELDS Methods

Some of the FIELDS methods were already encountered in previous chapters; Here's the complete list of the FIELDS methods:

Method Name Description Default Contents Example Usage
FIELDS The list of fields from a table to be queried. <%method FIELDS>
<&SELF:INFO,
WHAT => 'NAME_NOPK'&></%method>
See the CONFIGURING CHILD .MQL example.
FIELDS_NOT_NULL When one or more of fields listed in FIELDS_NOT_NULL is empty the row will not to be displayed. Empty. See the NULLS AND AGGREGATE EXPRESSIONS example.
FIELDS_DESCR Labels for the fields. <%method FIELDS_DESCR>
<&SELF:FIELDS&></%method>
<%method FIELDS_DESCR>
Price, Commission ID, Employee ID</%method>
FIELDS_RO Marks fields as Read-Only in the GUI and in the database. Empty. <%method FIELDS_RO>*</%method>
<%method FIELDS_RO>
owner, modification_time, transmission_time</%method>
FIELDS_RO_UPDATE Marks fields as Read-Only in the GUI but they are still writable in the database. The method is useful for processing a values that can not be modified directly by an user. <%method FIELDS_RO_UPDATE>
<&SELF:FIELDS_RO&></%method>

By default the same list as FIELDS_RO method.
<%method FIELDS_RO_UPDATE>
bread</%method>
FIELDS_NO_WRITE An user can supply values in the GUI but can not save them directly to the database. The method is useful for giving an user possibility to supply values which are then processed by the back-end. In practice it may be the value of a SQL view which is processed by the server and does not necessarily correspond to a value to be saved in the database. <%method FIELDS_NO_WRITE>
<&SELF:FIELDS_RO&></%method>

By default the same list as FIELDS_RO method.
<%method FIELDS_NO_WRITE>
flower, salt, yeast, water</%method>
FIELDS_NEW Defines a default new values when user clicks on the Nuovi button.
New default values are separated by comma in the order of method FIELDS.
Empty. <%method FIELDS_NEW>,,,</%method>
defines three new empty fields.
FIELDS_DUP Configures the Duplica button. When pressed the button adds a new record populated with the duplicate values from previous record. The button duplicates the current record (FORM) or the selected record if type is TABLE or DIVS. A comma separated list defines which fields to duplicate. The duplicated field must be marked with a letters d or D. A field marked with upper case letter D is always copied. A field marked with lower case letter d is copied only if not empty. The fields that are not duplicated will be empty or set to default values defined in the FIELDS_NEW method. When the method is empty the Duplica button is not shown. <%method FIELDS_DUP>
d,d,d,,d,,,,d</%method>
FIELDS_HIDDEN A list of hidden fields; See also the HIDDEN parameter of the INFO method. Empty. <%method FIELDS_HIDDEN>
table_name, id_record</%method>
Topic revision: r8 - 22 Apr 2018, GuidoBrugnara
This site is powered by FoswikiCopyright (©) Leader.IT - Italy P.I. IT01434390223 Privacy policy & use of cookies