...and setting fields with different sizes of the same image.
You do know that you can make multiple copies of the same field and size each one differently? I must assume that you want to use something like getThumbNail to assign different fields a copy of the same image with different resolutions.
Never tried passing the contents of a container field as a script parameter, but you can use text as a way to pass the reference to a field. This will work at least for the target field, you may need to put the source image in a field with global storage at the start of your script if it changes layouts in order to put these copies in fields of a different record and/or table.
GetFieldName ( Table::ContainerField )
can be used in the script parameter box to pass the Table::FieldName reference to a field. Then Set Field By Name [ Get ( ScriptParameter ) ; ...
can set the field named in the script parameter to a value. GetField ( Get ( ScriptParameter ) ) is a function that can "read" the contents of the field named in the script parameter.
PS; You could use quoted text: "Table::containerField" and your script will work, but using GetFieldName makes sure that if you later rename the table occurrence or field in Manage | Database, you won't need to modify the script parameter to pass the correct text to your script.
This is about right. I am using GetThumbnail to set fields at different resolutions. I do not want to have a bunch of different resolutions of the same image because this is a copy and the database grows. However, mobile users need the images to be smaller in file size or the usage gets slow.
I will give the text a try in a bit and let you know how it goes.
Seems like passing text is working. Thanks.
Well it took a bit, but I got it working. GetField was the answer but GetField ( Get ( ScriptParameter ); 1 ) gave me an issue with the number of arguments so I wrapped in GetValue to make it happy. Here is what worked in the end. Thanks Phil.