cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Calculated Fields Parsing Numbers

I have an issue with the calculated value control whereby it will parse the calculation result as an integer despite my explicit declaration that it to "save as data type" as a string. The reason this is a problem is because I want to use the value of the calculated field later in the form to filter another drop down control.

 

When I configure my calculated value control with the following formula to retrieve the first 3 chars of my drop down (after parsing the lookup and getting the value)

substring3.PNG

I correct am returned a value of "02:"

substring3output.PNG

 

However if I change the formula to return just the first 2 chars of the same drop down value

substring2.PNG

I am presented with a calculated value control value of "2". It's as though, despite as above I'm saying store the value as a string (I want to maintain the prefix of 0 if it's there) it is parsing it as an int.

substring2output.PNG

 

Does anyone know a workaround for this?

Labels: (3)
Tags (1)
Reply
10 Replies
Workflow Hero

Re: Calculated Fields Parsing Numbers

You can use a regular expression with the replace function:

replace(LambPlot ,"Smiley Sad.*?)*" ,"" )

In this case:

If LambPlot is 02: [ Ewes(3)blablabl

the regular expression will match : [ Ewes(3)blablabl

and will be replaced with empty

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculated Fields Parsing Numbers

I've also found this to be an issue sometimes. If it's a "number" string, it seems to be converted to a number regardless of what you do. I did find a little work around by using "" + yourField instead of just your field. (the concatenation of an empty string "" plus your field may fool it

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculated Fields Parsing Numbers

Thanks for the hints guys but Fernando Hunth the replace() with a regex also exhibits the behaviour. This is because the value string is passed to the faulty control regardless of how it was generated. This also occurs if I just set the formula of the calculated control to be 02, the 0 gets stripped off.

Jan Potyka​ , good hint but unfortunately it didn't work in this case

0 Kudos
Accept as Solution Reply
Not applicable

Re: Calculated Fields Parsing Numbers

Hi Stu,  This is a known issue. It was fixed in a previous build but the fix broke other functionality of the control so the fix was removed.  Nintex Development teams are still working on this issue.  There is currently no workaround.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculated Fields Parsing Numbers

Any idea when this will be fixed?  I need to use the lookup function to access numbers with leading zeros and I can't at the moment

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculated Fields Parsing Numbers

Any update on this issue?  I'm running into this issue on a current client project.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculated Fields Parsing Numbers

Nope, I ended up using javascript CAML queries to get mine complete.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculated Fields Parsing Numbers

I'm experiencing this problem as well and it is very annoying.  My temporary 'fix' is to use an uppercase letter 'O' as a stand-in for '0' for those cases where it is used only for display (with the right font it is hard to tell the difference).  Of course, this won't work when this field is needed to lookup values in another.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Calculated Fields Parsing Numbers

I contacted Nintex Support and they said their development team is targeting a fix for this issue to be part of their January product release.

0 Kudos
Accept as Solution Reply