The Fields Formatter feature allows you, to convert the agent text fields into hyperlinks, images and labels. The formatter functions are especially useful to display the text fields into clickable links, viewable images thumbnails and colorful labels with custom color of your choice.
Suppose, you have a website's URL extracted in an agent field, wouldn't be it amazing, if you can just click on that link to open that webpage, instead copy-and-paste in the browser address bar.
There are 3 types of formatter functions available to use :
Note: A formatter function doesn't modify the agent result, but just display the fields result into different HTML tags and styles. So, there is no need to re-run the agent to apply the changes we made in formatter as opposed to post-processing functions where, re-running of agent is requires to see the changes in result. While in formatter, as soon the agent configuration is updated the formatted result can be seen in agent
Add a Formatter
Follow these steps to add a formatter to any field in your agent :
- Edit the agent by clicking on the
Edittab and then click on the
Editbutton on the field, you want to add the formatter to.
- Now, select the formatter from drop-down and enter the parameter value. (or leave blank, if optional parameter)
Remove a Formatter
Follow the same steps as we did, while adding the formatter to edit the field and click on
Add formatter button. When the dialog box appear, you will see the
(-) remove icon on top right corner to remove it.