I need to re-evaluate the field rules for the current record only. Can someone help with the syntax?
I can do it for all records from a button, but I would prefer just the current record.
Any ideas?
I need to re-evaluate the field rules for the current record only. Can someone help with the syntax?
I can do it for all records from a button, but I would prefer just the current record.
Any ideas?
Ted Giles
Example Consulting - UK.
https://exampleltd.example-software.com/ See our site for Alpha Support, Conversion and Upgrade.
There are no functions to re-evaluate the rules for a single record. If I remember correctly you can use
tbl = table.open("sometablename")
'query for the record in question
tbl.change_begin()
'don't change anything
tbl.change_end()
tbl.close()
to cause the field rules to be re-evaluated for the queried record. That may have just been the way to recalc the calculated fields. Memory fails.
Last edited by Stan Mathews; 11-29-2017 at 03:18 PM.
There can be only one.
You are probably correct Stan.
When an image is pinned to an ImageReferenceField, there is no factual Record Save.
I tried simply Saving and that didn't work.
TableOpen and resave may well solve the issue. Other than that recalc everything is the only option. Still, small ish table.
Ted Giles
Example Consulting - UK.
https://exampleltd.example-software.com/ See our site for Alpha Support, Conversion and Upgrade.
Since you are probably doing it on a form (?) try making the onchange event for the form field
parentform.commit()
There can be only one.
Tried the Stan, but then we hit another problem with the interaction between the sql and dbf tables in the set.
Ongoing work I'm afraid.
Ted Giles
Example Consulting - UK.
https://exampleltd.example-software.com/ See our site for Alpha Support, Conversion and Upgrade.
Is there one or a couple of field rule in particular that is of interest? If you are having to push a button anyway, could you have the button run a script that perform the same field rule evaluations on the current record?
Mike W
__________________________
"I rebel in at least small things to express to the world that I have not completely surrendered"
There are 6 fields Mike, each of which has a field rule attached.
A script to do that would be good.
See post#3. There is a Save when an image is selected and I need to get the file path and save it. A Calc expression does it fine and my work around to force a recalc is to clear a logical field which must be ticked to confirm acceptance. This has the effect of a record change, so the rules are recalculated.
Ted Giles
Example Consulting - UK.
https://exampleltd.example-software.com/ See our site for Alpha Support, Conversion and Upgrade.
Bookmarks