Dynamic Photo Icon Based on Condition of Entry

Greetings!  

I've seen a couple posts on here that get close, but nothing that is exactly what I need.  I have a card view, that is a user profile, that allows them to enter in name etc.  I want to display a badge for the level that has been completed for them, and have it be part of their profile.  

I have a table "Main" that has two columns [Level] and [ImgURL].  [Level] has rows with values of 1,2,3,4 and in ImgURL it has the corresponding image needing to be displayed.

Within the card view "UserProfile" table, I capture all of the needed information and have their existing level.  What I need, is an expression to allow the [UserImg] column to display the correct image from the "Main" table, based on their level.  So if I calculate that they are level 2, I want to reference "Main"[Level] and match "2", then display the image URL from [ImgURL] column in the corresponding row.

What would be the best way to accomplish this?

 

0 1 97
1 REPLY 1

I assume that [Level] in the "Main" table is the key column?  If so, the [Level] column in your "UserProfile" table should be set as a Ref type column to the "Main" table.    Set your user level number as you normally would.  This automatically establish the proper Ref value top the "Main" table.  

Then all you need to do is use a dereference directive to access the [ImgURL] column.  You would set the [UserImg] App Formula expression to:

[Level].[ImgURL]

 

Top Labels in this Space