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))
Anonymous
4 years agoNot applicable
I did not get good results with Value.Is as I did not change the Column to numeric yet. What helped me is this:
try Number.From([Column1])-Number.From([Column1]) otherwise 1This will be 0 if Column1 is numeric no matter what kind of number it is, and 1 in case of errors. You can add bunch of these together to validate all columns once. If 0 no issues, anything othern than 0 there is an issue. Make sure to replace null values to 0 beforehand on any columns that you are validating.