Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have a situation that I can't seem to solve. Here is the setup:

Task: Create a new record and insert the ID of the record that the script was triggered from.

Script steps:

Set Field [GlobalTemp::gTempNum; Get(RecordID)]

Go to Layout ["Action Items" (Action Items)]

New Record/Request

Set Field [Action Items::AI_id; GlobalTemp::gTempNum]

Commit Records/Requests [No dialog]

Go to Field [Action Items::XI_item]

Unfortunately, the field AI_id never gets set and the global field gTempNum does not contain the record ID of the record that triggered the script. I did make sure that the table GlobalTemp has at least one record (the only field is the global field).

Does anyone have any ideas what I am doing wrong here?

Thanks in advance!

Ken

Posted

I would first start at making sure that the global field is indeed global. Many times people will name their field as a global but then forget to check the global storage checkbox.

Posted (edited)

Is the Get(RecordID) information what you really want to get ?

This is a number internally generated by FileMaker, not a serial number you would have created to identify a record...

But if it is what you want I've just tried again (FM8.5), it works fine. It could be that your field GlobalTemp::gTempNum in not set as a global...

Can't help you more.

--EDIT--

sorry, dobble post with John...

--EDIT--

Edited by Guest
Posted

Thanks for the comments. The field is indeed a global. I did notice that I didn't have any actual records in that table though, so I created a single record, but that didn't seem to make a difference.

You are correct though that Get( RecordID ) is not what I really wanted. I was trying that as part of troubleshooting because it was not working when I tried to assign my primary key. I finally got it to work with my primary key (I think I had accidentally assigned the wrong field before).

I still have no idea why I couldn't assign the recordID though. Strange...

Anyhow, problem solved and on to better things. Thanks again for the help.

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