Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I'm trying to create what I thought would be a pretty simple script. It's just a button that when you click will create a new record in a related table and fill in the related field's value. The tables are in 2 different FM files and the related data from the table I'm trying to create a new record in is displayed in a portal on the page I'm putting the button. So the script the button is attached to is:

Set Variable[$$Control_Number; Value:Purchase OrderItems::Control_Number]

Perform Script["Create New Scan Record" from file: "Purchase Order Items"]

Go to Layout [original layout]

The Create new Scan Record script in the Purchase Order Items file where the related table is stored looks like this:

Go to Layout ["Scans-Data Entry"(Scans)]

New Record/Request

Set Field [scans::Control #; $$Control_Number]

Commit Records/Requests[No dialog]

So the idea is that when you click the button from the original location it will store the control number in a variable and pass it to the script in the other file. Then create a new scan record, populate the control number field in that record with the value in the variable, commit that record. Then you'd end up right back where you were with a new record created in the portal that you can now add data to the other fields.

The problem is the $$Control_Number value is not carrying through to the Create New Scan Record script in the other file. I tested this by adding a Show Custom Dialog step into each of the scripts. On the first script it displays the value in the variable just fine. In the other script the dialog comes up blank.

I thought that $$ variables were global? Any information on why this value isn't passing for me would be greatly appreciated. Thanks!

This topic is 6499 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.