Skip to main content

I am using the lookup runtime function to do a lookup to a list with a text column containing numbers with leading zeroes. e.g. 00234

The runtime lookup function returns "234", missing the leading zeros.

The returned data type is set to return a string.

Why is it coming back as a number rather than text? It seems to be assuming that because it only has numbers in the text, that it is a number.

Is there some way to force it to bring it back as text rather than numbers?

Hi Joanne,

I have 2013 instance so cant confirm if it might work for you, I am assuming you are using calculated control to get the value out?

Can you change the "save as Date Type" to String and see? I quickly checked on my 2013 instance and it does work, not sure if it works on 2010 instance.

219167_pastedImage_1.png

Regards,

Shrini


Hi Shrini

I have that set. 

219168_pastedImage_1.png


Hi Joanne,

It works for me though, if the save as datatype is set to "generic" then the value returned is numeric (i.e. without the 0's) but if the Datatype is "String" it does return the value with 0's included. I guess this must be a bug with the 2010 instance.

219126_pastedImage_1.png

Just for simplicity and to rule out any other data type issue do you want to test this on a dummy list and retrieve "title" column .. just to be sure that its a bug rather than any specific datatype for "TravelType or ParsedTraveltype" etc?

Regards,

Shrini


it's know calculated value control anoyance, see these my past posts

https://community.nintex.com/message/65460-re-in-request-form-if-result-is-zero-on-the-first-letter-dont-apears?commentID=65460#comment-65460
https://community.nintex.com/thread/10775?commentID=34514#comment-34563
https://community.nintex.com/message/60148-re-lookup-numbers-in-form?commentID=60148#comment-60148


I would have thought it's a no brainer. If the field is text and i'm bringing it back as text, there should be absolutely no reason why it would suddenly become a number. I guess there is no easy solution to this problem. 


I would have thought it's a no brainer. If the field is text and i'm bringing it back as text, there should be absolutely no reason why it would suddenly become a number.

everyone would expect such a behaviour.

everyone, but nintex... happy.png 

 I guess there is no easy solution to this problem. 

there is a workaround. as shown in linked threads either append a non-numeric character to the lookup() function result so that it's not convertable to a number, or pass the lookup() function result through a runtime function which's result is string.


Reply