Gismo12 Posted November 16, 2018 Posted November 16, 2018 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
rwoods Posted November 16, 2018 Posted November 16, 2018 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. 1
comment Posted November 16, 2018 Posted November 16, 2018 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. 1
LaRetta Posted November 16, 2018 Posted November 16, 2018 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. 1
Recommended Posts
This topic is 2199 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now