Can you use "List" for numeric fields

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Can you help me with using "List" with numeric fields
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
Yes, you can. You'll find the select from list option when you go into the properties for the numeric field.
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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 ) )



Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
Sorry, I did not realize you were talking about the List function.
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb
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)
Photo of Matthew Neil

Matthew Neil

  • 31,418 Points 20k badge 2x thumb
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.

Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb
Thanks that is perfect