Skip to main content
Solved

Report Rules Expression


Forum|alt.badge.img+9

I want to create a report rule expression to use the customer ref field for an invoice, and to use the name regardless of if the user has entered this in upper or lower case.

I have created the expression = UPPER([@CUSTOMER_ORDER_IVC_REP/CUST_REF]) 

Testing if this works how I expect it to it does not work how I would expect.  It works in PL SQL, so I now suspect it is not available in the report rule expressions.  I have seen the report rule is not being used in the report rule log.

 

Does the upper function work on report rule expressions?

 

 

Thanks

Darren

 

Best answer by Tomas Ruderfelt

Is that the exact expression you use? If so it needs some small changes.

If you want to use SQL you need to put the expression in between [& and ].

Also [@CUSTOMER_ORDER_IVC_REP/CUST_REF] will give you the value of the CUST_REF so if you need to use that in SQL you should “surround” (enclose?) it with ' on both sides.

Your example would be something like this:


[&UPPER('[@CUSTOMER_ORDER_IVC_REP/CUST_REF]')]

View original

Marcel.Ausan
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • May 30, 2025

@darren j turner if the UPPER function doesn’t work applied directly in the report rule condition, you could write a SQL to get the CUST_REF from CUSTOMER_ORDER_INV_HEAD view.

See below the sintax which I think should work if you’re dealing with CUSTOMER_ORDER_IVC_REP.

[&select UPPER(cust_ref) from customer_order_inv_head where invoice_id = '[@CUSTOMER_ORDER_IVC_REP/INVOICE_ID_STR]']

 


Forum|alt.badge.img+20

Is that the exact expression you use? If so it needs some small changes.

If you want to use SQL you need to put the expression in between [& and ].

Also [@CUSTOMER_ORDER_IVC_REP/CUST_REF] will give you the value of the CUST_REF so if you need to use that in SQL you should “surround” (enclose?) it with ' on both sides.

Your example would be something like this:


[&UPPER('[@CUSTOMER_ORDER_IVC_REP/CUST_REF]')]


Reply


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