AnsweredAssumed Answered

Get(OpenRecordState ), Get(ModifiedFields) And Portal Rows

Question asked by SteveFransen on May 8, 2016
Latest reply on May 8, 2016 by SteveFransen

Greetings,

 

How can I tell if a child record in a portal row has been modified in a modal popover?

 

The use case is the ability to create a new record, or edit an existing record, in a modal popover with this behavior:

 

When a Cancel button on the popover is clicked:

 

(1) If no data has been entered into a new record created just before opening the popover - simply close the popover and delete the new record

(2) If no fields of an existing record have been modified - simply close the popover

(3) If any fields have been modified in either case - ask the user if they want to save or discard the changes

 

When a Done button on the popover is clicked:

 

(1) Ask the user if they want to save the new or edited record

 

I have this working nicely for parent records using a combination of Get(OpenRecordState ), Get(ModifiedFields), and David Thorp's method to enforce the modal behavior: http://http://www.filemakertoday.com/filemaker-13/4035-filemaker-13/simple-filemaker-pro-13-popover-close-in-one-script

 

Now I want to use this for child records in portal rows. The problem is that Get(OpenRecordState) and Get(ModifiedFields) return values for the parent record on the layout, not the child in the portal row.

 

I’d appreciate any advice.

 

Thanks,

Steve

Outcomes