The scenario is a flow triggered by a form submission. The flow adds the form responses to an Excel file in SharePoint and then invokes a script in the file to do some additional processing.
Because the anonymous respondents can be located anywhere in the world, I needed to convert the form submission date and time stamp to Eastern Standard Time. Looking online I found the required timezone conversion function, but the example used a Compose action to invoke the function and then used the output from that to set a variable.
I don't like adding extra steps in my flows, so instead I used the Initialize Variable action to define a variable to hold the result and in the initial value field for the action I created an expression with the timezone conversion function. In the "Add a Row to an Excel file" action, I used the resulting variable for the corresponding field in the SharePoint Excel file.
This works, but I'm wondering if there is some hidden gotcha to this approach?
too late pal!
🤣
@DJ_Jamba- it looks like you headphones are going to give you a sore left ear d(-_-)b <---
Cool 😎 Glad it's sorted!
d(-_-)b
@DJ_Jamba- Nice! I'm marking your first reply as the accepted solution.
Spot on or you could use the Convert time zone action
and select that action from dynamic content instead...
@DJ_JambaThanks for the quick and informative response. Makes sense.
So in this case if I use Compose to convert the date/time, then rather than creating a variable, which as you point out isn't really varying, I would find the Compose output under dynamic content when entering the value for the corresponding Excel file column, right?
Hi @MisterDon
No gotchas. You can use a variable but the example you looked at was correct to use a Compose.
Constants (values that don't change throughout your flow) - Use Compose
Variables (values that change throughout your flow) - Use Variables
The flow will assign a variable lock on variables and if you have a lot in your flow, it can slow the flow down.
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2