Hello,
I want to use the List Box to allow users running a workflow to select which fields to filter on. All the examples I have seen in the discussion forums have been using the List Box to select filter values rather than the fields to filter. Does anyone know if this is possible?
Ok. so first off swap from listbox to dropdown - dropdown takes in 1 selection - listbox takes in many as I understand it you will be filtering:
[field]=null()
as opposed to:
"hello" in (names of field1,field2,etc)...
understand type requirements and set up your dropdown so that whatever fieldtype is in your expression works with the dropdown field... next configure your action tool to replace [field1] in your expression.
hit run - you'll need to do this to populate your dropdown.
hit the app wand button.
So what I am looking to do is to specify which fields I want to filter on using the listbox tool. The user would select all the application fields that should be filtered on and then the filter function would be updated accordingly. For illustration purposes I've included the filter formula with the X's being the field names that would be updated based on the users selections from the list box.
[X1] != "NO" OR [X2] != "NO"
I can't say that won't work -that would be levels easier with a transpose and then a compare you'd use a listbox - create a list and use an [name] in ("test") where your listbox action tool updates "test" (with the quotes) and your value ="NO"
every field updated requires a separate action tool - so you'd potentially have to have as many action tools as potential fields you have... You could use some crazy dynamic replace system to build out your logic and then send that into your filter via batch macro - but you probably want to do the version outlined in the first paragraph.
Hi @ekurutz,
I bring good news! This is possible with a single action tool, at least to my understanding of your goal!
Just create a custom list in your listbox. You'll make use of the separator and the end values to build your formula-- I hope you have a rather short formula, or else it'll be a lot of typing.
The results are better seen using the debug workflow:
Here's my configuration:
Here are the debug results:
I've attached the sample workflow for reference. I used a crosstab to quickly get sample data-- you won't need it.
If this helps, please consider marking it a solution so others may find it.
Happy solving!
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |