Paragraph Options

Discussions related to ReadyDoc development.
Post Reply
beverley.morrison
Posts: 2
Joined: Tue Jan 15, 2019 7:54 pm

Paragraph Options

Post by beverley.morrison »

I would like to create a yes/no drop down and based on the answer have a specific paragraph populate in the document.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Paragraph Options

Post by BobRichards »

First, a custom field would need to be created via SPAdmin > Configuration > ProForm > Custom Fields. Then fill out the dialog as follows:
CustomField1.png
CustomField1.png (16.76 KiB) Viewed 1195 times
  • Context: The context of the field would depend on the Primary context of the document. For instance, if the Primary Context of the document is {{Order}}, then the context of the custom field should be Order as well.
  • Field code: Once the context is selected, then name your field code. You will use this in the ReadyDoc code.
  • Label: Create the user prompt.
  • Field type: You wanted a drop-down list so select it.
  • Drop-down values: Set the drop-down list of values (e.g. "Yes", "No", etc.)
  • Prompt: Choose whether you would like the field to prompt when used on a document.
  • Hidden: Check to hide the custom field to prevent it from showing on the order to the users.
  • Enable this custom field: Make sure it is checked.
Once you have created your field, you simply use it in document logic, like so:

Code: Select all

<IF ({{Order.YourFieldCode##}}="Yes")>
Print this paragraph on your document
</IF>
If the user chooses "No" in the dropdown custom field, then the above IF statement will be false, and the paragraph will be suppressed on the document.
Bob Richards, Senior Software Developer, SoftPro
Post Reply