IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Remove Leading Zeroes Options · View
Sue Allen
Posted: Thursday, July 15, 2010 7:22:27 PM
Rank: Newbie

Joined: 12/8/2009
Posts: 4
Location: Michigan USA
We need to remove leading zeroes from a character string. I have mapped a function to do this (image below) but it only removes the first leading zero.

Is there a simple way to have this function called repeatedly?


Sue Allen attached the following image(s):
sample.jpg

vlad
Posted: Thursday, July 15, 2010 7:29:45 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Yes, you simply recursively (not repeatedly) call the function itself. Just drop your function (like you would do with any other function) connect the result of "substring-after" to its input and the result of it to "if". You only need to make your function non-inline before you can recursively call it.
Sue Allen
Posted: Thursday, July 15, 2010 7:36:04 PM
Rank: Newbie

Joined: 12/8/2009
Posts: 4
Location: Michigan USA
Tried that and got "Circular referencing encountered". New image attached. What am I doing wrong? :-(


Sue Allen attached the following image(s):
sample2.jpg

vlad
Posted: Thursday, July 15, 2010 7:38:21 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
No, you need to drag & drop your function from the libraries window - same way as you did it with substring-after
Sue Allen
Posted: Thursday, July 15, 2010 7:40:37 PM
Rank: Newbie

Joined: 12/8/2009
Posts: 4
Location: Michigan USA
BRILLIANT! You have vastly improved my day!!! THANK YOU!!!

For any future folks who end up here, the final image of the function map looks like this.


Sue Allen attached the following image(s):
solution.jpg

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.