Question

how to concat in a lobby data source

  • 25 May 2023
  • 2 replies
  • 63 views

Badge +6

In the IFS lobby data source. How do you go about appending a ‘$’ to the front of a value?

 

Below is what I am attempting to concat in the column:

CONCAT(‘$’, round(SUM(&AO.Customer_Order_Line_API.Get_Base_Sale_Price_Total(ORDER_NO, LINE_NO, REL_NO, LINE_ITEM_NO)),0))


2 replies

Userlevel 2
Badge +6

Hi,

 

You can write it with “||” between the different variables/values:

 

‘$’||round(SUM(&AO.Customer_Order_Line_API.Get_Base_Sale_Price_Total(ORDER_NO, LINE_NO, REL_NO, LINE_ITEM_NO)),0)

 

For ex, if order_no=100 and line_no=2 :

sql query :
      SELECT ‘Order: ’||ORDER_NO||’ - Line : ’||LINE_NO
 
      FROM CUSTOMER_ORDER_LINE

result :
      Order: 100 - Line: 2

 

BR, 

Pierre

Userlevel 4
Badge +8

Hello @bpamlin 

Use it as follows - works like a charm.

Chr(36) || round(SUM(&AO.Customer_Order_Line_API.Get_Base_Sale_Price_Total(ORDER_NO, LINE_NO, REL_NO, LINE_ITEM_NO)),0)

 

Reply