How to Handle a null value from a document

Hi friends,

I am in learning stage in webMethods. i have a problem . I had created a schema . And i am sending a file to schema .After parsing the file ,in the flow service i am converting it to values and looping over the records one by one .In the record one field is empty value . if that field is empty value,i should map that field to another value. so what i did is I used a branch condition on that field .and below that Branch ,i used map and labeled as null. and took another map and labelled as default.
my idea is if the field is null ,it should go to the map labeled as null else it should go to the map labelled as default.

but when i am tracing it ,the cursor is always going to default map,even though the field is null.

so please tell me the solution for this.

Thanks in advance

Naren.

Is your label $null, not null? It should be $null.

Keep in mind that $null is different from empty. It’s possible that the field value is really there but simply an empty string.

Using a regular expression can be helpful in this case.

BRANCH on ‘myVar’
/[^ ]/: SEQUENCE – do something with a non-empty ‘myVar’
$default: SEQUENCE – do something with ‘myVar’ when it is null, empty or contains only spaces

The first label is a regular expression that is the equivalent of “execute this seqence when myVar has something other than just spaces in it.”

HTH

Hi,
Really thanks for your help . it helped me.

thanks
Naren