Test if field contains only white space
Hi,
I am still new to ADS. I have fields that contain just white spaces (1-3 spaces in a row [" "]). The ISNULL test does not FAIL these as it is not technically NULL. Is there a test for this? Note I cannot exclude every field with a space " " as many are valid spaces between two words.
Thanks
Best Answer
-
Hi Jasper,
The Function 'Is Empty' might be what you are looking for. It checks whether the value is empty. An empty value can be any of the following:
- whitespace(s)
- null
- empty list
- zero-length string
- unprintable character
2
Answers
-
NNote, I realise I can do this using 'equals' on known empty strings (e.g. equals ' , ' ',' '). However I would like something that can identify no matter how many empty spaces there are without hardcoding.
0 -
Hi Jasper
The Function 'Compact spaces' Reduces multiple spaces in input value to single space, so no matter how many spaces they will always be a single space. Equals single space character will then cover any number of repeated spaces in future
0 -
Thanks Josh. I also realised there is a built in 'Is Empty' function that can be accessed through the Transform step. I tested it and it seems to get the same result (all white space or NULL fields).
0