Behavior Expression Newbie

I have an action set up (on table Districts) to go to another view within the app (table Assigned Coaches), which is set to Display Prominently. I would like the button to only appear if there are actually any assigned coaches to the district. I have a ref column set up (Short Name) that is the same on both tables.
3X_f_3_f3dc70ca277dac549c857d4948afe91feca3fd07.png

I believe the solution lies in an โ€œOnly if this condition is trueโ€ expression, but I just donโ€™t have the fluency to figure it out. Iโ€™ve tried several things with INDEX(), IN(), and CONTAINS() and have read all the help files on these. The closest I came to is:
CONTAINS(Coach Assignments[Short Name],[Short Name]=[_THISROW].[Short Name])
But this doesnโ€™t return a True/False value.

Any assistance would be most appreciated.

Solved Solved
0 3 106
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Hi @David_Hundt

Maybe this ?

ISNOTBLANK(
  FILTER("Coach Assignments",
   [District]=[_THISROW].[District]
  )
  -LIST("")
)

EDIT:
I forgot some explanations going with my answer.
With CONTAINS, you are comparing strings of characters.
I think in your case, you just want to test if an item is in a list, and more specificly if a filtered list is blank. This is why I use a FILTER combined with an ISNOTBLANK expression.

View solution in original post

3 REPLIES 3

Aurelien
Google Developer Expert
Google Developer Expert

Hi @David_Hundt

Maybe this ?

ISNOTBLANK(
  FILTER("Coach Assignments",
   [District]=[_THISROW].[District]
  )
  -LIST("")
)

EDIT:
I forgot some explanations going with my answer.
With CONTAINS, you are comparing strings of characters.
I think in your case, you just want to test if an item is in a list, and more specificly if a filtered list is blank. This is why I use a FILTER combined with an ISNOTBLANK expression.

Thanks so much, @Aurelien! It worked perfectly. I really appreciate the explanation to go along with it.

You are welcome

Top Labels in this Space