function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jnegijnegi 

How to validate filter logic before saving it to custom field while creating new view in custom visualforce page?

Hi All,

We are overriding Opportunity tab with custom tab..so need to override "Create New View" functionality as well. Now when the user click on "Add Filter Logic " link to provide custom filter logic in the text box I am saving this text into custom field on custom object. By default if 5 rows are there then in the text box I am showing  "1 AND 2 AND 3 AND 4 AND 5"

Now user can modify this filter logic like below 
Possible combination could be:

1 AND 2 OR (3 AND 4 AND 5) -     correct 
(1 OR 2) AND (3 OR 4 OR 5)   -     correct
(1 OR 2)(3 4) -                                Incorrect
(1 OR (2 OR 3 AND 4 AND 5)  -     Incorrect

Any help on validating this custom logic before saving it to custom field would be appriciated?

Thanks !
sandip bijlwansandip bijlwan
Did you get the ans ?
balram kamboj 10balram kamboj 10
Hello there !
can anyone post code for this ?  
Thanks
B
Rachita Jain 21Rachita Jain 21
I am too looking for a solution to this but in trigger.
Balagopal GBalagopal G
Hi @jnegi,
did you happen to resolve this?
I also need a similar validation.