Need Word Syntax Help

Discussions related to ReadyDoc development.
Post Reply
slind
Posts: 8
Joined: Thu Nov 13, 2008 1:59 am
Location: Cincinnati, Ohio

Need Word Syntax Help

Post by slind »

I would like to do the following but I'm not sure of the correct syntax. I placed a support call but they replied to post it here. Sorry!


<IF (SystemDate < “04/01/2017”)>
REF (NSTitle_Letterhead##)
<ELSE>
REF (RLTitle_Letterhead##)
</IF>

And

<IF (Left({{Order.Attorneys[1].LookupCode}},2}}=”NS”)>
REF (NSTitle_Letterhead##)
<ELSE>
REF (RLTitle_Letterhead##)
</IF>
Phil Barton
Posts: 54
Joined: Wed Sep 24, 2008 2:37 pm
Location: Raleigh, NC
Contact:

Re: Need Word Syntax Help

Post by Phil Barton »

For the first set of conditions, SystemDate is a function. Thus, it has to end with open- and close-parentheses. So, rewritten, it looks like:

<IF (SystemDate() < “04/01/2017”)>
REF (NSTitle_Letterhead##)
<ELSE>
REF (RLTitle_Letterhead##)
</IF>

For the second one, we use the formula function BeginsWith(...) to see if the lookup code starts with the pattern you're looking for. It takes as its first parameter the source value (in this case the lookup code) and as a second parameter the pattern we're looking for:

<IF (BeginsWith({{Order.Attorneys[1].LookupCode}}, ”NS”))>
REF (NSTitle_Letterhead##)
<ELSE>
REF (RLTitle_Letterhead##)
</IF>

For future reference, you can use the formula editor to find out all the functions that it has and how they're used. If you press F8 and bring up the formula editor in any field, you'll see in the toolbar a button with a large sigma character. This is the list of all the functions. available. Hope this helps!
Phil Barton
Software Architect
SoftPro
Post Reply