What kind of field? Does it have global storage specified?
Set Field should update the value of the field as you want here, but it may not work as expected if you aren't using the same global field on both layouts.
If that doesn't do it, post the script where the set field is supposed to modify the field's value.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
- If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
Yes, it has global storage specified. But I will explain the situation more detailed:
I have five related tables. Every table has one main layout. I would like to switch regulary from one lay-out to the other. I created one field with a valuelist with terms for every lay-out and I use a script to go to the appropriate lay out if selected. [see screenshot]. That works well.
But, if I go to another lay-out via GTRR, the field with the valuelist does not update to the value of the lay-out of the related record. I thought I should use a script like 'set field' to set the value to the one of the selected layout. I tried, but it changed the field to 0 or to 1. [see screeeshot].
and this is the other script...
I don't speak your language but It looks like you are using Go To Layout, not Go To Related Record--which would be Ga naar gerelateeerde record, if I am picking the correct step out of the list on the left of your last screen shot.
But whether you use go to layout or go to related record, you'd need to add a set field step such as:
Set Field [YourTable::YourLayoutNamefield ; Get ( LayoutName ) ]
to update this field. It won't happen automatically.
That works very well! Thank you very much!