Skip to main content
TMaier
Helper ⭐️
Oct 8, 2021 1:57 PM UTC
New Idea

Stop automatically adding parenthesis to filter logic in report builder

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 ⭐️
Oct 8, 2021 2:00 PM UTC

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. 

Translate
Gunjan
darkknight
Expert ⭐️
Oct 8, 2021 2:05 PM UTC

:100:

Translate
Jeff Kirkpatrick
Cornelia
Contributor ⭐️⭐️⭐️⭐️⭐️
Oct 12, 2021 5:48 AM UTC

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

Translate
bradley
Expert ⭐️
Oct 12, 2021 4:34 PM UTC

good call out @TMaier 

Translate
Azad
Gainsight Employee ⭐️
Gainsight Employee ⭐️
Oct 13, 2021 10:46 AM UTC

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 

Translate
PM- GS Home and Analytics
TMaier
TMaierAuthor
Helper ⭐️
Oct 13, 2021 2:20 PM UTC

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.

Translate
Azad
Gainsight Employee ⭐️
Gainsight Employee ⭐️
Oct 13, 2021 2:29 PM UTC

@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 .. 

Translate
PM- GS Home and Analytics
TMaier
TMaierAuthor
Helper ⭐️
Oct 13, 2021 4:20 PM UTC

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.

Translate
Azad
Gainsight Employee ⭐️
Gainsight Employee ⭐️
Oct 14, 2021 6:47 AM UTC

 

 

@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. 
Translate
PM- GS Home and Analytics
TMaier
TMaierAuthor
Helper ⭐️
Oct 14, 2021 2:05 PM UTC

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

Translate