See if changing the value an d just clicking the layout background will refresh your system and show the correct image. Does it?
If so, then you need to commit the change to your Client record after you change the value. This can be set up with a script trigger such that editing the field automatically commits that change back to the database.
Well this does not work. I have the tester field, which has the formula
Not IsEmpty ( FilterValues ( List ( Contracts::ContractType ) ; "Contract A" ) )
And i have the relationship which works when i manually refresh.
I've tried the script trigger SaveData with the script commit changes. But nothing happens (mine is in German so sorry for the wrong notions)
I've attached my DB maybe thats easier... (you have to change .jpg to .fmp12 - not sure if it works :-) )
What script trigger did you use? It's possible that the trigger was never tripped.
You cannot use Upload an image to share a database file, but you can upload an image to a file sharing site such as Drop Box and then post the download link in your comment.
I'm surprised by the results that I got here.
First, the wrong script trigger was set. You need to set the OnObjectSave trigger on the contrats::contrats_type field. Not OnCommitRecords on the layout.
But even with that correction, the image would not appear even though the calculation field was updating to show a 1 or 0 as expected.
I found two options that would work:
Make the trigger performed script do a Refresh WIndow [Flush cached join results] step
Change your match field from a calculation field to just a number field and use:
Set Field [ Clients::numberField ; not IsEmpty ( FilterValues ( List ( contrats::contrats_type ) ; "AUTO dommages" ) ) ]
in the trigger performed script to update the match field to 1 or 0.
great it works perfectly