Hi,
I am looping over a document list. Now, in that document, one of the element may be missing its value. If the value is missing in that element, i want to execute an sql command. Its its not missing the value, I will map it to some other record.
i used a map step after the loop, and then used branch step to check if the value in that element is null or not. But, its not giving me the proper results.
IS the map step is inside or outsite the loop?As your comments lit bit confuses.
Is your Branch operation is based on (evaluate-labels = true or false)?
There might be chances that your Branch operation logic (value in that element is null or not) is missing some thing.Can you elaborate more about the branch step logic that you used.
BRANCH (Without a switch and evaluate labels to true)
SEQUENCE: %val% = $null
INVOKE: sqlCommand
SEQUENCE: $default
MAP: Do the Mapping
If you're having such a construct, it may fail to check the non-existence of "val" in pipeline for cases when "val" is existing and is an empty string "" (not null). One instance where such things happen is when you process a document constructed out of an XML with tags with out any content i.e..e <tag/>. These are not missing tags.
You may wish to include the condition for checking empty values also.
BRANCH (Without a switch and evaluate labels to true)
SEQUENCE: %val% = $null || %val% = “”
INVOKE: sqlCommand
SEQUENCE: $default
MAP: Do the Mapping
Please elaborate on your question if this doesn’t solve your problem.
See [url=“wmusers.com”]wmusers.com for a discussion on using regular expressions in statement labels to be able use a single FLOW step to determine if a string is null, empty, has spaces, etc.
Hi,
Sorry for late reply. I followed Sudheer Dhurjati solution and got the correct results. Actually, I was missing the “” checking (%val% = “”) in the sequence. I was only checking it with the null keyword.
Thanks for all of you for the help and making my problem solved.