Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Multiple Condition ifElse Activity SharePoint Workflow Visual Studio 2012

$
0
0

Hi,

While developing custom workflow, I would like to check for the "Status" field which will have three condition: Edited, Approved and Rejected. While trying to use "ifElse" Workflow Activity, I would like to implement my code in this way:

if(["Status"]=="Edited"){stateA}


elseif(["Status"]=="Approved"){stateB}

else{stateC}

But I am not being able to do so. Instead, I dragged three "ifElse" activity and wrote my code like:

1st Event Handler

if(["Status"]=="Edit") {e.result=true;}

else{e.result=false;}

2nd Event Handler

if(["Status"]=="Approved") {e.result=true;}

else{e.result=false;}

3rd Event Handler

if(["Status"]=="Rejected") {e.result=true;}

else{e.result=false;}

And assigned "code condition" to each if else branch.

I would like to know if I can reduce the number of "ifElse" Activity in any way?

Thank you.





Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>