November 16, 20187 yr Hi All, I have a table with customer and registration in my layout I want to be able to go to a new record but the customer name must be automatically populated from current customer in previous layout. Both layouts are from the same table. I just can not get the set variable and set field to work I tried using global field but without success this is my code
November 16, 20187 yr Hello Firstly, you really need to get rid of the slashes in your table names. Call them 'Customer_Aircraft' or something, but you must get rid of the slashes. They will cause you untold misery at some point. As a rule don't use spaces or special characters in table names, layout names, table occurrence names or field names. Underscores are OK ( _ ), but avoid most other non-alphanumeric characters. To your issue, in line 4 you need it to be Set Field [Customer/Aircraft::Owner/Operator ; $$SetCustomer ] The way you have it now, you are setting the field to nothing.
November 16, 20187 yr A footnote: don't use global $$variables, unless you need them to persist after the script has run out. In this example, a local $variable would be quite sufficient, and it would be cleared automatically when the script ends.
November 16, 20187 yr Hi Gismo, I also noticed that you are using '/' in your table and field naming. Filemaker will always warn you that it cannot be easily used and you should take those warnings seriously. I highly encourage you to correct your table and field naming.
Create an account or sign in to comment