|
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):
|
|
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.
|
|
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):
|
|
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
|
|
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):
|
|
guest |