
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nested IF statement help
Hi All,
I'm trying to do a nested if condition. I want to say if......phone1 is null or phone1 is 'no number' then provide me with the phone4 else phone1.
If(Len(Trim(phone1 )) >0 or phone1 = 'no number', phone4, phone1) as Phone_Number.
Please provide assistance,
Thanks
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this:
If(Len(Trim(phone1)) = 0 or phone1 = 'no number', phone4, phone1) as Phone_Number.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If(Len(Trim(phone1 )) =0 or phone1 = 'no number', phone4, phone1) as Phone_Number

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. Whats the difference between using = compared to > both would eliminate the null wouldn't it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this:
If(Len(Trim(phone1)) = 0 or phone1 = 'no number', phone4, phone1) as Phone_Number.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If phone1 is an empty string, a string with only spaces or NULL, Len(Trim(phone1)) will return zero.
I think that's what you want to test for, right?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If(Len(Trim(phone1)) = 0 or phone1 = 'no number', phone4, phone1) as Phone_Number.
So when it returns no number even after this function it means both phone1 and phone4 have no number (contains no number on file) for the specific selection in the list box right?
Thanks guys,
