Hello.
I'm trying to build a work hour tracking system as a SharePoint list that uses Flow and potentially PowerApps to add or update rows.
I'd like our users to click on clock in, clock out, start lunch or end lunch that would update their row for the day.
To achieve this I'm using a Condition based on a search for SharePoint items with the title 'Username - date'. If there are no rows found it goes to the Yes condition- where it can create a row- and if any rows are found it can update the rows it finds.
This looks like this:
As soon as I try to add Dynamic Content as a title of the new list item flow wraps the thing in a foreach loop like this:
As no rows are returned in the initial Get Items query then there's nothing to iterate so I can't create create an item at all.
Does anyone know how I can stop this happening or another way to create or update an item?
Many thanks.
Solved! Go to Solution.
Hi @Anonymous
In create item you are trying to use the Date dynamic content value from get items which will result in a for loop
Also , since no items are returned, the for loop will not run and items wont be created
replace that Date dynamic content with utcNow() and format it based on your needs
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous
In create item you are trying to use the Date dynamic content value from get items which will result in a for loop
Also , since no items are returned, the for loop will not run and items wont be created
replace that Date dynamic content with utcNow() and format it based on your needs
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Many thanks. Much appreciated!
User | Count |
---|---|
92 | |
44 | |
21 | |
18 | |
16 |
User | Count |
---|---|
137 | |
49 | |
42 | |
37 | |
29 |