May 30, 20187 yr 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)
May 30, 20187 yr 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.
Create an account or sign in to comment