I have a FileMaker script which calculates a value. I have one record from table A from which a relation points to n records of table B. How to best set the same value for the same field on all those n B-records?
Just doing Set Field [B::Field; $Value] will only set the value of the first of all related records. What works however is the following:
Go to Related Record [Show only related records; From table: "B"; Using layout: "B_layout" (B)]
Loop
Set Field [B::Field; $Value]
Go To Record/Request/Page [Next; Exit after last]
End Loop
Go to Layout [original layout]
Isn’t there a better way to accomplish this? I’m sort of rebelling against the fact that in order to set some value (model) programmatically (controller), I have to create a layout (view) and switch to it, even though the user is not supposed to notice anything like a changing view.