Gismo12 Posted November 29, 2018 Posted November 29, 2018 Hi All, I have some issues with Set Variable / Set Field. From the Customer TBL - New Customer Layout, I create a new Customer Name. Customer_Id created auto. Script: The New Customer / Aircraft Layout opens from TBL Customer_Aircraft but no Customer Id is set. Please could you tell me where I am going wrong? Relationship is one to many
OlgerDiekstra Posted November 29, 2018 Posted November 29, 2018 Line 4 in your script is your problem. You create a new record and (probably) have the customer id field auto create a customer id, but in line 4 you clear it.
Gismo12 Posted November 30, 2018 Author Posted November 30, 2018 Hi, The customer Id in the TBL Customer_Aircraft is not a auto create field. Doesn't set variable copy the Id in the customer tbl and set field past it in the TBL customer_Aircraft ID field? If I dont set the ID in the Customer_Aircraft field, how will I relate to the ID created in the Customer TBL?
OlgerDiekstra Posted November 30, 2018 Posted November 30, 2018 No, your not setting the field Customer_Aircraft::Customer_id with the value of the "$save customer id" variable. Line 4 where you do a set field, you set the field to nothing. Click on the cog of the set field and in the calculated field specify the variable "$save customer id". This is what that line should look like:
OlgerDiekstra Posted November 30, 2018 Posted November 30, 2018 Learn to use the debugger to step through scripts line by line, and use the data viewer to watch fields and variables change values. Or in this case, not.
Gismo12 Posted November 30, 2018 Author Posted November 30, 2018 Do you need the actual Customer Id control in the layout to set the variable? I dont want to display the customer id number. on a different topic, when I go to the new customer layout, the customer ID is set to auto. the customer ID does not display. but when I go to edit mode and back to browse mode, the auto Id does display. When I open the new customer layout, enter the customer name, without the display of the customer number, the set variable / set field does not work. if i do go to new customer, edit mode then back to browse mode, the customer id shows and then the set variable / set field works well any suggestions?
OlgerDiekstra Posted December 2, 2018 Posted December 2, 2018 On 11/30/2018 at 11:40 PM, Gismo12 said: Do you need the actual Customer Id control in the layout to set the variable? No you don't. On 11/30/2018 at 11:40 PM, Gismo12 said: I dont want to display the customer id number. on a different topic, when I go to the new customer layout, the customer ID is set to auto. the customer ID does not display. but when I go to edit mode and back to browse mode, the auto Id does display. When I open the new customer layout, enter the customer name, without the display of the customer number, the set variable / set field does not work. if i do go to new customer, edit mode then back to browse mode, the customer id shows and then the set variable / set field works well any suggestions? It sounds like you're record is not actually created in which case your customerid will have no value. When you go to edit mode FM saves the record, and so when you go back into browse mode, the record is there including a value in customerid. I can't tell you how to fix it as I have no idea what your scripts/layouts look like.
Recommended Posts
This topic is 2183 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