Variable data typing is determined by the type of calculation you define not by any option you select in the specify calculation dialog. So if your are referring to the "text" designation at the bottom of the specify calculation dialog, you can ignore it.
Even if your calculation produces a text result (say you use the & operator), it will still be treated as a number if you then assign the value to a number field.
Thanks that's comforting that I can ignore the information on the bottom. However I'm using the same script that I've created in version 12 demo and I've purchase the new 13 adv and it's not working. So maybe it's the technique that I'm applying is not correct in version 13.
Basically the idea was I'm in a company profile layout and the company_id is number, unique and auto created. I have a portal view of notes but when I want to create a new note I create a script to say go to layout NOTES - create new record and take the company id from the company layout and insert into the new note. But it's always blank in version 13. It worked fine in version 12.
Any best suggestions?
There's been no change in this part of Filemaker between 12 and 13.
Presumably, you are using this type of script:
Set Variable [$CompanyID ; value: Companies::__pkCompanyID ]
Go to Layout ["Notes" (Notes)]
Set Field [Notes::_fkCompanyID ; $CompanyID ]
Go to Layout [ original layout ]
should work the same in v12 and 13. Should work the same in any version of FileMaker new enough to support variables. (Before variables this still worked if you used a global field.)
Note: the changes in layout can trip a large number of script triggers on either of the two layouts in use here. You may need to check to see if a trigger controlled script is interfering with the correct execution of your script. (and sometimes I use a different approach that creates a new portal record without changing layouts.)
Thanks - that script was almost what I had except that I had Set Field by Name instead which didn't work. I knew it was a simple solution but I'm just learning the ropes.