PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02/08/2019 9:43 AM by  Bob Canham
Dynamic Date Trigger Variables from Process Trigger
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages
PP
Analyst
Private
New Member
(7 points)
New Member
Posts:3


Send Message:

--
02/08/2019 8:20 AM
    I have a Process Trigger created for an Process Flow with 2 date trigger variables. I am trying to schedule this IPA to run everyday. I want the date variables to dynamically populate with the respective date of the day it is running. For example, if it kicks off today the 2 trigger variables should be today's date, tomorrow it should be tomorrow's date and so on and so forth. Attached is the image of what I am trying to do. What should I put in the value of the Trigger variables CheckBeginDate and CheckEndDate so that when I schedule it to run everyday it will pass that day's date to the process flow.
    Attachments
    John Henley
    Private
    Private
    Senior Member
    (9725 points)
    Senior Member
    Posts:3259


    Send Message:

    --
    02/08/2019 8:36 AM
    Don't use trigger variables, but rather just calculate the variables inside the flow based on system date, e.g. using functions like today() or todayDME(), etc.
    Thanks for using the LawsonGuru.com forums!
    John
    PP
    Analyst
    Private
    New Member
    (7 points)
    New Member
    Posts:3


    Send Message:

    --
    02/08/2019 8:54 AM

    Thanks. The reason I am using trigger variables is because sometimes users might want to run it manually for a week aside from the scheduled daily run. 

    David Williams
    Private
    Private
    Veteran Member
    (3187 points)
    Veteran Member
    Posts:1073


    Send Message:

    --
    02/08/2019 9:01 AM
    That's different than what you originally said you wanted to do and John's solution met that requirement. If you want users to enter dates, then give them access to the trigger form and have them enter the dates there.
    David Williams
    PP
    Analyst
    Private
    New Member
    (7 points)
    New Member
    Posts:3


    Send Message:

    --
    02/08/2019 9:15 AM

    Sorry new to Process Flows. Is there no way users can do both with the same process flow?

    Scenario: This will be scheduled to run everyday with today's date. It does its thing without any user input which is what we want 90% of the time. But once in a while users will want to run the same process with different date parameters with user input. Is it not possible?

     

    David Williams
    Private
    Private
    Veteran Member
    (3187 points)
    Veteran Member
    Posts:1073


    Send Message:

    --
    02/08/2019 9:23 AM
    Yes, but you have to give users a place to trigger the flow and enter the dates. The trigger form (or a copy of it) is your best option. If you're still using Lawson then you can create a version of the WFWK.1 form for this or if you're only running Landmark applications (CSF, GHR) then you can use Configuration Console to create a trigger form.
    David Williams
    Bob Canham
    Private
    Private
    Veteran Member
    (580 points)
    Veteran Member
    Posts:210


    Send Message:

    --
    02/08/2019 9:43 AM
    If you're going to give the people doing this access to the process trigger form, you can do it with 3 variables. The two date variables you have, which I would probably update to indicate they're for a manual run, and a third variable to indicate if this is for a manual run. If the 3rd variable says it isn't manual, your flow calculates the dates, if it is manual, it uses the dates from the trigger.
    You are not authorized to post a reply.