• 0 Vote(s) - 0 Average
  • 5
  • 4
  • 3
  • 2
  • 1
Thread Modes

SQL Condition in workflow
#1
Hello,

We are in the process of consolidating our onboarding process. We have a workflow where HR puts in an initial Service Request with employee information which goes to another group of users which fill out a questionnaire detailing what the employees need. It is a 5-part questionnaire - Account/Hardware/Software/Phone/Internal Apps. At the beginning of each section, there is a Yes/No radio button on if the employee needs anything from the following section. If yes is selected, that portion of the workflow should be kicked off. If no, it is not. 

Our current conditional step is : 

SELECT question_id
FROM sd_question_result 
WHERE request_id = @@ID@@ 
AND question_id = xxx 
AND result in ('1')

However we have modified this conditional step, the workflow never proceeds. We have been trouble shooting this for a couple days now and any help would be greatly appreciated. Please let me know if I can provide any other information.


Chris
cbarnett, proud to be a member of EV CONNECT FORUM since Oct 2019.

#2
Not sure I see anything immediately wrong with it but I might change the syntax slightly and use the Question Code as how I identify my records:

Select TOP 1 SD_QUESTION_RESULT.REQUEST_ID
from SD_QUESTION_RESULT inner join SD_QUESTION
on SD_QUESTION_RESULT.QUESTION_ID = SD_QUESTION.QUESTION_ID
where SD_QUESTION.QUESTION_CODE = 'CODEVARIABLE'
and SD_QUESTION_RESULT.REQUEST_ID IN(@@ID@@)
and SD_QUESTION_RESULT.RESULT = '1'

In your questionnaire configuration set the question code for the radio button to be something like needsaccount / needshardware / etc. and then replace the CODEVARAIBLE value in the above SQL.
Andrew E. Reynolds
Director, Professional Services

#3
Thanks for the reply. Unfortunately, still no luck. The Action moves down to the "done" section of the history but the new actions do not show up.
cbarnett, proud to be a member of EV CONNECT FORUM since Oct 2019.

#4
(11-12-2019, 02:24 PM)cbarnett Wrote: Thanks for the reply. Unfortunately, still no luck. The Action moves down to the "done" section of the history but the new actions do not show up.

Sounds like the logic is backwards in the workflow, do you have 2 arrows coming out of the step that runs the SQL statement? If you reverse the arrows does it work as expected?
Andrew E. Reynolds
Director, Professional Services

#5
I attached a screenshot of part of the workflow. 'POC onBoarding questionnaire' is where the question is answered and 'Is XXX required?' is the conditional step that checks the answer. The other three arrows are going to three other identical conditional steps (aside from the question_code).

We have had an incident open for about a week but haven't gotten a solution yet. Hoping that it is not a bug.

Thumbnail(s)
   
cbarnett, proud to be a member of EV CONNECT FORUM since Oct 2019.

#6
(11-12-2019, 03:36 PM)cbarnett Wrote: I attached a screenshot of part of the workflow. 'POC onBoarding questionnaire' is where the question is answered and 'Is XXX required?' is the conditional step that checks the answer. The other three arrows are going to three other identical conditional steps (aside from the question_code).

We have had an incident open for about a week but haven't gotten a solution yet. Hoping that it is not a bug.

Hello,
What is your ServiceManager version?
Have you test your conditionnal step on monitoring or sql management studio ?
Could you check the entry condition of your conditionnal step (especially for blank entry)
Could you check some log (Administration/activities/log)
Could you test your onboard questionnaire with a mini-workflow (1 conditonnal step and 1 task) 
+ Check if Yes=1 and No=2 in radio button

I test your inial sql statement with a section questionnaire and it's work fine...

P.ABBE
ABBE Philippe, proud to be a member of EV CONNECT FORUM since Nov 2015.






Users browsing this thread: 1 Guest(s)