FileMaker 16 was just announced this morning and I’m excited to show you a couple of things it can do. You may remember a couple of posts: FileMaker User Interface Design – Time for a change and Contextual Mode Shifting – It’s a Thing! – Technique which showed us how to have a cleaner design in “Browse Mode” making important information stand out and protecting data but “Edit Mode” allowed fields to be enterable.
Now previous to FileMaker 16 we used global fields for Edit Mode so when the edit icon was clicked the main field values would to global fields. Clicking “Save” after making changes would copy from the globals back to the main, or clicking “Cancel” would clear the globals out. This method has been working but we wanted to try something new and the JSON functions in FileMaker 16 have allowed us to do that.
How Does it Work?
Clicking either of the Edit buttons, a JSON string ($$JSON) is created based on the current values of the fields in the current record. The field names are captured from a designated layout CON_edit_fields, that is used as a template. The Edit panel is then opened allowing the user to make changes.
Edit Mode Using Custom Function
This is the Custom Function that builds the JSON string.
Edit Mode Using Script Loop
Two Options Are Available In Edit Mode
View JSON for Current Record
Clicking this button will present a Card Window which is another new feature of FileMaker 16.
The scripting only requires that a layout exists with the same context of the layout you are in the format of tablename_edit_fields.
Have a good week and email me with any questions!
The Scarpetta Group, Inc.
FileMaker 15 Certified Developer