0

Multiple choice numerical output that results in more than 1 digit [ie 10, 11...etc] returns null.

Hi All,

I am hoping someone can help me out on an issue I am seeing with multiple choice selection output. 

 

I currently have 4 items to choose from in the multiple choice list. When an item is chose it returns a binary number. So for 4 single items the values are 

1, 2, 4, 8. When there is more than 1 item selected at one time it would result in the sum of the numbers of each item. So if the user selects the first and 3rd Ninox returns 1+4=5

 

All works well until Ninox needs to return a 2 digit number. For example if the 4th item and the 2nd item were chosen Ninox should return 8+2=10. Instead it returns null. This applies to everything which would be a 2 digit number. So with 4 choices to choose from when Ninox should return 11 thru 15 Ninox returns null instead of the corresponding number.

 

I confirmed this with the codes:

To see the number Ninox calculates:

 

let x := number('Invoice Canned Remark Selection');

'Invoice Canned Remarks' := x

 

My more complex model to convert the selection(s) user picks into the correct text of the items picked”

 

let x := number('Invoice Canned Remark Selection');

let mystring := "";

if x = 1 or x = 3 or x = 5 or x = 7 or x = 9 or x = 11 or x = 13 or x = 15 then

mystring := "text 1, "

end;

if x = 2 or x = 3 or x = 6 or x = 7 or x = 10 or x = 11 or x = 14 or x = 15 then

mystring := mystring + "text 2, "

end;

if x = 4 or x = 5 or x = 6 or x = 7 or x = 12 or x = 13 or x = 14 or x = 15 then

mystring := mystring + "text 3, "

end;

if x = 8 or x = 9 or (x = 10 or x = 11 or x = 12 or x = 13 or x = 14 or x = 15) then

mystring := mystring + "text 4, "

end;

'Invoice Canned Remarks' := mystring

 

Any help would be greatly appreciated.

6 replies

null
    • Alejako
    • 4 yrs ago
    • Reported - view

    Hi Jaypackman,

    I think the issue is that do you think in binary but I know  Ninox resolve in decimal.

    You can see how convert a base 10 to base 2 and more (If you like programming this)

    www.electronics-tutorials.ws/binary/bin_2.html

    Another way maybe don't use a If Then Else structure and think in change to Case Switch structure.....

    All the best for you,

    Alejandro

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view
    • Alejako
    • 4 yrs ago
    • Reported - view

    Interesting RoSoft_Steven Rooryck

    • Sean
    • 4 yrs ago
    • Reported - view
    • jaypackman
    • 4 yrs ago
    • Reported - view

    HI,

    Sorry for the delay in reply and thank you all for your feedback. RoSoft, I reviewed your references and I do agree that I can have a formula that matches the "label" of the multiple choice. But if I do it that way and later change that label then the formula will not work.

     

    Ninox return of a hexidecimal is somewhat common practice in this multiple choice type of situation and Ninox does work perfectly until the sum of the value of the choices selected is more than one digit.  This is why choosing the first and the fourth, which is 1+8 works [sum= 9 = one digit result] but choosing the second and the fourth, which is 2 + 8 doesn't work [sum = 10 = two digits]

    Should there be a 5th choice in the table, its value would be 16 [ie. values of choices 1- 5 respectively would be 1, 2, 4, 8, 16] which means that Ninox response would always be null regardless if any other selections were made becasue 16 is already 2 digits and anything selected above that would be 2 digits. 

    I guess I will try to contact support and see if this is a glitch in the program or wrong syntax and worst comes to worse I will code around the issue.

    Any other ideas would be appreciated. Thanks all for your help.

    Jay

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    If using string(multiplechoice) the results are from 0 to F  because from 9 its counts further with a,b,c,d,e,f where for example b is the hex notation of 11. Hope thos helps you a little more.

    Steven

Content aside

  • 4 yrs agoLast active
  • 6Replies
  • 911Views