Forum Discussion

tempranello's avatar
tempranello
Advocate I
10 years ago
Solved

Test for a number

Hi there   I must be losing it...this seems such a simple thing to do, but I'm blowed if I can sort this out myself.   I've a column of type text in a query that may or may not contain text or a ...
  • chrisu's avatar
    10 years ago

    I think you want to use Value.Is.  To check if a value is text, it would look something like this:

     

    Value.Is([Column],type text)

     

    To check for a number, it would be:

     

    Value.Is([Column], Int64.Type)

     

    Value.Is returns a boolean true/false, so you can wrap it in an IF.  

  • Anonymous's avatar
    Anonymous
    8 years ago

    Worked for me. Thank you!

     

    if Value.Is(AlphaNumeric, type text) then AlphaNumeric else Number.ToText(AlphaNumeric))