Need to change foundset?

When the user clicks on a button in the first column of a list form, the program opens the detail form,

forms.entryForm.controller.loadRecords(forms.listForm.pk_id)

But this changes the foundset selection, so the original foundset needs to be regenerated after the user saves or cancels the data entry mode.

Is there an alternate coding which moves the pointer to the desired record, and allows the edit to proceed, but does not change the foundset?

Thank you,
Don

By default will the forms that use the same table share the same foundset. So then you don’t have to care about loading the right record, just show the detail form and you’re done! 8)

If your form shows a related foundset or if you loaded the records on there yourself, then the forms don’t share the same foundset. In that case you can use this code:

forms.entryForm.controller.loadRecords(forms.listForm.foundset)

Hi Joas,

I didn’t realize that the “pointer” would be on the correct record when I issued the showFormInDialog command. Thanks for the tip!

Don