If you use Import Records | Folder, you can import all the images in a folder into a table with a container field in it in your database. You can add a second container field for the thumbnail and it can be impoarted in the same import.
How are you using this function?
If you used it in a set field script step, it might be used like this:
Set Field [YourTable::ThumbNailContainer ; GetThumbNail ( YourTable::containerField ; //put width in pixels here ; //put height in pixels here ) ]
The script step would put a thumbnail of the image in YourTable::ContainerField into YourTable::ThumbNailcontainer.
Both of these fields need to be of type container.
While I haven't tried it, I would assume that a calculation field with "container" selected as the result type could use:
GetThumbNail ( YourTable::containerField ; //put width in pixels here ; //put height in pixels here )
to produce a thumbnail result in this calculation field.
The test database that I've setup has 3 fields, Picture (Container field), Thumbnail1 (Calculation filed), Thumbnail2 (Calculation filed).
Picture, has an image that I dropped in,
Thumbnail1, Specify Calculation: GetThumbnail ( Picture ; GetLayoutObjectAttribute ( Picture ; "rectangle"; "width" ); GetLayoutObjectAttribute ( Picture ; "rectangle"; "height" ))
Thumbnail2Specify Calculation: GetThumbnail ( Pictures::Picture ; GetWidth(Picture)/2 ;GetHeight(Picture)/2)
You appear to be copy/pasting from help.
Get LayoutObjectAttribute only works with objects that have an assigned object name. Did you use the insepector to given the object an object name? This is done by selecting the layout object while in layout mode and typing an object name into the "name" box found on the Inspector's position tab.
For Thumbnail1 and Thumbnail2, what result type did you select in the Specify Calculation Dialog?
Took your sugestion, the result type for Thumbnail1 and Thumbnail2 were changed to Container also verifed the object names in the Inspector.
Thumbnail2 now has an image but,
Thumbnail1 still doesn't
"rectangle" seems an unusual object name for a field named "picture", but assuming that this is the case and that you have posted and exact copy of the expression that you are using....
Go to Manage | Database | Fields and double click the field to re-open the field definition. Click the storage options button. Select the "do not store..." check box to make this an unstored calculation.