Hi All,
I am a new user of Panorama X and I am very excited about this great product. Still in the learning process, I have the following issue: I am trying to search pieces of text (in a database “Documents New” and a field “Words”) for all occurrences of “product tags” that are in the database “Global Tag List” and the field “ATag” - but only whole words, not partial ones. I am trying to use the following formulas:
arraybuild(", ",
"Global Tag List",
{ATag},
{Type="Product" and searchanycase(fieldvalue("Documents New",Words),ATag)>0})
This formula works well but includes also partial matches (e.g. the product tag “Rice” pops up although it is only a partial match of the word “Price”).
I then attempted to include a regular expression for getting whole words only, having found the idea when recording a search procedure like this:
«Words» regexmatch "\b"+fieldvalue("Global Tag List",ATag)+"\b"
This works fine for individual records/tags. I then tried to integrate this regex approach into my overall formula like this:
arraybuild(", ",
"Global Tag List",
{ATag},
{Type=“Product” and searchanycase(fieldvalue("Documents New",Words),ATag) and fieldvalue("Documents New",Words) regexmatch "\b"+fieldvalue("Global Tag List",ATag)+"\b"}).
However, this formula, while being accepted in the Formula Workshop (no “red” mistakes) does not produce any result (nothing in the results box). Where is my mistake? Or, more generally, how can I limit this kind of search (searching in one text array for tags of another array) to whole words only?
Thanks for any suggestions and help.