Skip to main content

Using FME Desktop 2021. I have an existing field LicenseNumber with null values and with numeric values. I want to create a new field called License_Values into a table if the following conditions are met:

 

Condition 1

If LicenseNumber is null

Then assign null values to License_Values

 

Condition 2

If LicenseNumber is not null (it has values)

Then assign 123 to License_Values

 

I tried AttributeCreator with a Condition value but it does not work at all. All

it does is assign 123 to every record in the new field called License_Value (Condition 2) and it does not write the null values to License_Value (Condition 1) . My final objective is to have the new field with null values and 123 as long as the conditions are met.

 

image1Condition 

Thank you, much appreciated.

I suspect that LicenseNumber is not NULL but one of the other states, Empty or Missing. Put everything through an AttributeFilter and see what ports they come out of.


I suspect that LicenseNumber is not NULL but one of the other states, Empty or Missing. Put everything through an AttributeFilter and see what ports they come out of.

@Gary Nicholson​ Thank you. Yes, I added the AttributeFilter and put everything through (Null, Empty, Missing), I then connected it to an Attribute Creator with all the conditions (Null, Empty, Missing) and it works.

 

Thanks Gazza


Alternatively you can use the Attribute Has a Value clause in the condition to bypass the NULL, EMPTY, MISSING state of the attribute.


Reply