AnsweredAssumed Answered

calculated field mimic scripting

Question asked by ericjlindholm on Jun 23, 2015
Latest reply on Jun 23, 2015 by ericjlindholm

Title

calculated field mimic scripting

Post

 

Many on my table relationships are based on fields that would be best managed by calculations.  For example if an Event status is marked declined all related records in other tables would have calculation fields that display the text "declined."  As i understand it, filemaker does not allow you to create relationships based on calculations.  I have a few unreliable script to insert this text into related records fields such as 

If [ Equipment List::EQ list status = "Declined" ]
Go to Related Record [ From table: “Line Items”; Using layout: “Quote Input BLANK” (Line Items) ]

[ Show only related records; New window ] Go to Record/Request/Page

[ First ] Loop

Set Field [ Line Items::vlv EQ list Status Declined; "Declined" ] Go to Record/Request/Page

[ Next; Exit after last ] End Loop

Close Window [ Current Window ]

Exit Script [ ] End If

If [ Equipment List::EQ list status "Declined" ]
Go to Related Record [ From table: “Line Items”; Using layout: “Quote Input BLANK” (Line Items) ]

[ Show only related records; New window ] Go to Record/Request/Page

[ First ] Loop

Set Field [ Line Items::vlv EQ list Status Declined; "" ] Go to Record/Request/Page

[ Next; Exit after last ] End Loop

Close Window [ Current Window ]

Exit Script [ ] End If 

Is there a better way to do this or is scripting the only way?

Outcomes