As soon as you set the calculation definition and save it it will execute and produce the results of your calculation. If you have GetContainerAttribute ( your_container_field ; "filename" ) it will return the filename of whatever file you have in the container. When you change the contents of the container the calc will fire.
Option 1: change the calc and save it.
Option 2: replace field contents on the container with itself
Option 3: create a trigger field and change the calc to
_trigger = the_trigger_field ;
GetContainerAttribute ( your_container_field ; "filename" )
With option 3 everytime you tweak (set it to anything) the trigger field the calc will refire.
If its returning ? then make sure the display field is wide enough to show the complete results.
Option 1 did not work, every time I changed the calculation ALL the question marks came back, even the ones that previously had names. I expected it to work this way, but it doesn't for some reason.
Option 2 works, but with 12,000 records I wrote a routine to do the replacement for me.
If I change the attributes I want to see I have to run the replacement routine again due to what happens in option 1. For instance i wanted to see the filename of the file that's in the folder, not the name of the file that was originally placed. I had to change the attribute to GetContainerAttribute([containerfield];"externalFiles"). The reason for that is that if you paste in a file that happens to have the same name as another file, FM Pro will append a serial number to the end of the filename to avoid over-writing. (I had a lot of "untitled" images pasted in!) I'm keeping that script handy just in case.
For assistance, here's the script:
Option 3, I have not tested. However it sounds like the best thing to do and avoids the risky and manual-step of running the replace script I wrote. If it comes back to haunt me I'll test it.
Re: "If its returning ? then make sure the display field is wide enough to show the complete results"
A quick way to check whether this is the issue is to click inside the field with the ? showing. If the problem is merely a display thing, then the actual field contents will be revealed.
If that is the problem, then making the field bigger is the obvious solution, but it is also worth checking the amount of padding in the field too; sometimes reducing that is sufficient.