So now I'm having a separate issue. Not sure if I should post it here or start a new thread, but here it goes:
I'm grabbing a set of people mentioned in the notes and eventually creating links to notes of those people. This chunk of code
$Mentions=runCommand("grep -o '@[a-zA-Z0-9_]+'",$Text).replace('\r',';').replace('@','');
$MyString =$FullName(find($FullName.replace(" ","").substr(0,m.size).lowercase == m.lowercase));
grabs all the people tagged with a @ and puts them in a set attribute I created called $Mentions. Since the mention may only be a partial name (i.e. pete instead of Peter) I am trying to truncate the search string to match the length of the mention. I also convert both to lowercase so that cases don't have to match and remove the space between the first and last name so that a search for "peters" will match "Peter Stouffer".
But this doesn't work! It returns an empty set.
However if I change the line to
$MyString =$FullName(find($FullName.replace(" ","").Preformatted textsubstr(0,4).lowercase == m.lowercase));
and search for "pete" it works. It seems that the size function is not working in this case. It also doesn't work if I assign
$MyNumber = m.size;
$MyString =$FullName(find($FullName.replace(" ","").substr(0,$MyNumber).lowercase == m.lowercase));
Only a discreet number works in this case. All other attempts to use .size seem to be working properly. Any thoughts?