Forum Discussion
tempranello
10 years agoAdvocate I
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 ...
- Anonymous8 years ago
Worked for me. Thank you!
if Value.Is(AlphaNumeric, type text) then AlphaNumeric else Number.ToText(AlphaNumeric))
chrisu
10 years agoResponsive Resident
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.
- Anonymous8 years agoNot applicable
Worked for me. Thank you!
if Value.Is(AlphaNumeric, type text) then AlphaNumeric else Number.ToText(AlphaNumeric))
- Anonymous8 years agoNot applicable
Worked for me. Thank you!
if Value.Is(AlphaNumeric, type text) then AlphaNumeric else Number.ToText(AlphaNumeric))