Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
robin_heijt
Creator
Creator

Fill blank within an if expression.

Hi,

My current syntax in my data load editor is this:

Load*,If("LM" ='N/A N/A','Vacant',"LM") as "Line Manager",

If("LM -1" ='N/A N/A','Vacant',"LM -1") as "Line Manager -1";

This will change the N/A (Black line) into Vacant which works fine for me.

Now I also have blank spaces (Yellow) next to N/A(See below):

merge.PNG

How can I adapt the load editor to not only fill up N/A with Vacant, but also to fill the blanks with Vacant?

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable

This should be what you want.

The statement OR will make your if statement true if any of those checks are true. But will only be false if all of them are false.

Load*,If("LM" ='N/A N/A' or "LM" =null(),'Vacant',"LM") as "Line Manager",

If("LM -1" ='N/A N/A' or "LM -1" = null(),'Vacant',"LM -1") as "Line Manager -1";

if you want more complex statements in the future, you can also put an if inside another.

Like, Mark as helpful and mark as correct if it is, it helps a lot!

Thanks

View solution in original post

5 Replies
Anonymous
Not applicable

Blanks are null()

so:

If (LM = null() ,

this will check if the fields are blank

the opposite would be:

LM <> null()

with those you can achieve what you want.

If you want a more clear answer, please explain more what you want to do.

Like, Mark as helpful and mark as correct if it is, it helps a lot!

Thanks

robin_heijt
Creator
Creator
Author

Thank you for your response, however I am still a little bit unclear as to what to do.

I want to use these if statements:

Load*,If("LM" ='N/A N/A','Vacant',"LM") as "Line Manager",

If("LM -1" ='N/A N/A','Vacant',"LM -1") as "Line Manager -1";

But in addition, I do not only want N/A N/A to be replaced by vacant, but also null values to be replaced by vacant.

How would I have to change my if statement to include this extra requirement.

Thanks.

ValeriyaBartosh
Partner - Contributor III
Partner - Contributor III

Load*,If("LM" ='N/A N/A' or isnull("LM"),'Vacant',"LM") as "Line Manager",

If("LM -1" ='N/A N/A' or or isnull("LM-1"),'Vacant',"LM -1") as "Line Manager -1";

Anonymous
Not applicable

This should be what you want.

The statement OR will make your if statement true if any of those checks are true. But will only be false if all of them are false.

Load*,If("LM" ='N/A N/A' or "LM" =null(),'Vacant',"LM") as "Line Manager",

If("LM -1" ='N/A N/A' or "LM -1" = null(),'Vacant',"LM -1") as "Line Manager -1";

if you want more complex statements in the future, you can also put an if inside another.

Like, Mark as helpful and mark as correct if it is, it helps a lot!

Thanks

balabhaskarqlik

Load *,

If(Match("LM",'N/A N/A',''),'Vacant',"LM") as "Line Manager",

If(Match("LM -1",'N/A N/A',''),'Vacant',"LM -1") as "Line Manager -1";