Forum Discussion

ShontaySmith's avatar
ShontaySmith
Qrew Assistant Captain
8 years ago

Can you use ""List"" for numeric fields

Can you help me with using "List" with numeric fields

6 Replies

  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain
    Yes, you can. You'll find the select from list option when you go into the properties for the numeric field.
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Chris is correct, but you need to keep in mind that "List" is used to with Text fields, so you will need to convert your number to text within the list function.

    For Example:
    List(" - ", ToText([Numeric Field 1]), ToText([Numeric Field 2]), etc )

    If you need to convert that back to a number, just a "ToNumber()" before.

    TONumber( List(" - ", ToText([Numeric Field 1]), ToText([Numeric Field 2]), etc ) )



  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain
    Sorry, I did not realize you were talking about the List function.
  • ShontaySmith's avatar
    ShontaySmith
    Qrew Assistant Captain
    Thanks, But I need to create an If Statement because I am seeing "0" if the number is blank.  And if I add the following I get an error missing brackets or etc

    var text Num1 = If (not IsNull([Number1]), [Number1], "");
    var text Num2 = If (not IsNull([Number2]), [Number2], "");


    List(",", $Num1,$Num2)
    • MCFNeil's avatar
      MCFNeil
      Qrew Captain
      You can do that, OR you can change the field properties for those fields.

      There is a checkbox, that if the value is blank, it shows as "0" in calculations.
      By default it is checked, just uncheck that box, then you wont have to do the 'IF' statements.