Jump to content

Set Variable / Set Field


This topic is 1964 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

image.png.4287f42f6ab411d7e903ec41617ebd4f.png

Script: image.png.9dab1dba1eb947c7cbfdc9c829db2b00.png

The New Customer / Aircraft Layout opens from TBL Customer_Aircraft but no Customer Id is set.

image.png.23cf0280d4a208124ca9cf2ad9671eee.png

Please could you tell me where I am going wrong?

Relationship is one to many

Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

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:

image.png.f44dfb297609ca44a5d56b7b41cc60a3.png

Link to comment
Share on other sites

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?

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 1964 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.