Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Check if field selected in DropDown is also selected in ListBox

chrisha
11 - Bolide

Hi,

 

in my macro I have two interface tools that allow to select fields from the data source. It is possible that users select a field in the DropDown which is also selected in the ListBox (among others).

If this is the case, I need to take a Detour to the Right...

 

Now, I'm struggling how to implement the Action tool to catch these cases. The ListBox is set to "Select Tool Mode", as the selection in the ListBox affects several Transpose tools. Thus, I have set the Action tool to "Update Value with Formula" with the formula

IIF(Contains("[#1]", "[#2]=True"), "True", "False")

and set to the "@value" of the Detour tool (see also the attached screenshot).

 

However, this doesn't work - the Detour always goes to the left.

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

You're very nearly there. The output of the List Box is not a string so you need to ToString it:

IIF(Contains(ToString([#1]), [#2] + '=True'),"True","False")

Sample macro attached

chrisha
11 - Bolide

Yep, that makes sense. Thank you!

Labels