Hello Community,
I’m facing an issue with substring matching in lookupRecords for a text column. Specifically, I want to filter rows where a text column contains a specific substring. Here’s the setup:
Tables and Columns
-
Movies Table
Genre(Text column): Contains values like"Drama","Action-Drama", etc.Box_Office(Numeric column): Box office revenue for the movie.
-
Totals Table
- I want to calculate the total
Box_Officefor all movies whereGenrecontains"Drama".
- I want to calculate the total
Formula Attempted
In the Totals table, I’ve tried:
SUM(Movies.lookupRecords(Genre.contains("Drama")).Box_Office)
But it throws an error:
NameError: name 'Genre' is not defined
What I’ve Tried
-
Verified the
Genrecolumn exists and is of type Text.But it still doesn’t seem to work with
lookupRecords. -
Explored using
CONTAINS, but that’s only applicable to list-type columns like Choice Lists or Reference Lists. (does not seem to work either if I convert the column to a Choice Lists)
Expected Behavior
I want to filter rows where the Genre field contains "Drama" as a substring (e.g., "Action-Drama" or "Musical-Drama") and sum the corresponding Box_Office.
Questions
- Does
lookupRecordssupport substring matching for text columns? - Is there a workaround for substring filtering in
lookupRecordsfor text columns? - Is this a limitation, or am I missing something in the formula syntax?
Any insights or suggestions would be greatly appreciated!