Filtering inline list in a form

So the if-then-else column returns blank (false) for all rows, regardless of the filter options selected?

It’s difficult for me to debug without having it in front of me, but the way I would approach this is to work backwards, progressively eliminating each condition as the source of the issue.

I think this will need to be broken down into several IF columns. One for each filter to return true if the filter is empty (not selected) for that particular column, else return true if the filter matches the value in that row, else return false. Then set up a final IF column that checks all other IF columns. If any one of the other IF columns is false, then return false, else return true. Set your filter to only show rows with a final IF value of true.

Perhaps, but I’ve used this single if-then-else column with multiple filters approach a few times and it works fine. The idea is to progressively eliminate rows rather than include them. That said, there could be something in this use case that I’ve missed.

1 Like

I think it gets tricky if the option is allowed for a non-selected, or blank filter. Blank is technically not a match, but should be treated as a match to everything. Combine that with multiple filters that allow blank as an option, and you get a messy and hard to understand IF statement.

I totally get what your mean by eliminating rows, but I think this might be a case of an IF statement where we need mixed AND/OR logic that can only be replicated with multiple IF columns. Even if it could be done in a single IF column, it can become very fragile and hard to understand if you need to modify it later. I had gone down that path when I built my calculator app. I spent weeks trying to formulate IF columns that controlled each button. Every time I found a new scenario or bug in my logic, I had to completely rip apart the IF column and rebuild it (this was before we had the option to reorder IF conditions in an IF column). It’s still isn’t perfect, but ultimately I broke my logic down into several IF columns that check certain conditions more simply, then check the results in a master IF column. It made it much easier to maintain and understand.

3 Likes

yep, I get it. Sometimes you can get too clever by half and end up outsmarting yourself :slight_smile:
There is a lot to be said for keeping things simple, even if it means a bit more work.

That said, it’s just gone midnight in this part of the world, so Happy New Year!!! :partying_face:

3 Likes

If you have a clever way to do it though, I’m all for learning.

Happy New Year to you! You’re living in the future! :wink: Let me know if it’s better on that side. I still have just under 14 hours to go before I can scrap this year and start over. I’m ready to try 2020 over again.

2 Likes

Thanks for this. I’ve tried it but not working. However, the newbie in me just thought of something: are these IF columns to be added to the client list table, or a seprate working table?
The columns containing the actual filter (or lack thereof) are user specific. I fear I got this whole thing wrong as this USC filter value will only show up in one row, leaving all other rows blank in those columns.
If it’s on a separate working table I think I deserve some serious punishment for going around in circles for ~24 hours, keeping several of this community’s top experts walking around with me :slight_smile:

Happy :new: year to all!!

2 Likes

In your clients table.

If I understand how you have this setup, the User Specific Columns are in a separate working table.
What you should be doing is add a Single Value column to your Clients table for each of these User Specific Columns. That will take the value in each and apply it to every row in your Clients table.

Then you use those Single Value columns in one or more if-then-else columns to apply the filter rules to each row.

1 Like

No, they’re actually in the Clients table. No good? :frowning:

So your form is sitting on top of your clients table?

It must be.
Okay, that can still work, but you still need the single value columns in order to apply the filter choices to all rows.

Finally, the missing link :slight_smile: Thanks !!!
Seems to be working now, until we reach the next roadblock: Once user selects, for example, a specific status, it locks the entire “filter form”. The filter forms is built with tiers. This means that user first selects the client type and only then the status dropdown becomes visible, filtered to only the statuses which relate to that client type.


Edit: This “lock” happens only when selecting both a lawyer name (switch or dropdown) and any status, coming from any type.

1 Like

Hi @Darren_Murphy and @Jeff_Hager ,
How are you?
Coming back to this topic, on which you guys have been of great help.
The filter is now working in the sense that it indeed allows to “mix” between different filter options such as client type, account manager, etc.
I’d like to filter the filters. What I mean is that every time we select any given filter, it will immediately filter out all other filter criteria that don’t exist in the given filter. Yes, I used the word “filter” a lot so I’ll try to use an example:

  1. Account manager is chosen
  2. Other filters, such as client type, project status and so on, are narrowed (see how I avoided the word “filter”?) down to include only client types that the account manager has.
  3. Should also work in any given direction, for example: client type is selected, the account manager filter will now only show account manager that have that client type.
    And so on with many other filters. Each time we select any values, from any filter, it will narrow down all the other filters.
    What I’m trying to achieve here is to avoid a situation in which the client list will be filtered out to none. For example, we choose client type A and account manager B, but there’s no client that is both type A and is managed by B.

One solution I thought of, but is not very saleable, is to add relation columns to crisscross these filter. For example, in the client type configuration table (from which the filter takes the values), I’ll add a column which relates each client type to clients (from the clients table) and then add multiple lookup columns, one for each additional filter. So, we’ll have one column showing all account managers that have this client type, one column showing all project types that have this client type, etc. Should work, but a hassle to maintain and, as said, has almost zero scalability.

Any other ideas?

Thanks

ooohh, that can get tricky, but probably doable. The relation idea is one thought, but if you have multiple filters that are selected, then I suppose it can get ugly.

Instead, I think it might be better to use single value columns to carry over your filter selections to every table that’s used for the choice components. Then use similar techniques with IF columns to build a final true/false value. Then set the filter on the choice components based on that true/false in the source table of that code component.

It’s going to be a lot more columns to set it up, but I think it could work.

But you did… :thinking: :face_with_raised_eyebrow: :crazy_face:

1 Like

Wouldn’t screen value filtering work here? :thinking:
It could get pretty hairy, but…

1 Like

I think it could work, depending how involved the filtering needs to be. I’m just assuming it’s already hairy, so better to do similar filtering in each choice table, like what’s already being done for the main list.

1 Like

Yes, that was another option I was thinking about. As Jeff said, it’s all very ugly :stuck_out_tongue:

Just to make sure I fully understand, could you please provide some more insight into how exactly would you configure this?

You’re right. I have been trying to think along the same lines for both filtering processes. I just couldn’t wrap my head around how to make it scalable. Building a column forest now is doable, but what will happen if tomorrow we’ll add another filter to the party? I’m trying to avoid the need to rebuild the entire setup with each such change (could also be the removal of a filter, but that’s a long shot).
Without (or maybe with) connection to the methodology by the same name, the fundamental guideline is to have the system as agile as possible, so it can adapt to any future change. Trying to build a rock-solid skyscraper that can still swing with the wind, so that the wind won’t break it.

No, I can’t. To tell you exactly how I’d configure it, I’d need to have your app in front of me in the builder, and I’d need to study it for a while and probably ask some questions to make sure I understood all the filter rules.

But in general, what I mean is that you apply filter conditions to each of your choice components by examining the current (screen) values of each of the other choice components. And yes, I agree that by the sounds of it taking this approach could get very very hairy. So whether or not it’s a practical option, I can’t say.

Same as @Darren_Murphy. It’s really hard to say without seeing and working with the app myself. If I were to do something that would be as agile as it sounds like you want it to be, I would probably be taking some wild approach that I just can’t think of right now. I think it would really depends on the situation.

1 Like