Applies to Infiniti v8.0 or later
Often, particularly when using a data source it is necessary to remove an unwanted word, sentence, etc. This can be achieved using a gap bookmark or auto logic question.
In the example below the text ‘and my favourite color is MYCOLOR’ will be removed if there is no color present in the database.
My name is Joe and my favourite color is MYCOLOR.
For both scenarios it is necessary to place a bookmark around the MYCOLOR part of the sentence that clearly acts as a placeholder for the color if it exists, called OpeningSentence_MyCol.
Then we must create a bookmark that marks the area to be removed if a color is not present in the data source, called OpeningSentence_MyCol_Text.
This is the more traditional approach where Intelledox detects that a value has resolved to null, nothing, empty, etc. and proceeds to remove a nominated bookmark known as the gap bookmark. To set a gap bookmark navigate to the bookmark properties and use the Gap Bookmark drop down to select an appropriate bookmark to remove if there is no value present. In our case OpeningSentence_MyCol_Text.
This technique involves using an auto logic question to remove the text if the value resolves to, null nothing, empty, etc. Add an auto logic question to the question set and create rule only to insert the bookmark, in our case OpeningSentence_MyCol_Text if the value is not equal to “”.
Hints and Tips
- The example uses a data source question but the technique applies to many other question types such as user prompt or variable.
- Be sure that this bookmark covers any leading or trailing spaces, so they are not unintentionally left or removed. In the example above a leading space is included in the outer bookmark but not the trailing full stop
- For gap bookmarks it is possible to use the placeholder bookmark as the gap bookmark, be aware that the entire paragraph will be removed if the gap bookmark is triggered rather than a portion of it.
gap bookmark auto logic unwanted content autologic