Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have some code that worked fine last time I ran my job about a year ago (it is a yearly file), but now isn't giving me the same results.
Incoming data examples:
00001-010-C
00001-010-D
00001-010-E
00001-010-F
00001-010-H
00001-010-I
00001-010-J
00001-010-L
00001-010-M
Output data:
391000001001
391000001005
391000001006
391000001010
391000001010
391000001010
391000001010
391000001010
391000001010
Code:
"3910" + StringHandling.CHANGE(MiTaxINput.TaxID ,"\\D","")
I need to keep the letter at the end, but not sure what to change to make that happen.
Hi,
Please refer the below flow.
The functions are added in tMap as shown below.
The functions used are as shown below.
second_time -> row1.data.indexOf("-", row1.data.indexOf("-") + 1)
first_part -> "3910" + StringHandling.CHANGE(row1.data.substring(0,Var.second_time) ,"\\D","")
second_part -> row1.data.substring(Var.second_time+1)
I would request to spare a second to mark the topic as resolved. Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂