Flow Designer Action Output Variable

ericgilmore
Tera Guru

Creating an Action in Flow Designer. What it does is take a Date/Time value, make it a string and pass it to the output variable.

The input section of the Action catches my RITM and a Date/Time variable (original_date).

Next I have a Script step and a Notification step.

The Script step takes the Date/Time variable (inputs.original_date) and transforms it to a String (outputs). This string value is output to a string variable (outputs.some_date).

Next is the Notification Step. I created a simple notification that I thought would be able to use this variable (some_date) as a variable in the notification on the What it will contain tab, in the Message HTML field, like this ${variables.some_date}, but no. I can use the un-altered beginning variable that I pass into the Action ${variables.original_date} but not my transformed date to string.

What am I missing here? 

1 ACCEPTED SOLUTION

ericgilmore
Tera Guru

I relented on this one. Just took step back, went to the catalog item and changed the variable type from Date/Time to Date. Now I have a simple date that'll do the job for now. If I'm pressed to pass another type of date format I'll do it at the catalog item before progressing through the flow.

Thanks for your input @hozawa , @Erik Gunther 

 

View solution in original post

14 REPLIES 14

Just to be sure, did you setup the Output for the Action? There's output for each step in the Action and there's an overall Output for the Action.

In the overall Output, it's necessary to toggle between "Edit Outputs" and "Exit Edit Mode". In non-Edit mode, it's necessary to drag & drop the output from the previous step to the value field.

Will need your help here, i am attaching screenshots here - the logs are perfectly fine for both the variables - 'foundRecords' and 'strWorkNotes' Screenshot 2025-01-09 192059.pngScreenshot 2025-01-09 192110.png

 

 

 

 

 

 

 

 

 

 

 

 

I am using the 'finalRecords' variable as input for "Look Up Records" action - but both the variables in the flow log are coming as - "Undeclared Output variable found"

Please help where i am doing wrong. Thanks

ericgilmore
Tera Guru

I'm thinking I should just break it up into 2 actions. One to get a user friendly date string  and one that accepts that date string as a variable in the notifications step.  

ericgilmore
Tera Guru

Ok, did a little bit of testing. I created another flow and split the Date/Time object to String script step from the notification step.

Action One: I pass in the Date/Time and get a String date (Readable Date) formatted nicely.

Action Two: I pass in the String date (Readable Date) and the RITM, and send out a notification.

The notification uses variables from the request:

${variables.name}

${variables.date}

Which both show up in the created notification, no problem.

 

But when I add the (Readable Date) I passed into Action Two that sends the notification, I get nothing if I use:

${readable_date}, or

${variables.readable_date}

 

But if I add the (Readable Date) data pill to an Update Requested Item Record and update something like the Description field, no problem, there's my date.

 

Again, how does one pass values created in a flow to what I guess is an external item like a notification?

ericgilmore
Tera Guru

I relented on this one. Just took step back, went to the catalog item and changed the variable type from Date/Time to Date. Now I have a simple date that'll do the job for now. If I'm pressed to pass another type of date format I'll do it at the catalog item before progressing through the flow.

Thanks for your input @hozawa , @Erik Gunther