1 of 1 people found this helpful
You can use GetContainerAttribute( yourcontainerfield ; "filename"). That will put the name of the file into that text field.
How are you entering the picture? A script step? Drag and drop? Right clicking on the container field to put the picture in?
I'd use this in a script step that imports the picture into the container field and then sets the file name into the text field. Or you could make it a script trigger. There are a lot of possibilities. Let me/us know if you'd like next steps on that.
Thank you. I will try that.
I have 2 books for very old versions of FM Pro, one by Steven Schwartz and one by Chris Kubica which have been a bit of help. I was using FM years ago and then not for a long while and have just recently picked it up again, to find that all the old entries were still there and converted to v12 without any problems.This has encouraged me to keep at it and bring it up to date. I had some scripts in the old one and can't remember how I did them ... it's coming back little by little.
I will let you know how it goes.
You can use an AutoEnter calculation on the filename text field. Just set the calculation to be the field name of the container.
I did "auto-Enter" for the field which is called "Image filename", the container field is called "Image".
GetContainerAttribute ( Image ; "filename" )
It worked!! At first nothing happened. I tried it without the quotes around "filename" and it said "Specified field not found" so I put the quotes back and inserted a pic in a new record, and it put the filename in the field at the same time the pic was inserted. This saves some tediousness, and it doesn't interfere with the records I'd already done (tried it on an old backup first). Thanks ever so much!
Thanks for all the help!
In the settings for the AutoEnter calculation, if the "Do not replace existing value of field (if any)" is checked, the field won't update if for some reason you enter a new image in the container field. If you uncheck it, it will.