Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2500_config_apps:0700_add_edit_attributes:0300_number_attributes [2022/08/24 06:43] administrator2500_config_apps:0700_add_edit_attributes:0300_number_attributes [2026/08/13 07:20] (current) – external edit 127.0.0.1
Line 26: Line 26:
 ===== Auto Incremented ===== ===== Auto Incremented =====
  
-If this property is defined //**Aware IM**// will automatically set values of this attribute incrementing by 1 every time a new instance of the object that owns the attribute is created. The benefit of using auto-incremented numbers compared to incrementing numbers by rules is that the auto-incremented number is set into the database immediately without waiting for the current database transaction to commit. This avoids the potential problem of having two users having the same number if numbers need to be unique.+If this property is defined //**AwareIM**// will automatically set values of this attribute incrementing by 1 every time a new instance of the object that owns the attribute is created. The benefit of using auto-incremented numbers compared to incrementing numbers by rules is that the auto-incremented number is set into the database immediately without waiting for the current database transaction to commit. This avoids the potential problem of having two users having the same number if numbers need to be unique.
  
 When you click the “…” button of the property you can control how auto-incremented numbers are applied: When you click the “…” button of the property you can control how auto-incremented numbers are applied:
Line 42: Line 42:
 This determines the value for the first instance of the object or the first instance of the “group” of instances. The default value is taken from the Value Range defined for the number (if undefined 1 is used). You can also specify an attribute that will hold the initial value. This determines the value for the first instance of the object or the first instance of the “group” of instances. The default value is taken from the Value Range defined for the number (if undefined 1 is used). You can also specify an attribute that will hold the initial value.
  
-<note>//**Aware IM**// increments values of numbers that do not involve groups of instances BEFORE rules are evaluated for the object, so if rules use auto-incremented attributes, their values will already have been calculated. However, if auto-incremented attributes involve group instances their values are incremented AFTER rules are evaluated. If you have to use incremented values for such attributes in rules, set the auto-incremented values “manually” using the ''[[3200_functions:xx_function_list:next_sequence_nmb|NEXT_SEQUENCE_NMB]]'' function, for example:<code aim>IF Order.RefNo IS UNDEFINED THEN +<alert type="primary" icon="fa info-circle"> 
-  Order.AutoIncremented =  +**note** 
-  NEXT_SEQUENCE_NMB( + 
-    'Order', 'AutoIncremented', Order.GroupValue) + //**AwareIM**// increments values of numbers that do not involve groups of instances BEFORE rules are evaluated for the object, so if rules use auto-incremented attributes, their values will already have been calculated. However, if auto-incremented attributes involve group instances their values are incremented AFTER rules are evaluated. If you have to use incremented values for such attributes in rules, set the auto-incremented values “manually” using the ''[[ref:a_f:f:af:next_sequence_nmb|NEXT_SEQUENCE_NMB]]'' function, for example: 
-  Order.RefNo =  +<code aim>IF Order.RefNo IS UNDEFINED THEN 
-   'Order Prefix ' + OrderAutoincremented,</code>.</note>+  Order.AutoIncremented = NEXT_SEQUENCE_NMB('Order', 'AutoIncremented', Order.GroupValue) 
 +  Order.RefNo = 'Order Prefix ' + OrderAutoincremented </code>.</alert>
  
 ===== Presentation Options ===== ===== Presentation Options =====
Line 55: Line 56:
 ==== Widget ==== ==== Widget ====
  
-Most of the choices here are similar to the Plain Text attribute – “Text box”, “Combo-box”, “Radio buttons” and “Checkboxes”. If the number has “Min. value” and “Max. value” defined there is also an option to display the number using the slider widgetYou can then specify the orientation of the slider, the increment value and whether to display a tip.+Most of the choices here are similar to the Plain Text attribute – “Text box”, “Combo-box”, “Radio buttons” and “Checkboxes”. If the number has “Min. value” and “Max. value” defined there is also an option to display the number using slider or a rating widgetsFor the slider you can then specify the orientation, the increment value and whether to display a tip. 
 + 
 +Note that the Rating widget can be displayed not only on forms but also in standard and custom queries. To display rating number as stars in a standard query go to the properties of the corresponding column and tick the “Display rating widget” checkbox. To display rating as stars in a custom query refer to the attribute in a custom template like so: {AttributeName,rating}
  
 ==== Spinner ==== ==== Spinner ====
  
 This checkbox indicates whether or not to generate a spinner control when displaying the number attribute. This checkbox indicates whether or not to generate a spinner control when displaying the number attribute.