|Any string replacers you set up are available to all FormFlow instances within your campus portal.|
String replacers are a type of data source. They can be used to extract that data from an external database you have set up a connection to and display information related to the currently logged in user or context. Jenzabar-provided string replacers are available on the wiki.myjenzabar.net Literal String Replacer page.
In the example below, a string replacer can be used in the email being sent to the form user to add that user's information to the email.
Create a String Replacer
1. In the FormFlow - Forms feature, click the Manage Forms link. A list of the forms in that instance of the feature appears.
2. Select the form you would like to edit. The form opens up in the same window.
3. On the toolbar, click the Tools drop-down and select String Replacers. Example
4. Click the Add icon. The Name field is now visible.
5. In the Name field, enter an easily recognizable name for the string replacer.
6. From the Literal Type drop-down, select "Static" or "SQL Fragment".
· Static is a string value that will always replace the tag. For example, you can annually update all of your forms to use the tag “@@CurrentAcademicYear”. If "2016" is entered into the Expanded Value field, then anywhere that @@CurrentAcademicYear is typed, "2016" will replace it. Static tags are infrequently used.
· SQL Fragment is a SQL SELECT statement that returns the value that should replace the tag. The SQL SELECT statement is entered into the Expanded Value field and will be executed against the database. The resulting value will replace the literal.
7. If you select SQL Fragment, the Database drop-down pick list appears. Select the database you are using to create the string replacer.
Only those databases you have established a connection with will be available to be selected.
8. From the Cache Mode drop-down select, User, Application or None.
· User means the value will only be refreshed once per user. This prevents the replacer engine from having to access the database multiple times for the user. These values are typically user specific and do not change (e.g., birthdate).
· Application means the value will be refreshed once for the entire application. All users accessing this value will receive the same response. These do not change regularly (e.g., @@SchoolMotto).
· None means the values will not be cached. The SQL fragment will be executed against the database every time it is requested. These may change frequently (e.g., @@ CurrentGPA).
9. In the Description field (optional), enter in any notes or documentation needed for administrative users defining or editing the literal.
10. In the Expanded Value field, enter in the value that will replace the literal when it is evaluated.
If the Literal Type is "Static", enter in the text that will replace the literal.
If the Literal Type is "SQL Fragment", enter in a SQL statement that will be executed against the database. The resulting value will replace the literal.
11. Click Save and Test.
12. Click Done.
Remove a String Replacer
In the FormFlow - Forms feature, click the Manage Forms link. A list of the forms in that instance of the portlet appears.
Select the form you would like to edit. The form opens in the same window.
On the toolbar, click the Tools drop-down and select String Replacers. Example
In the Literal drop-down, select the string replacer you would like to delete. The details of the string replacer appear.
Click the Remove icon. The string replacer is permanently deleted.