I created a simple button (called TEST) on the layout in question that ran a script which had a set field script step for each global field on the layout with a calculated result of "". When i click the button in Web Direct all global fields are cleared except the field having the problem.
When using FMP on the solution on the same layout I type in a value in all the global fields and when I click the TEST button the fields all clear.
When I change something on the layout in Layout mode in FMP and then switch to browse (this is when I am still using a web browser and am signed into the solution using Web Direct) the layout refreshes on the web direct page on my browser which is to be expected and my minor layout change shows up.....and....my global field having the problem is now cleared.
The solutions is being hosted on a FMP 13 Server
So if I understand correctly the global does get cleared except you don't see it, until you do a layout modification (which refreshes the screen) Would a update object script step do the trick?
No. The global field shows the last value that was manually entered into it by the user. When the same user leave the layout and returns a series of set field script steps clears all global fields on the layout except for one field that still has the value entered when they were last on the layout.
I tried everything and continued to have problems with this global field. It was the correct field type, etc. I finally decided I might have some corruption in the field in question. I deleted the global field in the DB and recreated it from scratch. Placed the field back on the layout in question and reset my scripts and calculations. The problem has now cleared up. I only hope the corruption was limited to that one field. So far no other issues, but I continue to test.
Great that you solved it!
It does happen time to time. Fortunately not too often, otherwise I might have suggested it :-) But now that you mention it I remember relationships not working and going nuts on why it didn't. Then deleting and adding the field in question immediately solved the problem.
I do a lot of remote development and the last few years I connect via VNC/Teamview etc and develop on a machine on site. In the past I destroyed a couple of databases when the WiFi would drop while updating the database definition for example.
Just a thought: I notice that you are setting a field to "". IIRC, some fields 'don't like' to be set thusly - specifically time fields. So I define a custom function called 'NULL', with no parameters & no calculation. This works to empty anything - fields of all types, $vars, $$vars. And I name it in caps so that when I script 'set something to null' in lower case, it will confirm that the cf exists by changing the calc to 'NULL'...