I just added a Relation
field by clicking on the + at the end of the table and in the menu which pops up when the field is added, somewhere near the bottom, you should find the brand new Relation
type of field (as since yesterday, Lookup
fields officially became Relation
fields).
Then I simply selected the table References
And in Relation options
:
I clicked on Add formula
:
Which opened the formula editor where I’ve added the “all-in-one” formula just below :
References.Name.ForEach(
RegexExtract(thisRow.Text,CurrentValue).WithName(Ref,
References.Filter(Name.Contains(Ref) AND Name.IsNotBlank()).First()
)
).Filter(CurrentValue.IsNotBlank())
It extracts each reference from the text (like in the field References (as text)
) which is then stored within the value called Ref
using WithName() and then, using Filter()
it retrieves the appropriate row in the table References
by comparing the CurrentValue.Name
to the value Ref
(and this is done for each reference in References.Name
)
But If you already have the “References (as text)
” you can re-use those values in the Relation
field too (if it’s easier for you) :
In that case, the formula needed in the Relation
field would look like this :
References.Filter(
Name.Contains(thisRow.[References (as text)])
AND Name.IsNotBlank()
)
Hope this helps