Workflow and ServiceDesk Community

 View Only
  • 1.  Checking for condition of given date with current system date in workflow

    Posted Jul 03, 2014 08:33 AM

    Hi,

    I have created a table which has a column name DateOfAction, in that column user can insert the date whenever he wants to run a task. Now, I have created a workflow which will call the task reading it from SQL. I want to check that if DateOf Action matches the system date then only the task should run. Is there any sql query or workflow component which will check for the condition that given date is equal to system date,if it matches then only proceed for further execution or else end the workflow..

    Thanks.



  • 2.  RE: Checking for condition of given date with current system date in workflow

    Posted Jul 03, 2014 08:40 AM

    There are a set of workflow date components already provided... get current date, get month, get day, get year etc. You should be able to use these.



  • 3.  RE: Checking for condition of given date with current system date in workflow

    Posted Jul 03, 2014 08:48 AM

    ya i saw that..but how do i compare that with my sql table column value???



  • 4.  RE: Checking for condition of given date with current system date in workflow

    Posted Jul 03, 2014 09:02 AM

    There is a component named Date Greater Than that I use for a similar situation.  The First Date Variable Name is the value from your query and the Second Date would use a Dynamic Model to execute the Get Current Date component. 



  • 5.  RE: Checking for condition of given date with current system date in workflow

    Posted Jul 03, 2014 09:15 AM

    With your SQL output, I'd inspect what "type" the date output is... if it's a Date/DateTime field you're fine. If it's a string, you can use the Convert String To Date comp to build a date from it. From there you can use any of the comparison components outlined in the post.



  • 6.  RE: Checking for condition of given date with current system date in workflow

    Posted Jul 04, 2014 03:26 AM

    Okay found the solution.

    Thanks all.