on 02-22-2010 1:58 PM
Hi,
I have a Target field PO_ITEM where i need to pass the value always of length 5
suppose if the input field is 2 digit(45), so i need to multiply this with 10 and add leading zeros (2) in this case to make it length 5, 00450. can i do this using graphical mapping, or UDF is required. If UDF is needed, can anyone pls provide the same.
Thanks & Regards,
Varun
Hi Reddy,
First we have to check the input length, if this length is less than 5 then only we can multiply this value by using 10 later we can add zeros.
This should be possible using Graphical mapping.
Here you can use if (if with else) statement.
if (input_value.length > 4) then send the input_value as it is to the target field.
else input_value multiply 10 FormatNum(00000) then pass to the target field.
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii...
Thanks Ramesh for your reply. I have done the same thing, and its fine.
Ihad dne this using Graphical mapping.
First I had checked input length, if this length is less than 5 then only I had multiplied this value by 10 later I had used FormatNum(00000) wih 5 zeros then pass to the target field.
This should be possible using
Thanks everyone for your time.
Regards,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varun,
I would do the following:
Input -> MapWithDefault(1) -> multiply(10) -> FormatNum(00000)
The above should do the trick without UDF.
Edited by: Christian Vilhelm Henriksen on Feb 22, 2010 3:53 PM
You can leave out the MapWithDefault, its only to secure mapping wont fail if input is empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.