I was wondering if you could assist me with a very specific requierement that I currently have. I´ll try to explain the scenario to the best of my abilities.
I have a parent list in a SharePoint´s Project template site that works as the company´s Project Central. Whenever an authorized user creates a new item with some basic information, a Flow that automatically creates a new subsite triggers. This I have managed to get to work perfectly.
This is the structure of the aforementioned Parent List, my apologies since it is in spanish. Although I tried, I wasn´t able to change the display language:
Basically, the code (Código in spanish) column, is a URL type column that automatically writes the URL of the newly created subsite when a new item on this lists is created.
Now, here is the thing, on the subsite I have a list called "Tasks", I want to be able to connect this Parent List (Project Central) to this list in the newly created subsite in order to retrieve the information pertaining to the earliest task´s Start Date, latest task´s EndDate, Overall Status, completed %, budget, along with other columns using as a reference the "Code" column in the Parent List that displays the URL of the new (related) project´s subsite:
Back to Flow, I have managed to get the columns of the Parent List and even call the secondary (Child) list but I have not been able to display the columns on the "tasks" list as a dynamic content and hence, I can´t update the Parent List with the aforementioned data. This is how my Flow looks so far:
You´ll notice that within the "get elements 2" action, I have used the "Code" (código) field from the Parent List, and "Tasks" (Tareas) as the List Name.
Now, even though the columns for the second list (Tasks) within the subsite do not appear listed as dynamic content, I can tell that the Flow it´s been able to read them since they are displayed when I run the Flow, which makes me think I´m on the right path:
Notice how the Title, StartDate and DueDate are the ones shown in the Child List (third image) from top to bottom.
Finally, this is error that it´s been displayed whenever I run the Flow. I´ve not added the Update list action as of yet:
Any and all help you could provide me with in order to get to work will be highly appreciated.
Thanks in advance.
Hi @AlexBS ,
Could you please provide more details about the error?
As Barry suggests,can you elaborate a bit more on the error you are getting? It seems at least one iteration of your loop is failing, you can inspect the failed ones one by one by clicking "Next Failed" as many times as needed
Yes of course.
Once I run the Flow, on the first and second results pages I just get "ActionFailed. An action failed. No dependent actions succeeded.".
Now, on the subsecuent result pages I get "BadGateway" and the following error on the Body:
Just checking if you have had the opportunity to review my response to your last message and see if you have any suggestions.
@AlexBS Thanx for the details! Did you configure 'Apply to each' to apply sequentially or in paralel?
Thanks for your response @efialttes
It is configured to run sequentially as it´s the default setting:
Please notice that the results of the flow clearly show the contents of the Subsite´s child (Tasks) list. I just need to be able to pull those results into the Parent List so I can update it.
I´ll be looking forward to your next recommendations.
In order to get more info, did you try to add a Compose action block as first step inside your Apply to each with the following expression?
Please note accent would probably need to be translated into the corresponding set of characters
If the output of Compose action block in each iteration is the expected one (i.e. the URL for the subsite), then it looks like either there is a bug in the implementation of SP "Get items" when the site URL provided is dynamic, or from some reason, some of the subsites are not accesible from your Flow account 😞
Since it looks you have 'just' 8 subsites, one possible way to proceed for troubleshooting is by adding 8 "Get items" action blocks, one per subsite, and select the target subsite from the dropdown menu instead of using the dynamic input. This recommendation is not for the final implementation, just for troubleshooting purposes.
Hope this helps
As per your recommendation I have added the compose action as the first action within the apply to all container. Furthermore, in order to facilitate the troubleshooting process, I have deleted all but the first 2 items from the parent list and made sure the URL on the "code" (código) column is correct:
Apparently this was part of the reason for the multiple errors since it seems that some of the URLs on the other items code´s columns were incorrect. No errors are shown when the flow was ran this time:
Now, regarding the remaining items, this is the Output from both, the compose and the Get elements 2 actions:
Please note that I have added some caption to the pictures above.
As you can see the "get elements 2" action is indeed pulling the data from the task lists within each subsite. No errors are shown this time around:
Now I just need to be able to pull that information into the parent list in order to populate and update its items. An example just for the sake of transparency would be:
Update the first item on the parent list called "Portafolio de Proyectos" (Project portfolio) (first picture above) with the information shown in the last picture. The trick here is that "Fecha de inicio" (start date) has to be updated with the FIRST task´s start date, and "Fecha de finalización" (End date) has to be updated with the LAST task´s end date, both from the child (Subsite´s task list).
I just don´t know how to do this.
I hope I was able to explain myself, my apologies if I haven´t.
I´ll be looking forward to your suggestions.
Thanks in advance.
As per your second suggestion "one possible way to proceed for troubleshooting is by adding 8 "Get items" action blocks, one per subsite, and select the target subsite from the dropdown menu instead of using the dynamic input". I´ve added a get items to manually get the first subsite´s tasks list at the begging of the Flow:
And then at the end, I´ve added a Update Parent List action as follows:
I´m NOW able to select the Task (child) list data from the dynamic content dropdown list:
The Flow now runs successfully BUT it updates BOTH items in the Parent List with the last item´s dates from the subsite Task list:
Subsite A - Child List Items:
I understood that the initial issue getting subtasks was related to the URL format from some of them, right? Does it mean you can currently retreive all of them successfully by using the content of column "Código" as "Site Address" URL dynamic input?
If so, my suggestion to solve the second issue is to use the dynamic input approach:
Get Parent List items
Apply to each (using Get Parent List items output as the input for the Apply To Each)
Inside Apply to each:
-insert "Get Project X items"using column "Código" as "Site Address" URL dynamic input
-identify first task´s start date and store it in a variable (please remember to initialize it before the Apply to Each).
-identify last task´s end date and store it in a second variable (please remember to initialize it before the Apply to Each)
-update parent task with both variables values
AS per my little experience, Accents are not good friends of Microsoft Power Automate (aka Flow). Let's assume you add a Compose action block inside the suggested 'Apply to Each', then inside the Compose itself you add 'Código' as dynamic content. Once added, please hover the mouse over it to verify how Flow replaces vowels with accents.
Hope this helps
Thanks for the follow-up @efialttes
Don´t worry about the accent, I´ve just changed the column name to "Codigo" so it doesn´t have it anymore.
In regards to your question, no, I´m still not able to retrieve the task list values using the dynamic approach. I´m only able to view that information by either running the flow (as part of the flow resutls) or entering the Task list URL statically into the "Get elements" action.
I was trying to follow your steps but I don´t see any output if I use an "Apply to all" action right after the "Get Parent List items" action at the beggining of the Flow:
Do you mean "value" as output?
I forgot to mention but I´m not very familiar with variables in Flow as of yet, therefore I´m having trouble understanding the following instructions:
"identify first task´s start date and store it in a variable (please remember to initialize it before the Apply to Each)."
Could you please guide me thru the process of initializing and adding the variables?
I´d really appreciate it.
Here you are an excellent post explaining how to use variables in Microsoft Power Automate .
In my opinion, the main issue you will have to solve is how to identify first task start date and last task end date. I guess start and end dates will be stored in different columns, if so you can include a couple of get items applying an ODATA filter to order by the corresponding column in the order you need, and get the first element from the result array by means of an expression.
Hope this helps
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Many congratulations to the Season 1 2021 Flownaut Crew!
Check out our new profile badges recognizing authored solutions!
Check out the community blog page where you can find valuable learning material from community and product team members!