Forum Discussion

AlisonCalvert's avatar
AlisonCalvert
Community Member
6 hours ago

Numeric input field and checksum calculation

I have the attached file and need help with it:

There are 4 input fields (numeric entries) per line. I want to restrict the input to 1-5; no other number should be possible.

Then a checksum should be calculated.

Can someone help me with this? I'm stuck.

3 Replies

  • Silverfire's avatar
    Silverfire
    Community Member

    One way of doing the first part is to disable the UTS, and put an error message on another slide that shows if the entry is <0 or > 5. You'd evaluate the my variable you're already using for that purpose. Another way is to convert the entry silently. In any case, once you've got an acceptable value for the N numeric field, you repeat the process for the others. 

    I'd probably go with the silent conversion, but whatever you do, make sure you include a sentence above the chart that says how the input will be treated so that the user isn't surprised. 

    About the second part -- why would you run a checksum on the data? It's not going anywhere so there's no chance of corruption. 

  • AlisonCalvert's avatar
    AlisonCalvert
    Community Member

    I need the digital root. And sorry, I don't really understand the first part at all.

  • Silverfire's avatar
    Silverfire
    Community Member

    The two methods I mentioned for part one are throwing up an error dialog when the data is out of range or silently converting the data to so that it's within bounds. Either way, once you validate the input for one field, you can do the same process with the other fields. Of course while the user is interacting with a field (say, "N"), it's a good idea to disable the other fields so people can't mouse over to them and interact with them. Hiding them is probably too disruptive, so placing an invisible box over them a good option there. You could also put them on different layers and then go from one layer to the next once you've validated the input. 

    As for the paragraph, telling the user what you're doing is always a good idea. That way they won't be confused when they see an error message or their data is converted -- they know in advance what's going to happen.