Hi,
Looking for a way to use the Conditional node to change the course of a workflow based on metadata in the XML it has just read.
The %s_xml_advertiser% field will either start with the characters CP or CB - I'm unsure what to put in the right-hand field for the node to either accept or reject and thus change the path the file is then sent down.
Conditional Node XML Decision
Re: Conditional Node XML Decision
So if it starts with CP or CB is fine?
Step 1:
Read the XML
Step 2:
Read the advertiser value and save it in your variable "xml_advertiser"
Step 3:
Check if it starts with CP or CB
The whole workflow would be something like:
Step 1:
Read the XML
Code: Select all
%s_myxmlfile% = $read("%s_original_path%\%s_original_name%.xml")
Read the advertiser value and save it in your variable "xml_advertiser"
Code: Select all
%s_xml_advertiser% = $stripws($between("%s_myxmlfile%", "<Advertiser>", "</Advertiser>"))
Check if it starts with CP or CB
Code: Select all
if %s_xml_advertiser% == CP* || if %s_xml_advertiser% == CP* Then
do something
else
do something else
Re: Conditional Node XML Decision
Hi ,
Here is my method, I prefer to use regex to retrieve what you want.
Your variable %s_xml_advertiser% will be "CP" or "CB", just place a conditonal after the previous populate node
So, if "yes" -> CP
If "no" -> CB
Hope it helps.
B.
Here is my method, I prefer to use regex to retrieve what you want.
Your variable %s_xml_advertiser% will be "CP" or "CB", just place a conditonal after the previous populate node
So, if "yes" -> CP
If "no" -> CB
Hope it helps.
B.