DannyH
Novice

how do you create an If statement in a workflow?

I am trying to create a workflow where if a field is checked then do something, if another field is checked the do something else and so forth.

 

I do not see how that is possible, can someone give me some guidance?

 

Thanks,

Danny

0 Kudos
Reply
12 Replies
Timkn
Novice

Re: how do you create an If statement in a workflow?

If depending on where you need your logic but typically that type of logic goes in the line rules to direct the workflow down one path or another.  You can also indent the rules you create to have multiple conditional logic.

 

Or somethings I'll use the If inline function (I believe Logic section) to perform an if statement.  Note inline functions can also be nested for multiple if statements.

0 Kudos
Reply
Quintin209
Novice

Re: how do you create an If statement in a workflow?

Hi  @DannyH,



In what program are you creating your workflow?


  To what is the workflow going to be linked at? {SharePoint, SmartForms, etc}


 


There is a way you can do this in SmartForms:


 


>Create a SmartObject with required fields. {Check box = True/False Type}


>Create a view from the SmartObject


>Add/Edit button to add rule.


>350i2706E0C1C5B0686E.png


>Under actions is 3 options (Start a Workflow)-(Open a Workflow)-(Action a Workflow)


>This can be set in action by using the condition "if ### contains True/False" then "Start/Open/Action" Workflow


 


Hope this helps.


 


Regards


Quintin


 

0 Kudos
Reply
DannyH
Novice

Re: how do you create an If statement in a workflow?

timkn,

where do i do that? I dont see where on the page designer.  Do i need to use K2 Studio in order to do this?

0 Kudos
Reply
Julia
Novice

Re: how do you create an If statement in a workflow?

Hi, dherreracolumbi


 


You can use K2 studio, using the Line Rule, for more info on how to use the Line Rule can you please go to the following links below:


 



Note: the link below is from an external source


 



 


Regards


 


Julia


 

0 Kudos
Reply
Julia
Novice

Re: how do you create an If statement in a workflow?

Hi, dherreracolumbi


 


Adding to the above suggestion attached please find a pdf documentation on K2 Inline Functions.


Hope this help you.


 


Regards


 


Julia

0 Kudos
Reply
Julia
Novice

Re: how do you create an If statement in a workflow?

Hi, dherreracolumbi


 


Just wanted to follow up on this post, did you manage to create an If statement in a workflow?


 


 


Regards


 


Julia

0 Kudos
Reply
DannyH
Novice

Re: how do you create an If statement in a workflow?

No yet, still working on it.

0 Kudos
Reply
DannyH
Novice

Re: how do you create an If statement in a workflow?

is there a way to do this from the within the SharePoint workflow designer?  Ideally I would want the end user to be able to manage the workflow in there rather than K2 Studio.

0 Kudos
Reply
DannyH
Novice

Re: how do you create an If statement in a workflow?

this seems harder than it needs to be.  is it best to create the if statement in workflow or the smartform?

 

let me explain what i am trying to do with this workflow:

The document library has 7 columns, all Yes/No columns.  if the user checks one of the boxes to yes then the document is moved to specific location. 

 

So i want the workflow, if it can be setup this way, to check column 1, if yes then move to a specific location, if no check column 2, if yes then move it to a specific location, etc.

 

I feel like the form is the ideal place for this logic to exist, am I wrong?

0 Kudos
Reply