parseInt (@Unique ID)Answered
I have application with Unique ID on, and I need calculation field that Add some number constant to Unique ID
my example for Item unique ID = 10, the right result must be 12
If I wrote "@Unique ID + 2" PODIO returns 102 (as a string)
But when I wrote "parseInt(@Unique ID) + 2" PODIO returns error: "The result is not a valid number"
What I'm doing wrong?
parseInd('INV-123')will result in NaN (ie. not a number)). But this work-around does the trick:
var uid = parseInt(@Unique ID); isNaN(uid) ? 0 : uid +2
This will return 0 if the unique id is really not a number (which shouldn't be the case after you save the app, and uid+2 otherwise. More importantly, this will let you save your calculation without Podio complaining. :)
dieKollaborateure.com - Podio Training+Consulting+Development English & Deutsch
Please sign in to leave a comment.