I am trying to find descriptions for the field types Integer and Long Integer. How are they different than Number? This is the only documentation I could find and I can't find any field descriptions.
Question
Question
Answer
Hi Chad,
Might this be what you are looking for?
Best regards,
Jeff
Exactly thank you. I have always used Number and we had a customer asking about the integer fields, they found that this seems to be the only way to remove the 2 decimal points. It says here in the documentation that these were made for legacy support of old systems and Number is recommended, however I can't find any function that removes the decimal points entirely.
Chad, the cloud documentation is outdated (and we'll fix that). The same field types as self-hosted are supported in the cloud too.
I had researched the field type details after one of our form business processes started getting suspended when saving to the repository. Turned out someone had configured the form to use a monotonically increasing number as their custom form submission ID. The metadata field it was plumbed to was configured as an integer. When the submission ID surpassed 64,999 it exceeded the max value for the integer data type.
Same exact scenerio here. They were using integer as a way to remove the decimals and did not know of the limitation. Thats why we were looking for this official documentation. Seems like long int is simply the one to use if you want whole numbers.
Yeah. Those basically correspond with the .NET/C# integral numeric types.
A workflow "Int" is a C# "ushort" unsigned 16-bit integer under the hood with a slightly restricted range.
A workflow "Long int" is a C# "uint" unsigned 32-bit integer with a slightly restricted range.
The workflow "Number" type uses floating point numeric types which can hold ridiculously large (or small) values.
Chad, to your removing decimal points question, using a Workflow Token Calculator activity's Round(), RoundUp(), RoundDown(), Floor(), or Ceiling() functions are the recommended methods to convert a decimal value into an integer.
Round() does what it says, RoundDown() and Floor() are equivalent to dropping the decimal component.
Well this is what the customer was diving into with us on the call, instead of using the LF docs they went to a public doc which told them that an integer is -2,147,483,648 to 2,147,483,647 and they were getting really frustrated with being told to stop at 64,000. It was all new to me.
So my first step was to get official documentation from LF. We got that now and it clears things up.
They are not working in WF though, and just want a field that does not include a decimal at all, so long interger sounds like the one they need.
Yeah, that's the range for a "signed (+/-) 32-bit integer". Always good to verify the specific type because there are often several variants of different sizes/ranges, especially with numeric types.
Since you're interested in repository metadata fields rather than Workflow tokens, you might find these useful general references to have on hand next time someone asks: