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

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

Recommended Posts

Posted

Hello FM Mavens, 

I am likely missing something. 

I have a script step that calculates the dimensions of an image in a container field. There are many such fields so the script should work with any arbitrary one. 

I get the name of the field by using script parameter Get(ActiveFieldName). 

Let's say I have a container field "cont1". The script is triggered by entering the field.

I am trying to calculate the height of the image by using 

GetContainerAttribute (Get ( LayoutTableName ) & "::" & Get ( ScriptParameter ); "height" )

The results are question marks - I am not sure why. If I explicitly identify the fields then the expression works. 

Tried the same expression (Get ( LayoutTableName ) & "::" & Get ( ScriptParameter )) in the script step "Set Field by Name" and it worked, which means that the expression correctly identifies the field the script is attached to. Then why is it not getting it the first step? What's wrong with the calculation? (FM17)

Thanks

Asu

 

(I hope I posted it in the correct section)

Posted

Hi Asu

GetContainerAttribute is expecting a field as the first argument, but you are giving it a string. It would be great if FileMaker worked out what you mean, but it won't! Try this :-

GetContainerAttribute (GetField ( Get ( LayoutTableName ) & "::" & Get ( ScriptParameter )); "height" )

The GetField command takes a string, and returns the contents of the field, which I believe will solve the problem.

  • Thanks 1

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