FOREACH ASK

Discussions related to ReadyDoc development.
Post Reply
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

FOREACH ASK

Post by cklahr »

<FOREACH ASK {{Order.Contact[{{.ContactType}}="Seller" OR {{.ContactType}}="Buyer/Borrower"]}}><IF ({{.IndivOrOrg}}=”Individual”)>{{.IndivFullName1}}
<IF (Not IsEmpty({{.IndivFullName2}}))>{{.IndivFullName2}}
</IF></IF><IF ({{.IndivOrOrg}}=”Organization”)>{{.Name}}
</IF></FOREACH><FOREACH ASK {{Order.OtherContact[{{.OtherType}}=”Name Search”].Person}}><IF (Not IsEmpty ({{.FirstName}}))>{{.FirstName}} </IF><IF (Not IsEmpty ({{.MiddleName}}))>{{.MiddleName}}</IF><IF (Not IsEmpty ({{.LastName}}))>{{.LastName}}</IF>

</FOREACH>


Is there a way I can have the above appear in one pop-up prompt as opposed to two separate ones? I need to also have an option to click multiple names.
Mark McKenna

Re: FOREACH ASK

Post by Mark McKenna »

The system has to ask twice because the two requests are unique. A markup document is interpreted, using a sequential scanner, so the system does not recognize the presence of the second request at the time that the first request is encountered. This approach allows us to analyze the document in a just-in-time manner which provides other benefits such as the ability to suppress prompting based on the execution path of the interpreter (e.g. a prompt within an <IF> evaluated as false), and the ability to accurately nest constructs that require user interaction (e.g. a prompt within a <FOREACH ASK>).

The <FOREACH ASK> construct should already allow you to choose from multiple qualifying objects using checkboxes. Please clarify what is not acting as you'd expect as far as that goes.

Finally, and as an aside, consider using properties on Person that perform the name concatenating for you, such as {{.Name}} and {{.FullName}}. These freebies can make your coding life a lot simpler:

Code: Select all

<FOREACH ASK {{Order.OtherContact[{{.OtherType}}="Name Search"].Person}}>
{{.FullName}}
</FOREACH>
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

Re: FOREACH ASK

Post by cklahr »

Thank you very much.
Post Reply