Tinderbox Forum

Tinderbox Training Video - Searching sets: understanding the .format dot operator

Tinderbox Training Video - Searching sets: understanding the .format dot operator

Level Advanced
Published Date 12/29/20
TBX Version 8.9
Tags Tinderbox, Agent Query, Dot Operators, .icontains, .format, aTbRef, Note Taking
Video Length 08:58
URL https://youtu.be/GPmqTZGRduw
Example File TBX - L SearchingSets.tbx (116.9 KB)

In this lesson, I explain the use of two dot operators, .format and .icontains in the context of an agent query. Tinderbox performs and looks for exact pattern matches when searching against attributes with type set. In other words, Tinderbox sees the values as"Tech company", “Tech Company”, and “Tech” differently. So, if you were to simply use the .icontains (the case insensitive operator) to a set attribute for the term “Tech” you would only get one result, a note whose attribute includes “Tech”, as Tinderbox when searching a set only returns exact matches. So, what do you do if you want to find all occurrences of a specific word, “Tech,” in a note’s attribute? To find all occurrences of a specific word you want to, on the fly, format the set to a string using the dot operator .format. This will change the set to a string for the purposes of an agent query and now you can look for partial matches.

NOTE: If you want to play with the Action Code in this tutorial just download the example file linked above. It is all there.

TBXLSearchingSets

Reference materials

Please rate this lesson, did you find it useful?
    • :grinning:
    • :neutral_face:
    • :confused:

0 voters

1 Like