Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Set Variable / Set Field

Featured Replies

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

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.

  • Author

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?

 

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

  • Author

It is like a miracle :)

Thank you

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.

  • Author

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?

 

 

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.