|
Tip>Designer |
|
|
Using Clauses in multiselect Lists |
|
|
Article #: |
0008 |
|
Contributor: |
Gillian Scott |
|
GF version: |
All |
|
Applies to: |
Clauses in Lists |
|
Last updated: |
June 19, 2001 |
Description
Insert a Clause into a document for each selection a user makes from a List in a Dialog.
Explanation
The results in a List are set up to correspond to specific Clauses. The selection that the user makes from the List is then referenced as a collection. The ForEachBlock task is used to iterate over this collection and an appropriate Clause is inserted for each item selected.
Click here to view a step-by-step example.
To set up this sequence of events do the following:
Create a List in the GhostFill List Editor. Set the result for each item to a suitable identifier:
Create a Clause (all in the same folder) for each item/result pair in the List. The Clause names must correspond to the identifiers in the results, i.e. each Clause must have the same name as the appropriate identifier in the List:
When you add your List to a Dialog, allow the user to select multiple list items (e.g., a Multiselect list box or Multiselect check boxes):
Insert the following FillPoints into your template (where "Medical.Records" is a multiselect list in a Dialog and "\Knowledge Base" is the folder containing the Clauses):
%[Materials=Lists.CSVToCol(Medical.Records)]%[ForEachBlock('Record',Materials)]
%[Clauses.Select('\Knowledge Base',Record)]
%[EndBlock()]
At run time the user will make a selection from the Medical.Records list and based on this selection the relevant Clauses from the Knowledge Base folder will be inserted into the document.
Template Example
Click here to view an example in a template.
|
%[UpperCase(ToWhom)] %[Address]
%[FormatDate(Date(),'mmmm dd, yyyy')]
Re: %[UpperCase(Re)] Date of Birth: %[Calendar.Capture("PATIENT'S DATE OF BIRTH",Date())]
Dear %[TitleCase(ToWhom)]
We represent the above individual in connection with medical injuries sustained. Enclosed please find a medical authorization which permits you to furnish us with any and all medical records in connection with treatment to the above individual. %[^Medical=Dialogs.Capture('\Knowledge Base\Medical','',False)]
We would appreciate receipt of the following materials, marked with an "X": %[Materials=Lists.CSVToCol(Medical.Records)]%[ForEachBlock("Record", Materials)]
%[EndBlock()] Your prompt attention to the foregoing would be appreciated. We will remit the cost of copying immediately upon advice of same. Thank you for your assistance.
Yours sincerely,
WILLOWMORE RUSKMAT & SMITH Fred Willowmore
|
Click here to view a document generated from this template.
|
MS I EVANS 44 Maple Avenue Scottsville, New York USA 14546 August 29, 2001
Re: Outstanding Medical Records Date of Birth: 6/17/70
Dear Ms I Evans
We represent the above individual in connection with medical injuries sustained. Enclosed please find a medical authorization which permits you to furnish us with any and all medical records in connection with treatment given to the above individual.
We would appreciate receipt of the following materials, marked with an "X":
Your prompt attention to the foregoing will be appreciated. We will remit the cost of copying immediately upon advice of same. Thank you for your assistance.
Yours sincerely,
WILLOWMORE RUSKMAT & SMITH Fred Willowmore
|