on 02-14-2007 2:30 PM
hi,
Need a slight help on mapping. Trying to map a source field which is 5 characters to a destination field on the target side which is 10 characters. The way the mapping should work is that since the source field is only 5 characters, 5 leading zeroes will be added to the final output when it is mapped to the target destination.
Can u suggest a way to do this. Do i need to write a UDF or can we accomplish this with any standard message mapping functions.
Hi yes,
with UDF:
+ while (MyString.value.indexOf(' ')>-1)
{
MyStringOutgoing.value =
MyStringOutgoing.value.replace(' ','0')
}
return MyString;+
Regards Mario
Message was edited by:
Mario Müller
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradip,
Make a constant 00000.
Then do this in graphical mapping: use concat function - first argument 00000 and second argument source field
Constant(00000)------->
; concat function -> target field
source field -
>
This may solve your this query.
Thanks,
Rajeev Gupta
Message was edited by:
RAJEEV GUPTA
Message was edited by:
RAJEEV GUPTA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
As I understood that you need to generate the 10 charachters length in the target filed...
Use formatnumber form the arthimetic funcitons..
how to implement:
source field>formatnumber-->targetfiled.
In formatnumber function you need to specify hw zeros you want.
Please let me know ur problem is solved or not?
Thanks and Regards,
Chandu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pradip,
Just use format number in the standard functions available. It will only work if your input is in numeric format.
If you want to add directly 5 leading zeros without knowing the length of incoming input then you can concat with 5 zeros.
else UDF will help you.
...Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use Standard CONCAT function.
Use A Constant with the 5 Zeroe's and then use Concat to concat this with your Source Field and map output of Concat to the target field.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.