Logic as explained:
- Get all tasks
- Initialize variable used to set bucket name
- Apply to each to iterate through each task - outputs('Lists_tasks')?['body/value']
- List rows in a table - query the excel with first task ID
If length is 0 it means no task found and add a row in excel else update the row(updating is simple)
formulae to check length - length(outputs('List_rows_present_in_a_table')?['body']?['value'])
Now explaining only adding of new tasks in excel:
if length is 0, now we need to add a task but before that we need to get the bucket name, so
- list buckets
- apply to each to iterate through bucked id and check if it matches bucket id of the task(each task has a bucket id)
- if it matches then set variable value with bucket name
- then create a new row in excel which is again simple.
Hope this helps.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.