Forms data population

Working on a form trigger for an automation and trying to see if what i have in mind is possible.

What I would like to do is have a form with a picklist and button. when selected it will use that value to determine which path in the automation and call another automation. I think that part is simple. The thing I dont know how to do is when an option is selected in the picklist, to get the last successful processed date of the matching automation. So if they selected “process CC payments” it would look at the matching automation and retrieve the last process date, populate a field on the form so the user knows when it last processed.

is this possible?

I couldnt see any way to do this directly but maybe by storing the last process as a keyvalue each time that particular automation runs and retrieving that when needed?

Hi Brent,

Yes, what you describe can be done!

So to handle the last exec date, you will indeed do as you thought and have the child automation store its last completion date via an action that takes the current date and puts it into the database as a keyvalue. The keyvalue should be stored in a manner such that part of the lookup is based on the selected item in the picklist.

You can use one of these built-in mappings to get the current date, depending on the needed format:

On the form automation side, I would consider a design like this:

If the picklist is static data that can be entered into the form design, do it in the trigger form.

Otherwise the trigger form can be a “getting started” form that just displays a welcome message. Then the initial action(s) will be to fetch and build the picklist items dynamically. Then an action form displays the picklist.

After the picklist item is selected, use a lookup table action to fetch the last exec date based on the selected item from the picklist.

Then you can use another form action to display that fetched date.

Maybe you have way for that form to confirm the choice. Then the automation uses conditionals to determine if the execution is to proceed and which automation to execute.

As a reminder, be sure to use “next” as the form submission message when subsequent forms are to be displayed:

We are planning on improving that mechanism to make it more obvious.

Also, if you look closely in the screenshot you will see we added many new form UI controls for the next system release, including Multi-Select List, Date Time Picker, Signature, and File Download. Hope to get the new release installed on your systems sometime this month.

Robert

awesome. thanks.

yeah i didnt know if there was a system value for last executed datetime or something or if i would need to store it specifically.

i will give this a try. thanks

Hi Brent,

FYI we have now enhanced the form editor so that a picklist is shown at the top (when enough horizontal space is available) that can be used to control the form’s last submitted message value which in turn controls the form’s submit behavior. If the last submitted text is manually edited, the picklist is updated accordingly.

The new release will be installed to your systems in the next week or two.