Have a photo on a layout, not in a container. Is there a way via script to take the photo on the layout and insert into a container field ??
That's actually an interesting idea. Have you tried using it? If it works at all, you'd need to give the picture an object name and try the "content" attribute to see if you get anything.
Seems like you are doing this the hard way though. Better to insert the image into a container field and put the container field on the layout. Then accessing this image via script becomes quite easy.
You can do it manually but not via script as you have to enter layout mode to access the layout object and scripts cannot be performed on a window in layout mode.
Thanks Phil, was hoping that there was some magic using for example GetLayoutObjectAttribute.
Holy Cows, it works. Have done it, seems to work with both "content" and "source". Script:
Set Field [ Test::Logo_Cont_Source; GetLayoutObjectAttribute ( "Logo" ; "source" ) ]
Set Field [ Test::Logo_Cont_Content; GetLayoutObjectAttribute ( "Logo" ; “content” ) ]
Keep in mind though that it's fairly easy to accidentally change a layout object's object name when editing a layout. Better to insert the graphic into a container field in a related table or global field to avoid such possible complications.
Yes, but if a "Clone" is saved, all fields go empty. And if a needed graphic is directly on a layout, it can be transferred to appropriate container field.
I get the idea, yet to me, that is an easier problem to manage that trying to "store" a graphic as a layout object. Lots of needed data goes missing on a clone so you normally have to consider an import records action anyway before you can put the clone to work.
Another idea when you don’t have scripting access, is to do a screen capture And trim that.
Retrieving data ...