Formula Editor

Discussions related to order tracking development with the ProForm module.

Moderator: Phil Barton

Post Reply
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

Formula Editor

Post by cklahr »

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.
Mark McKenna

Re: Formula Editor

Post by Mark McKenna »

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:

Code: Select all

Value = ""
Iterate {{Order.Contact}} From 1 To #{{Order.Contact}}
  If ( @.IsMarketingSource = True ) Then
    Value = @.Name
    Return
  EndIf
Loop
Post Reply