Using build 2999
I have a list control built on a DBF table. To add a record to the table (List), from a button in the Panel Card footer, a new UX used to enter records is opened. When the user ‘Submits’ the new information:
How do I then activate the new entry that was just added to the table (List).
Action scripting code:
I’m thinking that I need to get the new key value of the record just entered, set it to a var, and then refresh the list using the setFocusToValue option.
I have a list control built on a DBF table. To add a record to the table (List), from a button in the Panel Card footer, a new UX used to enter records is opened. When the user ‘Submits’ the new information:
- the data is saved to the table
- the form is reset
- the list is refreshed
- the data entry form is closed.
How do I then activate the new entry that was just added to the table (List).
Action scripting code:
Code:
[FONT=Times New Roman]function tempfunction_6c89acd1_bde3_4826_b696_616909c2b47d() {[/FONT] [FONT=Times New Roman]{dialog.object}.submit();[/FONT] [FONT=Times New Roman]}[/FONT] [FONT=Times New Roman]function tempfunction_6f6fa53e_62fe_48f5_a57a_ab0bc1c2ee43() {[/FONT] [FONT=Times New Roman]//Do not display confirmation prompt[/FONT] [FONT=Times New Roman]//this eliminates dirty form message when closing the form[/FONT] [FONT=Times New Roman]{dialog.Object}.resetForm(false);[/FONT] [FONT=Times New Roman]}[/FONT] [FONT=Times New Roman]function tempfunction_259f7d88_aabd_4494_88a2_67f2a8081dcc() {[/FONT] [FONT=Times New Roman]var po = {dialog.object}.getParentObject();[/FONT] [FONT=Times New Roman]po.refreshListData('USERS');[/FONT] [FONT=Times New Roman]var ele = {dialog.Object}.getPointer('BUTTON_RESET1');[/FONT] [FONT=Times New Roman]{dialog.Object}.closeContainerWindow(ele);[/FONT] [FONT=Times New Roman]}[/FONT] [FONT=Times New Roman]A5.executeThisThenThat(tempfunction_6c89acd1_bde3_4826_b696_616909c2b47d,tempfunction_6f6fa53e_62fe_48f5_a57a_ab0bc1c2ee43,tempfunction_259f7d88_aabd_4494_88a2_67f2a8081dcc);[/FONT]
Code:
[FONT=Times New Roman]Var newkey = to be determined (not sure how to get the new key value from this point)[/FONT] [FONT=Times New Roman]var po = {dialog.object}.getParentObject();[/FONT] [FONT=Times New Roman]//refresh a List and set focus to a particular value in the List[/FONT] [FONT=Times New Roman]po.refreshListData('MYLIST1',{setFocusToValue: newkey}); (not sure if you can use a var here)[/FONT]
Comment