Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
visionx:default_values [2020/03/08 16:06] admin |
visionx:default_values [2020/03/08 22:20] admin |
||
---|---|---|---|
Line 4: | Line 4: | ||
Default values for field can be set [[jvx:server:storage:dbdefault_values|programmatically]] or directly in VisionX. If you're using VisionX, it's pretty simple. Assume we have following screen: | Default values for field can be set [[jvx:server:storage:dbdefault_values|programmatically]] or directly in VisionX. If you're using VisionX, it's pretty simple. Assume we have following screen: | ||
+ | {{:visionx:defaultvalues_screen.png?nolink|}} | ||
+ | If we insert a new record (1), the Birthday (2) should be set to the current date and the Checkbox (3) shoule be checked. To define this, open the screen in design mode | ||
- | If we insert a new record (1), the Birthday (2) should be set to the current date and the Checkbox (3) shoule be checked. | + | {{:visionx:defaultvalues_design_table.png?nolink|}} |
+ | |||
+ | and open the customizer (1) for the selected table. The customizer contains the event After Inserting Row (2). Simply create a new action for this event. The action editor contains the necessary commands | ||
+ | |||
+ | {{:visionx:defaultvalues_action.png?nolink|}}. | ||
+ | |||
+ | The Set Value (1) command sets the Checkbox to selected (value = Y). The Set Value (2) command sets the birthday to the current date ([new java.util.Date()]). If you create a new record, the Checkbox and Date will be set. |