E9.2 How to trim in DataRequest ?

EggyPaw

Active Member
Does anyone have any idea on how to imitate SQL TRIM functionality in Data Request within Orchestrator ?
I have a data request based on a UDC but my input isnt working because of all the spaces within the feild which makes it impossible to get the value i'm looking for.

Help ?!? :p
1608321105206.png
 
You can map the output of the data request to an input in a groovy script and use the trim() function. I included a screenshot of a working example below.
1608322110187.png
 
You can map the output of the data request to an input in a groovy script and use the trim() function. I included a screenshot of a working example below.
View attachment 19020
Thank you so much appreciated , but i actually need to trim the input parameter . like when in SQL u do WHERE TRIM(KY) = 6 ;
 
Last edited:
It's the same thing. You can map the input parameter directly to the groovy script and then use the output of the groovy script in a future step or output.
 
Thank you , sorry for the late reply I was on vacation .
With the trim it didn't work so i had to refer to Lpad which worked fine based on your script too

Happy new Year
It's the same thing. You can map the input parameter directly to the groovy script and then use the output of the groovy script in a future step or output.
 
Rather than needing to go through the hassle of formatting the data for a data request against the UDC table, I do it using the form. Create a generic Form Request that passes in the System and UDC Code for the header of the form, put your lookup value in the QBE line for the code and do a select. You will get only one line back so retrieve the values you need from grid.

Creating the form request as a generic passing in the parameters will allow you to use it for any UDC table read.
 
Hello @bpizzoli i tried that but kept getting wrong or no info back from orchestration that's why i had to go through the hassle
Thanks though probably smthn in our version of orchestration
 
Does anyone have any idea on how to imitate SQL TRIM functionality in Data Request within Orchestrator ?
I have a data request based on a UDC but my input isnt working because of all the spaces within the feild which makes it impossible to get the value i'm looking for.

Help ?!? :p
View attachment 19019
In a similar case, where a result from API was passed to find something in the UDC table, I've setup the Operator as "Contain" instead "is equal to" $var_xyz, it worked fine.
 
Back
Top