Skip to main content
Solved

Report Rule using validation on NULL for Variable is not working


Chathura Karunarathna
Hero (Employee)
Forum|alt.badge.img+9

1. Create a Report Rule with condition Expression 1 [#Email] (variable email) equals NULL (= '')
2. Print the report and ensure the email field is blank
3. Report Rule says FALSE

Have anyone ever come across this.

Best answer by ChanakaAmarasekara

Hi,

As both expression1 and expression2 needs values you can give null there. You will have to do a SQL validation using nvl() or you can write your own sql logic in a method an call that. If it's only null you can do it as in the attached picture.

Expression1 > [&SELECT nvl('[#Email]', 'true') FROM dual]

Operator =

Expression2 > true

Regards,

Chanaka

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

ChanakaAmarasekara
Hero (Employee)
Forum|alt.badge.img+15

Hi

It’s not clear on how you have configured the rule.

Can you add a screenshot of the report rule, the condition and actions you have configured. Would be helpful if you export and rule and add that too.

Regards,

Chanaka


Chathura Karunarathna
Hero (Employee)
Forum|alt.badge.img+9
ChanakaAmarasekara wrote:

Hi

It’s not clear on how you have configured the rule.

Can you add a screenshot of the report rule, the condition and actions you have configured. Would be helpful if you export and rule and add that too.

Regards,

Chanaka

@ChanakaAmarasekara Please refer the attached document.
Kind Regards,
/Chathura.


ChanakaAmarasekara
Hero (Employee)
Forum|alt.badge.img+15

Hi,

As both expression1 and expression2 needs values you can give null there. You will have to do a SQL validation using nvl() or you can write your own sql logic in a method an call that. If it's only null you can do it as in the attached picture.

Expression1 > [&SELECT nvl('[#Email]', 'true') FROM dual]

Operator =

Expression2 > true

Regards,

Chanaka


Chathura Karunarathna
Hero (Employee)
Forum|alt.badge.img+9
ChanakaAmarasekara wrote:

Hi,

As both expression1 and expression2 needs values you can give null there. You will have to do a SQL validation using nvl() or you can write your own sql logic in a method an call that. If it's only null you can do it as in the attached picture.

Expression1 > [&SELECT nvl('[#Email]', 'true') FROM dual]

Operator =

Expression2 > true

Regards,

Chanaka

@ChanakaAmarasekara,

Thank you very much.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings