My app displays alerts from an Airtable database, and alerts are given an integer priority (1, 2 or 3) in the database/Airtable.
These alerts are displayed in many ways, shapes, and forms in the app, and to make my future life easier, I want to make it easy to change the “title” that correlates with each priority number/value. (e.g. “1” correlates to “Alert”, “3” correlates to “FYI only”). Because its very possible those titles will change in the future, I want to build it so I can updated it one place, not 50.
I have a global app variable that specifies “display text” for corresponding priorities.
On one screen I’m using a repeated “card” for each open alert. I want to pull the corresponding “priority” id for each repeat item, and display the corresponding “display_text”.
I’ve arrived at the following formula, which does not work (no text is returned):
LOOKUP(FIND_BY_KEY(appVars.AlertPriorities, "id", repeated.current.fields.priority),"display_text")
However, if I change the “repeated.current.fields.priority” to a static value (like 3), it works perfectly (returns “FYI Only”):
LOOKUP(FIND_BY_KEY(appVars.AlertPriorities, "id", "3"),"display_text")
Any help is appreciated! This is the first app I’ve built in AppGyver so I’m sure I’m missing something simple but I’ve been pulling my hair out trying to get this to work as intended.
Here’s the configuration for the app variable: