add condition choices in the report module

Hi all,

Is there a way to add a condition in the report?

We have the following choices in the report moule:
• Equal to
• Not Equal to
• Contains
• Starts With
• Ends With

What I am trying to do is to add “Not Like” or ‘Does not Starts with’ in the options as I need to query all subjects that doesn’t match with a certain prefix?

Sorry, that would need to be a code customization.

Probably quite simple, because you would need to find the current options and clone one of them and change it… but still it requires developing.

From a quick search, I would say you could edit aor_operator_list array (and language strings)

https://github.com/salesagility/SuiteCRM/search?utf8=✓&q=aor_operator_list&type=

And then tweak this function:

https://github.com/salesagility/SuiteCRM/blob/master/modules/AOR_Reports/AOR_Report.php#L1413

You might want to check this out

https://github.com/salesagility/SuiteCRM/pull/5775

Unless you are the same person that provided that? :slight_smile:

1 Like

Hi pgr,

No I’m not the one who provided that but thank you for this.
I will try this out and see what happens :slight_smile:

Hi pgr,

It worked for me.
Thank you so much for this :slight_smile: :

Cool!

Leave a comment there on Github, it helps to know that somebody has tested it, and somebody found this enhancement useful. Thanks

I think that, since there is a PR for this we could also add some other missing operators that may be useful:
. Not Starts With
. Not Ends With
. Is Null (only for AOR Reports)
. Is NOT Null

On that other issue linked there (https://github.com/salesagility/SuiteCRM/pull/2324) Matt suggested having a “Not” checkbox that could be applied to all other operators.

One way or the other, I agree these additions would be good. Amariussi, your suggestion could also be nice to have there on GitHub, maybe you can ask the developer that proposed this to add those other options.

@Pgr: following your suggestio I proposed it to the developer.

In case he doesn’t do it how can I add the missing code myself in his PR?

Adding a NOT Operator would be even nicer but I presume it is also more complex so, for the time being I would suggest just the extra (and possibly other) operators that I suggested.

1 Like

Github let’s you add commits to an existing PR, nothing is needed to update the PR, the commits are automatically considered as part of it as long as they are made on the same branch.

But since the source repository isn’t public (I assume) you would have to make a Pull Request on that user’s repo, here:

https://github.com/oc666/SuiteCRM/tree/not_contains_condition

Then he would be notified and hopefully merge your code into his branch (thereby making it part of the same existing PR).

Another alternative is to pull his code from that branch into your local Git set-up, do your changes, make a new PR to SalesAgility, and explain that your PR supersedes the other one.