You are viewing limited content. For full access, please sign in.

Question

Question

Field types Integer and Long Integer descriptions

asked on July 14, 2022

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.

https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#Fields_and_Templates.htm%3FTocPath%3DDocuments%7CWorking%2520with%2520Documents%2520and%2520Folders%7CMetadata%7CFields%2520and%2520Templates%7C_____0

0 0

Answer

SELECTED ANSWER
replied on July 14, 2022
0 0
replied on July 15, 2022

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.

0 0
replied on July 15, 2022

Chad, the cloud documentation is outdated (and we'll fix that). The same field types as self-hosted are supported in the cloud too.

1 0
replied on July 15, 2022

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.

0 0
replied on July 15, 2022

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.

1 0
replied on July 15, 2022 Show version history

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.

0 0
replied on July 15, 2022

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.

0 0
replied on July 15, 2022 Show version history

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.

1 0
replied on July 18, 2022

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:

Laserfiche Server Specifications/System Limits

Repository Metadata Field Types and Field Width

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.