Values For Number Field Types Changing

This topic contains 2 replies, has 2 voices, and was last updated by  Dante Knapp 2 months, 1 week ago.

  • Author
    Posts
  • March 12, 2019 at 1:14 PM #33986

    Dante Knapp
    Participant

    I have a multiple fields in one of my forms that are set to be Number Field Type and then in the Field Options they are setup with 0 Decimal Places and No Style Number Format.

    Now when I enter in a value in that field for a form record, leave that record, and then go back to that record, the original value I entered, say 10, is automatically getting converted to a decimal, so my original count of 10 becomes 0.1. If I go and re-enter the original value again and then leave/return to the record, the value doesn’t change. Any idea on what is causing that issue and how I can address it?

    A similar issue is happening with Number Fields setup as a Percent Style Number Format with 0 Decimal Places. For those cases, if I enter 15 it is getting converted to 15,000.00% sometimes and other times it is behaving normally. Again, any suggestions on what is causing the issue and how I can fix it would be greatly appreciated.

    Thanks,
    Dante

    March 12, 2019 at 1:30 PM #33988

    Brendan
    Keymaster

    The Decimal Places setting will have no effect unless you set the Number Format to be Decimal. So just change it to Decimal and that should solve the problem.

    If you had a Number field that you entered a value into before you changed it to Percentage format, then that could explain why you’re seeing such a large percentage value. It’s because when Tap Forms stores a percentage value, it actually stores a decimal value between 0 and 1. 0 = 0% and 1 = 100%. Anything higher than 1 will be more than 100%.

    But when you already have the Percent Number Format specified, Tap Forms should convert whatever value you type into a small decimal value. E.g. typing in 10 should be stored as 0.1

    March 12, 2019 at 2:39 PM #33989

    Dante Knapp
    Participant

    FYI, with the decimal issue, those number fields are just inventory counts and the fields were set with NO Style Number Format, but if a user entered in count of 125 or 5 it was converting that to 1.25 or 0.05; however, it is not always doing this and when I tested it multiple times no conversions happened, but then on another test it did it again. Additionally, sometimes it is doing the conversion immediately after entering the value and moving to the next field of the record or it is doing it after you exit the record and come back to it. I have had the same hit or miss outcomes even after setting some of those number fields as Decimal Style with 0 Decimal Places.

    As for the fields that have always been set to Percentage Format, that issue also seems to be really hit or miss with respect to it converting the original value. I have tested it out a few times now, and for example sometimes it will convert 35 to 3,500%, 35.0 to 3,500%, and other times 35 will just stay as 35%. In other testing when I enter the percentage as a decimal value it works properly sometimes and other times it doesn’t. For example, if I enter 0.25 it will show correctly as 25%, but then again I have entered 0.05 and get 0% versus 5% sometimes and others it will correctly display it as 5%. These conversions have all happened immediately after entering the value and hitting done or next.

    There really does not appear to be any rhyme or reason to when it is or is not having these issues, but one thing that has stayed consistent, oddly, is that if I go and re-enter the correct count value or percentage value after the conversion issue has happened, the correct values that were re-entered have remained after exiting the record, the document, and the app itself. Not sure if it is a bug or something, but thanks for you help with trying to address these issues.

    Dante

You must be logged in to reply to this topic.