April 4, 200718 yr 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
April 4, 200718 yr 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.
April 4, 200718 yr 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 April 4, 200718 yr by Guest
April 5, 200718 yr Author 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.
Create an account or sign in to comment