This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
niota-docs:niota_formatting [2024/02/21 10:25] admin |
niota-docs:niota_formatting [2025/12/14 14:24] (current) admin |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| To enable grid formats and grid end user experience to your needs there is the database (based) grid edit format feature. Format of UI/grid edit pages is done on several levels and with different base objects. | To enable grid formats and grid end user experience to your needs there is the database (based) grid edit format feature. Format of UI/grid edit pages is done on several levels and with different base objects. | ||
| + | |||
| + | ==== format column collection ==== | ||
| + | A column collection is the most generic and fastest way to set user friendly formatting for table. Most of the settings from a column collection are applied dynamically on all columns with the same name of all tables where the value of "collection ID" matches between the table and and the collection entry. | ||
| + | |||
| + | {{:niota-docs:pasted:20251214-135356.png}} | ||
| + | |||
| + | ** Collection **\\ | ||
| + | ID of an collection to which this column definition is assigned. The setting is only applied if the value on table level for collection matches this value on column level. | ||
| + | By this you can have the same column name in different tables with a totally different meaning. | ||
| + | E.g. in a table that belongs to your financing system the column "workshop" means a company that repairs car. It's a local synonym for "repairshop". | ||
| + | |||
| + | But in your HR system then column "workshop" has the meaning of a meeting where you work together. If you put "workshop" in two different collections you can then assign to different descriptions to it. | ||
| + | |||
| + | On table level the collection is assigned here. | ||
| + | {{:niota-docs:pasted:20251214-140023.png}} | ||
| + | |||
| + | The default value for collection can be set in the system_defaults configuration file.\\ | ||
| + | |||
| + | -> define('CUSTOM_APPLICATION_CODE_DEFAULT', 'CUST'); | ||
| + | |||
| + | ** Columnname ** \\ | ||
| + | Physical name of the column on which this setting are applied. | ||
| + | |||
| + | ** activate **\\ | ||
| + | Active/inactive flag | ||
| + | |||
| + | ** Defaultvalue of column **\\ | ||
| + | |||
| + | ** Title of Column **\\ | ||
| + | Title of column in grid mode/form mode. In case also a semantic domain is assigned to this column, then the title is concatenated as domain title + column title. | ||
| + | |||
| + | ** Heading of Column **\\ | ||
| + | Text that is used for mouse over info. | ||
| + | |||
| + | ** Description Column **\\ | ||
| + | |||
| + | ** on/off read only **\\ | ||
| + | Flag to toggle read only property for columns with this name. Can be overwritten on level of the specific column of a table. | ||
| + | |||
| + | ** on/off hidden **\\ | ||
| + | Flag to toggle hidden property for columns with this name. Hidden means it's not visible in grid display format. Can be overwritten on level of the specific column of a table. | ||
| + | |||
| + | ** on/off hidden editable **\\ | ||
| + | Flag to toggle hidden editable property for columns with this name. If editable hidden is on, then hidden grid columns are visible in the edit form. Can be overwritten on level of the specific column of a table. | ||
| + | |||
| + | ** Domain ID Physical **\\ | ||
| + | Assign a physical domain to this column. | ||
| + | |||
| + | ** Domain ID Logical **\\ | ||
| + | Assign a logical domain to this column. | ||
| + | |||
| + | ** Domain ID Semantic **\\ | ||
| + | Assign a semantic domain to this column. | ||
| + | |||
| + | ** Lookup for Column **\\ | ||
| + | Assign a lookup definition to this column. This value is later ** copied ** to the column property setting of the table where a column with this name exists. This setting is not applied dynamically. | ||
| + | |||
| + | ** Constraint for Column **\\ | ||
| + | Assign a constraint definition to this column. This value is later ** copied ** to the column property setting of the table where a column with this name exists. This setting is not applied dynamically. | ||
| + | |||
| + | ** Security Token to apply **\\ | ||
| + | Assign a security token to this column. This value is later ** copied ** to the column property setting of the table where a column with this name exists. This setting is not applied dynamically. | ||
| + | |||
| + | ** RegEx to match **/**Regex not to match**\\ | ||
| + | The setting is only copied to columns where the column name matches the ''to match'' regular expression and not matches an optional regular expression in the ''not to match'' column. | ||
| + | By this you can define patterns where you want to apply the same column settings. E.g. you could here apply column setting for column ''Customer'' to all columns that begin with ''custom'' but not to column ''customize''. | ||
| + | |||
| ==== format object - logical domain ==== | ==== format object - logical domain ==== | ||
| Line 38: | Line 105: | ||
| * NF_FRACTION_MIN - minimum displayed decimal digits. Default is **0**. | * NF_FRACTION_MIN - minimum displayed decimal digits. Default is **0**. | ||
| * NF_FRACTION_MAX - maximum displayed decimal digits. Default and maximum value is **20**. Take care! If value of NF_FRACTION_MAX is lower then the decimal digits of the displayed number system makes rounding which can affect entered or existing data! | * NF_FRACTION_MAX - maximum displayed decimal digits. Default and maximum value is **20**. Take care! If value of NF_FRACTION_MAX is lower then the decimal digits of the displayed number system makes rounding which can affect entered or existing data! | ||
| - | * NF_GROUPING - use grouping separator (e.g. thousand separator) during display. Accepted values are: //always, auto// (uses locale preferences), //min2// (if at least 2 digits in a group), //true// (same as always), //false// (no grouping). Default value is **auto**. | + | * NF_GROUPING - use grouping separator (e.g. thousand separator) during display. Accepted values are: //always, auto// (uses locale preferences), //min2// (if at least 2 digits in a group), //true// (same as always), //false// (no grouping). Default value is **false**. |
| **Currency specific settings** | **Currency specific settings** | ||
| Line 50: | Line 117: | ||
| **Sample configuration** | **Sample configuration** | ||
| - | Number formats can be defined in table etx_system_config_set. Sample INSERT INTO statements for a number definition: | + | Number formats can be defined in table //etx_system_config_set//. Sample INSERT INTO statements for a number definition can be seen below. It will display numbers as currency (EUR), and uses EUR-sign to display. It will display 3-20 decimal digits, comma as decimal separator and dot as thousand separator (DE format) . Sample output: 1.023.456,780 € |
| insert into etx_system_config_set (cfgset_id, cfgset_variant, cfg_id, description, ind_active, cfg_value, cfg_id_overlay, cfg_id_link) values | insert into etx_system_config_set (cfgset_id, cfgset_variant, cfg_id, description, ind_active, cfg_value, cfg_id_overlay, cfg_id_link) values | ||
| Line 58: | Line 125: | ||
| ('NBRFORMAT', 'CUR_01', 'NF_CURRENCY_DISPLAY', 'EURO sign', 1, 'symbol', null, null), | ('NBRFORMAT', 'CUR_01', 'NF_CURRENCY_DISPLAY', 'EURO sign', 1, 'symbol', null, null), | ||
| ('NBRFORMAT', 'CUR_01', 'NF_CURRENCY_SIGN', 'EURO sign', 1, 'standard', null, null), | ('NBRFORMAT', 'CUR_01', 'NF_CURRENCY_SIGN', 'EURO sign', 1, 'standard', null, null), | ||
| - | ('NBRFORMAT', 'CUR_01', 'NF_UNIT', 'unit to use', 1, 'money', null, null), | + | ('NBRFORMAT', 'CUR_01', 'NF_UNIT', 'unit to use', 1, 'null', null, null), |
| - | ('NBRFORMAT', 'CUR_01', 'NF_UNIT_DISPLAY', 'unit to use', 1, 'long', null, null), | + | ('NBRFORMAT', 'CUR_01', 'NF_UNIT_DISPLAY', 'unit to use', 1, 'null', null, null), |
| ('NBRFORMAT', 'CUR_01', 'NF_FRACTION_MIN', '3 decimals', 1, 3, null, null), | ('NBRFORMAT', 'CUR_01', 'NF_FRACTION_MIN', '3 decimals', 1, 3, null, null), | ||
| ('NBRFORMAT', 'CUR_01', 'NF_FRACTION_MAX', '20 decimals', 1, 20, null, null), | ('NBRFORMAT', 'CUR_01', 'NF_FRACTION_MAX', '20 decimals', 1, 20, null, null), | ||
| ('NBRFORMAT', 'CUR_01', 'NF_GROUPING', 'use grouping separators', 1, 'true', null, null), | ('NBRFORMAT', 'CUR_01', 'NF_GROUPING', 'use grouping separators', 1, 'true', null, null), | ||
| ('NBRFORMAT', 'CUR_01', 'NF_CULTURE', 'German German', 1, 'de-DE', null,null); | ('NBRFORMAT', 'CUR_01', 'NF_CULTURE', 'German German', 1, 'de-DE', null,null); | ||
| + | |||
| + | After number format details are inserted into the database you have to make the following steps: | ||
| + | - Create a //physical domain// entry. In the add form // number format name// refers to the value of //NF_NAME// configuration value. | ||
| + | - Define the column which you want to format in the //column properties// menu item. | ||
| + | - Set //physical domain// in the menu item //format properties// | ||
| + | |||
| + | Following screenshots show the steps described upwards: | ||
| + | |||
| + | {{:niota-docs:pasted:20240226-120113.png}} | ||
| + | |||
| + | {{:niota-docs:pasted:20240229-144746.png}} | ||
| + | |||
| + | {{:niota-docs:pasted:20240226-120201.png}} | ||
| + | |||
| + | {{:niota-docs:pasted:20240226-120212.png}} | ||
| **System default** | **System default** | ||
| - | In file //system_defaults.php// default number formatting can be set. It is used for each columns which does not have a number format setting. Only **culture setting** should be modified. Other settings are set by defaults (see previous sections). System default format sets a decimal number format with 0 to 20 decimal digits, without thousand separator and locale-specific decimal separator. | + | In file //system_defaults.php// default number formatting can be set. It is used for each columns which does not have a number format setting. Only **culture setting** should be modified. Other settings are set by defaults (see previous sections). System default format sets a decimal number format with 0 to 20 decimal digits, without thousand separator and locale-specific decimal separator. Sample output for integer value: 123456. Sample output for decimal value: 123456,789123 (de-DE locale setting) |
| // --- | // --- | ||
| Line 75: | Line 157: | ||
| define('NUMBER_FORMAT_DEFAULT', array("name" => 'default_nf', | define('NUMBER_FORMAT_DEFAULT', array("name" => 'default_nf', | ||
| "description" => 'default format', | "description" => 'default format', | ||
| - | "culture" => '**DE-de**') | + | "culture" => 'DE-de') |
| ); | ); | ||