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 6646 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Does anybody know why GetField("FieldName") returns the quoted field's value but GetField($$globalvariable) will not, even though $$globalvariable contains the exact text string "Fieldname", quotes and all?

Posted

It works for me. you might check that the variable is set in the table where the GetField() is used and make sure the field type is appropriate.

Posted

I'm sorry, I don't understand what you mean by the variable being "set in the table where the GetField is used"

Global variables are Global, right? They do not belong to any table. Their value stays the same until reset, right?

Posted

Sorry, I should have said "file" instead of "table". Global variables are specific to the file they are set in.

Posted

Right... yes, same file. GetField can use related fields can't it? I thought that might be it. But I tried an end run by creating a calculation that returns the related value but still no luck...

BTW, the "?" that is returned is in the Data Viewer

Posted

Can you describe the relationship and field or script this is used in? Or better yet, post a sample that illustrates what you're trying to do.

Posted

The attached is very simple but does show the problem. Try running the SetVariable script while using the dataviewer to watch:

$$variable

GetField("subchild::subchildvalue")

Child::Getsubchildfield

You'll see that while the straight formula returns the correct value, the calculation in the Child table does not even though it is looking at $$variable which contains the exact same text as the straight GetField formula.

Thanks for your time, Ender!

PS: the text editor is adding a space in one of the watched items when I preview the post and I can't seem to get rid of it

test.zip

Posted

Remove the Quote() function and change the storage on the GetField()'s calc to "Do not store".

Alternatively, you could have the script perform the GetField(), setting the calculated result into a normal text field.

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