as a test, I am trying to create a solution where there is only one Layout, for the iPad. Up to now, its working pretty good, but I can't create new records. I know the reason, because the relation is established on a non-modifiable field. Here is a look at the Layout (named Globale):
Here is the Relation Ship Graph (the interesting part is in the green rectangle) :
The Liste_Clients TOC is used to display the Customers List on the left, and the Detail_Client TOC is used to display the details for a Customer. Both are portals, the right one displays only a large single row. Globale::ID_Globale and Detail_Client::ID_Clients are calculated field set to 1. When I click on a client on the left list, I set a global variable to the value of the key, and the right portal is filtered on that global field value. I I try to create a new record in Detail_Client, I can't because of the nature of the fields used to set the relationship.
I got to FileMaker Training Series Advanced for FileMaker 14 (I use FMPA 14), and found out on page 107:
No way to create records through a relationship based on non-editable fields.
However, it is possible to use scripting techniques to create the record and accordingly set the data so that the non-editable field will contain the match data. Scripting is covered in Module 5 (Solution Logic: Scripting).
I got to Module 5, but didn't find the way to do it. How can I achieve my goal ? I though instead of filtering the right portal I could add a global field to the Globale table, say z_Selected_Customer, set this field to the key of the selected Customer in the list and add match fields to the relationship Globale::z_Selected_Customer = Detail_Client::_pk_Client to display the details of the selected customer. Would that work then creating a new record in Detail_Client, emptying the z_Selected_Customer field first, event if the other match fields are non-modifiable ?