Formula Editor
Moderator: Phil Barton
Formula Editor
I want a field to pull in the marketing source automatically. The following is the coding I would use in a document: {{Order.Contact[({{.IsMarketingSource}}=TRUE)].Name}}. How would I code this in the Formula Editor screen (F8)? Please advise. Thanks.
Re: Formula Editor
Formulas work a little differently because they don't share the same foundation in markup as their document counterparts.
Loop through the Order Contacts until you find the one that is the marketing source, like so:
Loop through the Order Contacts until you find the one that is the marketing source, like so:
Code: Select all
Value = ""
Iterate {{Order.Contact}} From 1 To #{{Order.Contact}}
If ( @.IsMarketingSource = True ) Then
Value = @.Name
Return
EndIf
Loop