Skip to main content
TMaier
Helper ⭐️
October 8, 2021
New Idea

Stop automatically adding parenthesis to filter logic in report builder

  • October 8, 2021
  • 20 replies
  • 672 views

Recently (possibly with the switch to HA reporting), the report builder has started automatically adding outside parenthesis to filter logic statements. This is unnecessary, and when I need to add specific subclauses I have to go in and clean it up. 

 

Example: A AND B AND C is saved as (A AND B AND C) - the parenthesis don’t serve any purpose. 

I would like to add a D OR E subclause to the logic. So I put the new filters in place, and need to end up with A AND B AND C AND (D OR E). I’ve got to go clean up the automatically-added parenthesis, which never did anything anyway. It would be more convenient if those weren’t added in the first place.

20 replies

gunjanm
Expert ⭐️
October 8, 2021

A and B = (A and B) but the ( ) adds unnecessary characters when trying to make simple changes. For us admins who have been doing this for years at this point and have that muscle memory, throwing in a few more characters impacts our workflows HUGELY. 

Gunjan
darkknight
Expert ⭐️
October 8, 2021

:100:

Jeff Kirkpatrick
Cornelia
Contributor ⭐️⭐️⭐️⭐️⭐️
October 12, 2021

Hello @TMaier, thank you for posting on Community, looping in our Product Manager to look into this and get back to you. 

bradley
Expert ⭐️
October 12, 2021

good call out @TMaier 

Azad
Gainsight Employee ⭐️
Gainsight Employee ⭐️
October 13, 2021

I agree seems to be weird once the logic grows big. 

Alternative would be to follow what most IDE’s in the world do put a closing parenthesis once a new one is opened it keeps the subclauses intact and also prevents people from having to remember to close them out .. ? 

Thoughts ? @gunjanm  @bradley @TMaier 

PM- GS Home and Analytics
TMaier
TMaierAuthor
Helper ⭐️
October 13, 2021

Azad, unless my memory is way off the old system just didn’t automatically add parenthesis at all - it was on the user to define those if they were needed. It seems cleaner and easier to return to that method because the only time parenthesis would be relevant is when a subclause is required and then I’d already be defining it with the required parenthesis.

 

If you were to automatically add parenthesis in any way, the problem you’d face is correctly predicting the user’s intentions which seems tough. Leave that to us.

Azad
Gainsight Employee ⭐️
Gainsight Employee ⭐️
October 13, 2021

@TMaier  - my suggestion was to only add the closing parenthesis by default when you open one so that it’s easier to know when you form a sub clause 

We would remove the parenthesis that exist today that do not add value .. 

PM- GS Home and Analytics
TMaier
TMaierAuthor
Helper ⭐️
October 13, 2021

How would you know where to add the closing parenthesis? At the end of the entire statement would be my assumption, but that gets wacky if I edit logic to create subclasses anywhere before the end and close it myself. 

I assume that the automatic addition is only made when the user saves their logic, which means it won't be visible in real-time and I think that would lead to even more confusion.

Azad
Gainsight Employee ⭐️
Gainsight Employee ⭐️
October 14, 2021

 

 

@TMaier  - Here is the example - There are three  things happening here 

 

  1. There are no unneccessary parenthesis being added 
  2. As soon as you Open a parenthesis the cursor move ahead one step to allow you to start typing in the sub clause space 
  3. A closed parenthesis is also added right after your cursor moves ahead so that you do not have to add one yourself. 
PM- GS Home and Analytics
TMaier
TMaierAuthor
Helper ⭐️
October 14, 2021

That looks good, except in instances where I am editing existing logic - how would it handle that?