yeah, just need to add the record number in as another field, so you can change it to:
shared stringvar allNames;
shared stringvar rec;
local numbervar ind := instr(allNames, "|" + Name + "^");
local numbervar carat;
if ind>0 then (
carat := instr(ind, allNames, "^");
ind := instr(carat, allNames, "|");
rec := mid(allNames, carat+1, ind - carat - 2);
"Y"
)
else(
allNames := allNames + "|" + Name + "^" + RecordNumber;
"N"//or could be "" the empty string
)
then in another formula you can access the recordNumber via
shared stringvar rec
Glad I could help.