Run If - basic parameters


Badge +6

I have a workflow where i am trying to set up a triple level authorisation. This is the workflow at present: Most of the following questions are for the right hand branch

198625_pastedImage_5.png

Level one - is the job request outside office hours? For this i have set up a yes/no on my form/list. I have also put a "set a condition" action on my workflow asking this question.

Second level. If the answer is NO then is the job £2500 or more? I have set a Run If Box for this:

198622_pastedImage_2.png

Third level. If the answer is yes then is the job £8000 or more? I have set a Run If box for this:

198623_pastedImage_3.png

I have columns in my list that have the values of £2500 & £8000 by default, the idea being that i can change the default value "on the fly" without having to worry about any other areas.

The problem i have is that the managers - the right hand side of the workflow - are getting email notifications regardless of the fact that it might not require authorisation (IE is it inside office hours & Under £2500 OR it is outside office hours but LESS THAN £8000)

I am not entirely sure what the resolution is to this. I am certain it is a simple thing but cannot fathom how to fix it.

I should mention that the left branch are required to authorise every document.

It is only those that are either inside office hours but over £2500 or outside office hours Over £8000 that require the extra managers authorisation in order to proceed to the next step.

Can anyone spot what i am missing or doing wrong?


29 replies

Userlevel 4
Badge +7

Hi

Your run if actions are empty. you need to put the actions inside these so they will only run if your condition is met. if the condition isn't met it will carry on which is why the email notifications are always being sent

Badge +6

Empty?

I have set them up as described above?

Userlevel 4
Badge +7

Sorry, should have screenshotted last time.

They need to have actions in them that only execute when your condition is met

198628_pastedImage_2.png

Paul

Userlevel 4
Badge +11

Hi Peter,

just below "Run if" action there is a border with a position where you can move/add workflow actions. All the actions inside the border will be executed only if the condition in the "run if" is true, all action outside the run if will be always executed, so I think you need to move the notification and the assign flexy task inside each Run If if you want that these are executed only for values bigger than 2500/8000.

Hope it's helpful!

Giacomo

Badge +6

Right! it has taken me a while to get back to this - but here is how i see it:

Can u confirm if you agree that this is correct?

198669_pastedImage_1.png

MEGA helpful by the way.....

Pete

Userlevel 4
Badge +11

Hi Pete,

yes, right now the notification and the task get executed only if the condition in the run if is met.

Giacomo.

ps.if your question is solved, please mark one of the answer as correct happy.png

Badge +6

Hmm - i am sure it is a basic setting - but i just did a trial run & the PT branch of the workflow (my very first piccie) got an email. But even though the new entry had a value of £8200 it didnt send the "managers" group an email.

Encouragingly the next step executed fine so i know that my basic steps are correct. It is just this "WhatIf" area that i cannot debug!

Userlevel 4
Badge +11

Hi Peter, if you look at workflow history for that item you should see a graphical view of what action have been executed, so you can see which notification has been fired and/or if the executed branch is the correct one.

An additional thing you have to check is: you have mentioned that an email should be sent to the managers group, is it an AD group or a SharePoint one?

Badge +6

answer to second question - all emails are set to me while i get this working. So i got an email that i know was meant for the PT branch of the flow. Nothing came thru from the manager branch even though the value was £8200 - which well exceeds the £8000 threshold.

first question - bit more tricky this!

you say workflow history & graphical view. where is this exactly?

If i select the item this is what i see on the items tab:

198675_pastedImage_1.png

the workflows button will take me eventually to here:

198680_pastedImage_3.png

Erm - then what!?

& if i select the list tab

198676_pastedImage_2.png

there is no option to look at history

So i am a bit stuck

Pete

Userlevel 4
Badge +11

Workflow History could be find in contextual item menu (the one tied to the title column), otherwise you should find a button in the ribbon while you go to the display form (maybe also in edit form).

Badge +6

nope - still at a loss - i have never seen what you mention. Could it be that i am in sharepoint 2010?

This is as far as i can get:

198681_pastedImage_1.png

which gives me:

198682_pastedImage_2.png

non of which does anything at all......

Badge +16

go to your list that the workflow is running on.  select the drop down menu on the item you are running the workflow on - like this:

Userlevel 4
Badge +11

Hi Pete, you are looking at workflow history for Site Workflows while this is a list workflow for what I've understood, that's why you don't see anything there..

You have to go here:  (contextual item menu, tied to Title column)

or here: 

Badge +6

ooh this is getting on my wick!!.....

trouble is i am trying to work thru 2 different problems.

Gio - this list doesn't have any option to select a pull down with the workflow on it. The only "hyperlink" style column (Blue underline) is the "person creating the form" column (which is a name & doesn't have a workflow history sub menu). I am going to assume that this is a list setting issue & that i need to change a setting in the list to enable me to do what you describe?

Cassy - the separate thread that you have been helping me on - that works (viewing workflow history) but as yet non of the other stuff we have spoke about is working.

hope this helps clarify!?

BTW - you guys are legends for being so patient with me! happy.png

You may need to be patient for a little while longer yet! In my defence this really is day5 for me.

Userlevel 4
Badge +11

Contextual menu is available only near Title column, so if you have hidden that column from your view, you're not able to see it..otherwise you can get it using the second solution I've provided, by selecting an item and going to "View Item" in Items Tab in the ribbon, it should open a dialog similar to the one in my picture.

Badge +6

I basically added all of the hidden columns & found one that does it!

Thank gawd for that! happy.png

Anyhoo - back to the original question - my managers side didnt get an email:

198686_pastedImage_2.png

Tho my history says that it should've been completed OK. It seems to see that the value exceeds £8000 & has made it green but non the less it has not sent the email requesting auth.

All of the lower section (not shown) works fine. 

I have re-checked the email address etc & have republished the workflow. I then re-ran the job with a value exceeding £8000 but it still didnt send an email to the managers requesting authorisation.

Are we certain that the workflow is laid out correctly?

198687_pastedImage_5.png

I presume that the workflow history omits the fine detail that is executed after the decision is made over value?

I am totally at a loss (easy for me to do that!) as to what it is i am doing wrong here

Have you any tips on exactly what it is i need to double check or change in order to get this to work?

Userlevel 4
Badge +11

If you want, you can expand the Run if box (you can click on the small button in top right corner, so you can see if it has executed the action inside the run if (it's green because it has been evaluated, but it doesn't tell us if it evalutes true or false.. you can get it by looking internal action, if they're green, they've been executed otherwise the condition evaluates to false - and then you have to look how condition is set up)

Badge +6

Hmmm. Its evaluated it OK & then it has stopped. Could this be something to do with the value? (IE Over £8000)

as i mentioned at the start - i have a column that i have set up so that i can have a threshold i can edit later if need be:

198688_pastedImage_3.png

Is it a format issue? IE looking for a number when it is text or something on those lines? I am at a loss at the moment with this particular problem

Userlevel 4
Badge +11

Could you try to add a Log to history list action before the Run If and there you can log the value of "Approx PGM Cost" column and "PGM Value of £8000" so you can check that the values are correct? Are both number columns or they have different data types? 

Badge +6

Erm - i think i am still getting the same response!

198689_pastedImage_1.png

So this is how i set up the log in history action:

198690_pastedImage_2.png

198691_pastedImage_3.png

I assume i got this correct?

Userlevel 4
Badge +11

If the second item property is the one used as second term in the run if (from the screenshot, it could be also a variable with the same name happy.png ), yes, it's correctly configured..

Badge +6

Hello again Giacomo

I am still a tiny bit stuck with this. I have just re-tried the workflow & it is still stopping at the run if box. I have run both scenarios - inside/outside office hours & both times above the minimum threshold. It is still stopping at the run if box.

198888_pastedImage_2.png198889_pastedImage_3.png

So i am totally stuck. What are the things i should be checking?

Could it be further back? IE the issue lies with the "set a condition" box? 

198890_pastedImage_4.png

Is this box correctly configured bearing in mind what i want to happen afterwards? The input form has this as a radio button - should i change this to an option - click a radio button against a yes or a no? will this make any difference?

198891_pastedImage_5.png

Any ideas warmly welcome!

Pete

Userlevel 3
Badge +9

When you ran the workflow, what were the values for the variables that you logged in the history?  You would see this on the workflow history that was mentioned earlier in the thread.  That will let you know if the values that being passed to the Run If are what you are expecting. 

Badge +6

Good morning Brendan

Hopefully i have found what you mention here. (Obviously this is a complete list of all of the columns in mt sharepoint list)

198916_pastedImage_1.png

198917_pastedImage_2.png

This is the  workflow status for this particular job:

198918_pastedImage_3.png

As you can see i have stalled at the WhatIf box. No matter what i do i cant get this to change.

I have updated my form so that the actual answers to the "office hours" question is a Yes/No rather than a True/False - but the same result.

I did see something on another site that had only the email notification inside the Runif "box" (or branch lines) The Flexitask was outside the branch. I am reluctant to try this as it feels wrong to do it that way as in my mind that means it will run the reject/approve process whether it decides to send an email or not - which is not what i want to do.

So, if i was getting back to basics, are we certain that the condition box is correct? Is this the best way to route this part of the workflow bearing in mind the actual initial question that has been posed? This question(s) is right at the top of this thread.

Its a real puzzler (for me at least!) this one & has been annoying me for a week now!

Pete

Userlevel 3
Badge +9

Not quite.  What I was asking to see was the values that you are logging in history.  Right before your Run If you have a Log in History List action.  I'm assuming you're logging the Cost field.  So what is that value when the workflow ran?  From the pictorial workflow view, there is a link in the Workflow Information box that says "Click here to show detailed view".   That will take you do the Workflow Details page, which will show you the values you are logging in the history when the workflow runs. 

Workflow Details

Reply