Applying Conditions in webmethods using BRANCH
Let's see the syntax of how to write conditions in webmethods using BRANCH.
1. Check if First name is Bob and last name is Steves
There are two variables here in the pipeline, firstname and lastname. So the condition should be;
%firstname%=='Bob' && %lastname%=='Steves'
Note: Remember we can keep the values in single or double quotes. Both will work.
%firstname%=="Bob" &&%lastname%=="Steves"
Similarly OR condition
Check if age is less than 30 or greater then 60
There is only one variable here in the pipeline that is age
%age%<30 || %age%>60
1. Check if First name is Bob and last name is Steves
There are two variables here in the pipeline, firstname and lastname. So the condition should be;
%firstname%=='Bob' && %lastname%=='Steves'
Note: Remember we can keep the values in single or double quotes. Both will work.
%firstname%=="Bob" &&%lastname%=="Steves"
Similarly OR condition
Check if age is less than 30 or greater then 60
There is only one variable here in the pipeline that is age
%age%<30 || %age%>60
If you like this post/article, please do share your feedback in the comments section below. Thanks!!
Comments
Post a Comment