Skip to main content

Hi,

 

Is there a way to set the to email person to be either the supplier email or the user email.

 

For example - the PURCHASE_ORDER_PRINT_REP, trying to do something like the following:

 

​@JannetteC I guess this might work only when there’s a user email populated in the Print Preview window. Have you tested this? Are you getting any errors?


​@Marcel.Ausan 

I get an error in the app messages, the email address has the coalesce in it causing the issue.  Is there a way to get around this - shown below

 

 


Hi Community,

I have set the following in a report rule but on checking in the log it is always evaluated as FALSE.

 

Is this valid syntax, what I am trying to do is say if the email address has the info in expression 2 then continue.

 

 


I suspect you will need to embed a SELECT FROM DUAL statement.

[&select COALESCE (‘€@PURCHASE_ORDER_PRINT_REP/PO_HEADERS/PO_HEADER/SUPPLIER_EMAIL]’,’€#Email]’) 

from DUAL;]

Something along these lines for the email property

 


Hi ​@KIMKIMANDREW ,

I changed the expression to the following  :

The error message in the log file is this :

 

Rule ID=10 ORA-911:ERROR Evaluating Expression=''o&select CASE When Len('jannette.christie@theclancygroup.co.uk')=0 Then  ‘income.team@westsussex.gov.uk’ Else ’jannette.christie@theclancygroup.co.uk’ End from DUAL%3D]'' result_key=491559formatter_properties=LocaleCountry­GB

 

Any ideas ?


Check the use of (the right) quotes  ‘ vs `


Hi ​@KIMKIMANDREW 

When I look at the app messages this is what I see ??

 

 


I think copy and paste from the community converts single quotes to apostrophes. And this means the code doesn't work.  Try manually typing the code and use single quotes


Hi ​@KIMKIMANDREW 

I have typed it all in manually but still getting the same error in the app message.

Thanks


Just to confirm, here is a working example from my test system...

 

The SQL text is this

>&select coalesce(<sq>;@PURCHASE_ORDER_PRINT_REP/PO_HEADERS/PO_HEADER/SUPPLIER_EMAIL]<sq>,<sq>;#Email]<sq>) from dual]

All of the <sq> ‘s are single quote characters

Line 30 in the above screen shot sends me an e-mail with both the input fields for checking…

 

 


Hi ​@KIMKIMANDREW 

Success, I was adding a ; at the end of the select statement which was the issue.

Thankyou for all of your help.

 


Reply