cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Need help with date/time conversion of Parsed timestamp outputs into SS and then into SP list

I've created a flow designed to circumvent the annoying fact that you can't create recurring events in the modern SP calendar list view.  The flow takes a form response that contains the name, start date/time and # of recurrences and updates an excel spreadsheet that resides on the site with this info into the first row of the spreadsheet table. Then the spreadsheet formulas populate the following table rows depending on the number of recurrences noted.  The flow then filters the table array to just the rows in that table that contains data and parses those items. Then it creates a new SP list item for each of those separate rows.  Finally, it wipes out the data in the first row of the spreadsheet (subsequently clearing out the rows following it), making the spreadsheet ready for the next recurring event to be created.

 

The problem I'm having is this: In order to make the calendar events show the actual start time and duration in the View Events pane of the calendar view, I had to use the date/time column type in the calendar list.  The form, however, only has a date field, not date/time.  So I had to break this out into 3 separate form questions: Start time hours, Start time minutes and Start time AM/PM.  Same thing for the End time.  My flow initializes variables to combine the date and time form answers into date/timestamps that can be added to the spreadsheet.  But when it takes the spreadsheet rows and creates SP list items, the time becomes all messed up.  I tried formatting the date/time columns in the spreadsheet to be something that can be transposed to SP correctly, but that didn't work. 

 

I hate date/time format stuff.  It confuses me and I end up going round and round until I hit something that works.  I'm hoping someone here can help me.

 

I've attached my flow here. One thing to point out, each team within the department has their own SP site, with their own SP calendar and their own recurring events flow spreadsheet.  So the flow also has a switch. Depending on the team the manager selects in the form, one of 6 cases, the flow will update that team's calendar and spreadsheet.  I didn't show the switch or other cases here.  They are all identical, so I showed only one.  I'm sure there is a function I can use that I'm not familiar with to be able to get the correct time to show in the SP list, but I don't know what it is.  I tried to use a Convert to UTC expression within the Create Item step but the dynamic content for the parsed date/time outputs don't show up when I tried to use an expression.  All that is available from the parse is the Body.  I do believe I am lost....

1 ACCEPTED SOLUTION

Accepted Solutions

I have made a flow that will take the MS Form responses and convert into times that will post correctly into a SharePoint list. I know your flow has Case steps, but you can just adjust mine to fit into your Case steps.

Edit Note: I forgot to say that the use of the Array and the Do Until loop within my example flow removes the use of an external Excel file. Basically all of the work you were doing with the Excel file is now completed within the Do Until loop and the Array is used as a source of formatted datetime list just like the Excel file was.

 

There are some key things to think about when getting this to format correctly.

  • SharePoint Display DateTime
  • Daylight Savings

Your SharePoint has a local display setting that can only be changed by an administrator. It will most likely have your datetime display set to your local timezone. When you put a date into a SharePoint list that is in UTC standard time, the display settings will show it as your local time. So if you put Wednesday 2/22/2023 1:00 AM UTC into a SharePoint list, it will show as Tuesday 2/21/2023 7:00 PM.

 

If you want your SharePoint list to show the time of Wednesday 2/22/2023 1:00 AM Central Time then you need to insert into the list Wednesday 2/22/2023 7:00 AM UTC. The display settings will convert to show the correct time you want to see.

 

Daylight Savings

The use of daylight savings is very tricky when it comes to time conversion. Power Automate can accommodate daylight savings conversions, but you have to make sure to set it up properly so the conversion can happen.

I don’t have all of the secrets of daylight savings, but it usually involves using the local time converted into UTC that will give you the most accurate answer.

If you want to set up recurring schedules at 12:00 PM every Wednesday for Central Time zone you have to consider that this will look differently in UTC. So look at the chart below.

 

Wednesday 2023-02-22 12:00 PM CST = 2023-02-22 18:00:00Z UTC (6 hours difference)

Wednesday 2023-03-01 12:00 PM CST = 2023-03-01 18:00:00Z UTC (6 hours difference)

Wednesday 2023-03-08 12:00 PM CST = 2023-03-08 18:00:00Z UTC (6 hours difference)

Wednesday 2023-03-15 12:00 PM CST = 2023-03-15 17:00:00Z UTC (5 hours difference due to DST)

Wednesday 2023-03-22 12:00 PM CST = 2023-03-22 17:00:00Z UTC (5 hours difference due to DST)

 

Consider this when using your flow because you ultimately need the correct UTC time to be posted into your SharePoint list.

I’m saying all of this to understand the flow I made better and also highlight an error I made when first making this flow.

If you took your schedule time of 2/22/2023 12:00 PM CST and said you want to have it recurrence of 10 times. To convert to CST time to UTC and add 7 days for each week to reschedule it would make the time 18:00:00Z UTC for all 10 recurrences. This wouldn’t be correct when it comes to daylight savings time because the time showing in the SharePoint list would be 18:00:00Z UTC converted to CST/CDT which would be 1:00 PM in CDT.

So anyways here is the flow below.

 

The basic outline is below:

  • Format the start datetime and end datetime that comes from the MS Form
  • Have 4 separate Variables that can be set and reset to calculate for schedule recurrence.
    • Variable StartDateTime CST = value from Form
    • Variable EndDateTime CST = value from Form
    • Variable StartDateTime UTC = blank
    • Variable EndDateTime UTC = blank
  • Have a variable that counts the number of Do Until loops for recurrence
    • Variable DoUntilLoopCounter = 0
  • Have a variable that holds the number of schedule recurrence.
    • Variable Recurrence = value from Form
  • Have a variable array that holds all of the formatted datetimes.
    • Variable RecurrenceListArray = [] blank array brackets
  • Begin a Do Until loop for the amount of recurrence (example 4 recurrence)
  • Do Until will continue until the variable DoUntilLoopCounter is equal to the count of Recurrence.

Within the Do Until loop

Loop 1:

  • Put the converted Start/EndDateTime UTC into RecurrenceListArray (first item in array)
  • Add 7 days to the Start/EndDateTime CST so now you have Start/EndDateTime CST+7days
  • Convert the Start/EndDateTime CST+7days into UTC so now you have UTC+7days
  • Add 1 to the DoUntilLoopCounter so it now equals 1

Loop 2:

  • Put the converted UTC+7days into the RecurrenceListArray (second item in array aka 2nd recurrence)
  • Add 7 days to the Start/EndDateTime CST+7days so now you have Start/EndDateTime CST+14days
  • Convert the Start/EndDateTime CST+14days into UTC so you now have UTC+14days
  • Add 1 to the DoUntilLoopCounter so it now equals 2

Loop 3:

  • Put the converted UTC +14days into the RecurrenceListArray (third item in array aka 3rd recurrence)
  • Add 7 days to the Start/EndDateTime CST+14days so now you have Start/EndDateTime CST+21days
  • Convert the Start/EndDateTime CST+21days into UTC so you now have UTC+21days
  • Add 1 to the DoUntilLoopCounter so it now equals 3

Loop 4:

  • Put the converted UTC +21days into the RecurrenceListArray (fourth item in array aka 4th recurrence)
    • The loop will add 7 days to CST+21days but it doesn’t matter
    • The loop will convert the CST+28days to UTC but it doesn’t matter
  • Add 1 to the DoUntilLoopCounter so now it equals 4

Loop 5:

  • The Do Until loop will see that the variable DoUntilLoopCounter is 4 which is equal to the variable Recurrence so the loop will stop.

This is out of the Do Until loop

  • A step Select is used to map the RecurrenceListArray which treats the array as a list of items similar to a Get Items
    • Map the columns to the values of the array
  • Parse JSON of the Select
    • This will allow the use of dynamic values
  • Apply to Each of the Parse JSON items
    • Create an Item in SharePoint for each of the recurrence

Below are Example photos of the flow:

All Flow Steps OutlineAll Flow Steps Outline

Below is an example MS Form that I made and filled out to use in this example. I have submitted a schedule that starts on Wed 2/22/2023 at 10:15 AM and ends at 3:45 PM and I want it to be scheduled for 5 times.

Example Form Response SubmissionExample Form Response Submission

Below are the detail steps of the flow:

  • Format the start datetime and end datetime that comes from the MS Form
  • Have 4 separate Variables that can be set and reset to calculate for schedule recurrence.
    • Variable StartDateTime CST = value from Form
    • Variable EndDateTime CST = value from Form
    • Variable StartDateTime UTC = blank
    • Variable EndDateTime UTC = blank
  • Have a variable that counts the number of Do Until loops for recurrence
    • Variable DoUntilLoopCounter = 0
  • Have a variable that holds the number of schedule recurrence.
    • Variable Recurrence = value from Form
  • Have a variable array that holds all of the formatted datetimes.
    • Variable RecurrenceListArray = [] blank array brackets

First Part of Flow to Initialize VariablesFirst Part of Flow to Initialize VariablesSecond Part of Flow to Convert StartDateTime CST to UTCSecond Part of Flow to Convert StartDateTime CST to UTCThird Part of Flow to Convert EndDateTime CST To UTCThird Part of Flow to Convert EndDateTime CST To UTC

  • Begin a Do Until loop for the amount of recurrence (example 4 recurrence)
  • Do Until will continue until the variable DoUntilLoopCounter is equal to the count of Recurrence.

Within the Do Until loop

Loop 1:

  • Put the converted Start/EndDateTime UTC into RecurrenceListArray (first item in array)
  • Add 7 days to the Start/EndDateTime CST so now you have Start/EndDateTime CST+7days
  • Convert the Start/EndDateTime CST+7days into UTC so now you have UTC+7days
  • Add 1 to the DoUntilLoopCounter so it now equals 1

Loop 2:

  • Put the converted UTC+7days into the RecurrenceListArray (second item in array aka 2nd recurrence)
  • Add 7 days to the Start/EndDateTime CST+7days so now you have Start/EndDateTime CST+14days
  • Convert the Start/EndDateTime CST+14days into UTC so you now have UTC+14days
  • Add 1 to the DoUntilLoopCounter so it now equals 2

Loop 3:

  • Put the converted UTC +14days into the RecurrenceListArray (third item in array aka 3rd recurrence)
  • Add 7 days to the Start/EndDateTime CST+14days so now you have Start/EndDateTime CST+21days
  • Convert the Start/EndDateTime CST+21days into UTC so you now have UTC+21days
  • Add 1 to the DoUntilLoopCounter so it now equals 3

Loop 4:

  • Put the converted UTC +21days into the RecurrenceListArray (fourth item in array aka 4th recurrence)
    • The loop will add 7 days to CST+21days but it doesn’t matter
    • The loop will convert the CST+28days to UTC but it doesn’t matter
  • Add 1 to the DoUntilLoopCounter so now it equals 4

Loop 5:

  • The Do Until loop will see that the variable DoUntilLoopCounter is 4 which is equal to the variable Recurrence so the loop will stop.

Do Until Pt1 Append to Array SectionDo Until Pt1 Append to Array SectionDo Until Pt2 Convert StartDateTime CST +7DaysDo Until Pt2 Convert StartDateTime CST +7Days

Do Until Pt3 Convert EndDateTime CST+7DaysDo Until Pt3 Convert EndDateTime CST+7Days

This is out of the Do Until loop

  • A step Select is used to map the RecurrenceListArray which treats the array as a list of items similar to a Get Items
    • Map the columns to the values of the array
  • Parse JSON of the Select
    • This will allow the use of dynamic values
  • Apply to Each of the Parse JSON items
    • Create an Item in SharePoint for each of the recurrence

Fourth Part of Flow Select values from ArrayFourth Part of Flow Select values from Array

 

Fifth Part of Flow Apply to Each Create ItemsFifth Part of Flow Apply to Each Create Items

 

Below is what the outputs look like in SharePoint.

SharePoint ResultsSharePoint Results

 

I hope the steps outlined above help you make a flow that can post things correctly into a SharePoint list. If you make any changes always consider the differences that converting times to UTC and how it will be displayed in your SharePoint list based on local settings.

 

Additional Note About Flow:

The step Select that maps values requires that you manually type in the value you want to get out of the array like item()?['StartDateTime'] in the right side of the map columns. There is an issue after you save the flow that the display of the Select step will change and appear like the values are coming from the Form Response. This is just a display issue most likely caused because the column names in the array are the same to the display name of the form response values. This does not change that the values are actually being mapped from the RecurrenceListArray and not the Form Response.

Select step Display Change NoticeSelect step Display Change Notice

 

Let me know if this works for you or if you have any questions.

View solution in original post

11 REPLIES 11

Welcome back @EMY9317 

In the List Rows step did you go to the Advanced Options and DateTime Format dropdown and select ISO 8601?

 

Also can you stick 2 compose statements into the flow before your create items step and put the start and end times into it and show the output in a screenshot. I'm trying to see what the value looks like that it is trying to put into SharePoint. 

Yes, the ISO 8601 is set in Advanced Options of the List rows function.

EMY9317_0-1676663598969.png

This is the output from the Parse JSON function.  Is that what you mean?

EMY9317_1-1676663647128.png

And this is the Create Item step.

EMY9317_2-1676663778762.png

And this is what it looks like in the SP list.  It creates the correct # of events and steps the date out correctly (the End dates are wrong but I'll fix them as soon as I can figure out how to fix the times).

EMY9317_3-1676663927791.png

 

Ok I see. Is it only the End DateTimes that are incorrect?

 

Or both the Start DateTime and End DateTime are incorrect in SharePoint?

It's both.  The time entered into the form for Start time is 6:30 AM (CST) and the End time is 3:30 PM (CST).  What shows up on the SP list is Start time 12:30am and 9:30am.  Both are 6 hours behind what it should be.  I thought it was just a simple matter of converting the time zone to UTC as I've done in my other flows.  But when I try to do that with the parsed outputs, they aren't there to select.  I can select them as dynamic content directly in the Create item function....but I can't select them in the Convert expression.  Hope that makes sense.

EMY9317_1-1676664599264.png

 

I have made a flow that will take the MS Form responses and convert into times that will post correctly into a SharePoint list. I know your flow has Case steps, but you can just adjust mine to fit into your Case steps.

Edit Note: I forgot to say that the use of the Array and the Do Until loop within my example flow removes the use of an external Excel file. Basically all of the work you were doing with the Excel file is now completed within the Do Until loop and the Array is used as a source of formatted datetime list just like the Excel file was.

 

There are some key things to think about when getting this to format correctly.

  • SharePoint Display DateTime
  • Daylight Savings

Your SharePoint has a local display setting that can only be changed by an administrator. It will most likely have your datetime display set to your local timezone. When you put a date into a SharePoint list that is in UTC standard time, the display settings will show it as your local time. So if you put Wednesday 2/22/2023 1:00 AM UTC into a SharePoint list, it will show as Tuesday 2/21/2023 7:00 PM.

 

If you want your SharePoint list to show the time of Wednesday 2/22/2023 1:00 AM Central Time then you need to insert into the list Wednesday 2/22/2023 7:00 AM UTC. The display settings will convert to show the correct time you want to see.

 

Daylight Savings

The use of daylight savings is very tricky when it comes to time conversion. Power Automate can accommodate daylight savings conversions, but you have to make sure to set it up properly so the conversion can happen.

I don’t have all of the secrets of daylight savings, but it usually involves using the local time converted into UTC that will give you the most accurate answer.

If you want to set up recurring schedules at 12:00 PM every Wednesday for Central Time zone you have to consider that this will look differently in UTC. So look at the chart below.

 

Wednesday 2023-02-22 12:00 PM CST = 2023-02-22 18:00:00Z UTC (6 hours difference)

Wednesday 2023-03-01 12:00 PM CST = 2023-03-01 18:00:00Z UTC (6 hours difference)

Wednesday 2023-03-08 12:00 PM CST = 2023-03-08 18:00:00Z UTC (6 hours difference)

Wednesday 2023-03-15 12:00 PM CST = 2023-03-15 17:00:00Z UTC (5 hours difference due to DST)

Wednesday 2023-03-22 12:00 PM CST = 2023-03-22 17:00:00Z UTC (5 hours difference due to DST)

 

Consider this when using your flow because you ultimately need the correct UTC time to be posted into your SharePoint list.

I’m saying all of this to understand the flow I made better and also highlight an error I made when first making this flow.

If you took your schedule time of 2/22/2023 12:00 PM CST and said you want to have it recurrence of 10 times. To convert to CST time to UTC and add 7 days for each week to reschedule it would make the time 18:00:00Z UTC for all 10 recurrences. This wouldn’t be correct when it comes to daylight savings time because the time showing in the SharePoint list would be 18:00:00Z UTC converted to CST/CDT which would be 1:00 PM in CDT.

So anyways here is the flow below.

 

The basic outline is below:

  • Format the start datetime and end datetime that comes from the MS Form
  • Have 4 separate Variables that can be set and reset to calculate for schedule recurrence.
    • Variable StartDateTime CST = value from Form
    • Variable EndDateTime CST = value from Form
    • Variable StartDateTime UTC = blank
    • Variable EndDateTime UTC = blank
  • Have a variable that counts the number of Do Until loops for recurrence
    • Variable DoUntilLoopCounter = 0
  • Have a variable that holds the number of schedule recurrence.
    • Variable Recurrence = value from Form
  • Have a variable array that holds all of the formatted datetimes.
    • Variable RecurrenceListArray = [] blank array brackets
  • Begin a Do Until loop for the amount of recurrence (example 4 recurrence)
  • Do Until will continue until the variable DoUntilLoopCounter is equal to the count of Recurrence.

Within the Do Until loop

Loop 1:

  • Put the converted Start/EndDateTime UTC into RecurrenceListArray (first item in array)
  • Add 7 days to the Start/EndDateTime CST so now you have Start/EndDateTime CST+7days
  • Convert the Start/EndDateTime CST+7days into UTC so now you have UTC+7days
  • Add 1 to the DoUntilLoopCounter so it now equals 1

Loop 2:

  • Put the converted UTC+7days into the RecurrenceListArray (second item in array aka 2nd recurrence)
  • Add 7 days to the Start/EndDateTime CST+7days so now you have Start/EndDateTime CST+14days
  • Convert the Start/EndDateTime CST+14days into UTC so you now have UTC+14days
  • Add 1 to the DoUntilLoopCounter so it now equals 2

Loop 3:

  • Put the converted UTC +14days into the RecurrenceListArray (third item in array aka 3rd recurrence)
  • Add 7 days to the Start/EndDateTime CST+14days so now you have Start/EndDateTime CST+21days
  • Convert the Start/EndDateTime CST+21days into UTC so you now have UTC+21days
  • Add 1 to the DoUntilLoopCounter so it now equals 3

Loop 4:

  • Put the converted UTC +21days into the RecurrenceListArray (fourth item in array aka 4th recurrence)
    • The loop will add 7 days to CST+21days but it doesn’t matter
    • The loop will convert the CST+28days to UTC but it doesn’t matter
  • Add 1 to the DoUntilLoopCounter so now it equals 4

Loop 5:

  • The Do Until loop will see that the variable DoUntilLoopCounter is 4 which is equal to the variable Recurrence so the loop will stop.

This is out of the Do Until loop

  • A step Select is used to map the RecurrenceListArray which treats the array as a list of items similar to a Get Items
    • Map the columns to the values of the array
  • Parse JSON of the Select
    • This will allow the use of dynamic values
  • Apply to Each of the Parse JSON items
    • Create an Item in SharePoint for each of the recurrence

Below are Example photos of the flow:

All Flow Steps OutlineAll Flow Steps Outline

Below is an example MS Form that I made and filled out to use in this example. I have submitted a schedule that starts on Wed 2/22/2023 at 10:15 AM and ends at 3:45 PM and I want it to be scheduled for 5 times.

Example Form Response SubmissionExample Form Response Submission

Below are the detail steps of the flow:

  • Format the start datetime and end datetime that comes from the MS Form
  • Have 4 separate Variables that can be set and reset to calculate for schedule recurrence.
    • Variable StartDateTime CST = value from Form
    • Variable EndDateTime CST = value from Form
    • Variable StartDateTime UTC = blank
    • Variable EndDateTime UTC = blank
  • Have a variable that counts the number of Do Until loops for recurrence
    • Variable DoUntilLoopCounter = 0
  • Have a variable that holds the number of schedule recurrence.
    • Variable Recurrence = value from Form
  • Have a variable array that holds all of the formatted datetimes.
    • Variable RecurrenceListArray = [] blank array brackets

First Part of Flow to Initialize VariablesFirst Part of Flow to Initialize VariablesSecond Part of Flow to Convert StartDateTime CST to UTCSecond Part of Flow to Convert StartDateTime CST to UTCThird Part of Flow to Convert EndDateTime CST To UTCThird Part of Flow to Convert EndDateTime CST To UTC

  • Begin a Do Until loop for the amount of recurrence (example 4 recurrence)
  • Do Until will continue until the variable DoUntilLoopCounter is equal to the count of Recurrence.

Within the Do Until loop

Loop 1:

  • Put the converted Start/EndDateTime UTC into RecurrenceListArray (first item in array)
  • Add 7 days to the Start/EndDateTime CST so now you have Start/EndDateTime CST+7days
  • Convert the Start/EndDateTime CST+7days into UTC so now you have UTC+7days
  • Add 1 to the DoUntilLoopCounter so it now equals 1

Loop 2:

  • Put the converted UTC+7days into the RecurrenceListArray (second item in array aka 2nd recurrence)
  • Add 7 days to the Start/EndDateTime CST+7days so now you have Start/EndDateTime CST+14days
  • Convert the Start/EndDateTime CST+14days into UTC so you now have UTC+14days
  • Add 1 to the DoUntilLoopCounter so it now equals 2

Loop 3:

  • Put the converted UTC +14days into the RecurrenceListArray (third item in array aka 3rd recurrence)
  • Add 7 days to the Start/EndDateTime CST+14days so now you have Start/EndDateTime CST+21days
  • Convert the Start/EndDateTime CST+21days into UTC so you now have UTC+21days
  • Add 1 to the DoUntilLoopCounter so it now equals 3

Loop 4:

  • Put the converted UTC +21days into the RecurrenceListArray (fourth item in array aka 4th recurrence)
    • The loop will add 7 days to CST+21days but it doesn’t matter
    • The loop will convert the CST+28days to UTC but it doesn’t matter
  • Add 1 to the DoUntilLoopCounter so now it equals 4

Loop 5:

  • The Do Until loop will see that the variable DoUntilLoopCounter is 4 which is equal to the variable Recurrence so the loop will stop.

Do Until Pt1 Append to Array SectionDo Until Pt1 Append to Array SectionDo Until Pt2 Convert StartDateTime CST +7DaysDo Until Pt2 Convert StartDateTime CST +7Days

Do Until Pt3 Convert EndDateTime CST+7DaysDo Until Pt3 Convert EndDateTime CST+7Days

This is out of the Do Until loop

  • A step Select is used to map the RecurrenceListArray which treats the array as a list of items similar to a Get Items
    • Map the columns to the values of the array
  • Parse JSON of the Select
    • This will allow the use of dynamic values
  • Apply to Each of the Parse JSON items
    • Create an Item in SharePoint for each of the recurrence

Fourth Part of Flow Select values from ArrayFourth Part of Flow Select values from Array

 

Fifth Part of Flow Apply to Each Create ItemsFifth Part of Flow Apply to Each Create Items

 

Below is what the outputs look like in SharePoint.

SharePoint ResultsSharePoint Results

 

I hope the steps outlined above help you make a flow that can post things correctly into a SharePoint list. If you make any changes always consider the differences that converting times to UTC and how it will be displayed in your SharePoint list based on local settings.

 

Additional Note About Flow:

The step Select that maps values requires that you manually type in the value you want to get out of the array like item()?['StartDateTime'] in the right side of the map columns. There is an issue after you save the flow that the display of the Select step will change and appear like the values are coming from the Form Response. This is just a display issue most likely caused because the column names in the array are the same to the display name of the form response values. This does not change that the values are actually being mapped from the RecurrenceListArray and not the Form Response.

Select step Display Change NoticeSelect step Display Change Notice

 

Let me know if this works for you or if you have any questions.

This is great.  It works!  I understand what's happening...just still a little fuzzy on how it's doing it.  I just need to study it a bit more so I can truly understand the logic behind it.  I've never used Scope or Do Until functions before.  Hopefully this opens up some new doors for me.  I'm so appreciative of the time you took to help me with this!

Scope is just a container to hold steps as a way to organize them; it doesn't do anything. You can put Scopes inside Scopes inside Scopes. The only thing you can't put inside of a Scope is "Initialize Variables" for some reason, so that's why they are all out own their own at the beginning.

You don't have to use scopes, I use them for display purposes. But it is a way to add a container and put a note to say "Everything in this Scope container is for the purpose of whatever."

 

Do Until is usually called a loop since it will keep looping through the steps from top to bottom within that Do Until. It always runs the first loop even if the condition is met. It doesn't run the last loop once the condition is met.

 

A loop Do Until has a condition at the top of the Do Until. You are saying, "I want everything in this Do Until container to happen over and over until the condition at the top is met." If you put the condition at the top of the Do Until as 7 is equal to 9, then the loop would just continue running forever until the flow timed out. That is why you need variables or checks within the condition of the Do Until that change each time the Do Until loops over. 

If you put the condition at the top of the Do Until as 1 is equal to 1, then the steps within the Do Until would run, and then next loop around it would see the condition is met, and stop the loop. 

The steps in the Do Until always run at least once. Once the condition is met. The Do Until stops and it goes to the next flow steps after the Do Until.

 

That is why I started the variable DoUntilLoopCounter at 0. Each time the Do Until loops over, it adds 1 to the variable DoUntilLoopCounter. It checks to see if it matches the Recurrence count and continues going up by 1 until it equals. If you initialized the variable DoUntilLoopCounter at 1, it wouldn't get the last recurrence.

 

Sorry if the Scopes made it cluttered, I wanted it to be easier to read steps that are working together.

Another thing that keeps happening within the Do Until is that I'm setting the variables. Basically overwriting the variables each loop.

So I forgot to clean that part up.

 

For example, the StartDateTimeCST variable is initialized and has the datetime from the form. So the variable is initialized to equal 02/22/2023 10:15 AM. When it goes into the loop after the compose step it is changed to be 03/01/2023 10:15 AM. The variable keeps getting overwritten each loop.

 

The reason that is important is because after the Do Until loop in other following steps that variable now holds the last time it was set in the Do Until. So if you wanted to put StartDateTimeCST in something else, it will say 03/22/2023 10:15 AM.

 

If you want to 'reset' the variable, you would need to put a Set Variable step After to Do Until. (So outside the Do Until like before the Select or Apply to Each.) In this Set Variable you would basically use the same formula when the variable was initialized at the very beginning, so now it will hold the Form Response as expected.

Thank you for the explanation - that does help a lot.  I actually liked the scopes.  It made it easier to follow and I could see in each one that I was manipulating the Start date in one, the End date in another, etc.

 

So the Array variable and the Select and Parse functions are just taking each event item and defining it as a separate occurrence for however many recurrences are set, correct? 

The Do Until loads all of the different recurrences into the Array Variable. All of the recurrence are in the Array variable when the Do Until completes.

 

So the Array variable is holding a row for each occurence. It is like the excel sheet.

 

The Select is used to Map the array (You could maybe even skip this step but I do it to clearly see where things are laid out). The Select is saying, "Go into this array and map the values from the Array to the columns I titled on the left with the values on the right." So you could title the columns on the left side of the Select whatever you want. It will hold the values from the array.

You could probably Parse JSON the the array directly without the Select step, but it doesn't make a difference. I like using Select since it is easy to see.

 

The Parse JSON is reading the Select layout so that you can use the Parse JSON as dynamic content.

 

Do Until is basically putting all of the recurrence in the Array bucket.

After the Do Until the Array is poured into the Select bucket with mapped column names.

Then the Select is poured into the Parse JSON bucket so that you can use dynamic content.

I am bookmarking this page so I can refer back to these explanations!  I find so much stuff that says "do this" and I do it and it may work, but I have no idea what I did or why I did it. LOL

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (836)