In today's fast-paced and ever-changing business landscape, companies are constantly looking for ways to optimize their processes, reduce costs, and increase efficiency. The Microsoft Power Platform offers a range of solutions that can help businesses achieve these goals.
Hi,
I have a Dataverse Table with StartDate and EndDate and I am getting that table in a flow and then I want to filter out those rows whose StartDate and EndDate has weekends and add those rows in a different table.
Can you please hel?p?
This needs a thorough setup of the flow to work with the dataverse which we will try to cover in a later blog. For now, we would suggest you to use the idea from above steps to capture data from dataverse to variables and then process it. Post that you may write the data to the table in dataverse.
Note: Writing to Dataverse table needs a Premium operation.
Ref: https://learn.microsoft.com/en-us/power-automate/dataverse/create
Hi,
Thank you for sharing the flow.
I have tried to create a flow taking this flow as a reference. My requirement is that I have a list that gets populated with content requests of different priorities. I want to calculate the due date based on the priority criteria and calendar days.
There seems to a problem in step 6a. Initializing the variable value with int(triggerOutputs()?['body/TaskDays']). It shows error:
Unable to process template language expressions in action 'Initialize_variable_WorkDays' inputs at line '0' and column '0': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
I made the value 0 and tested it.
Another error in step 6c:
Unable to process template language expressions in action 'Initialize_variable_StartDate' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
Removed the format and tested with blank value.
Another error in step 7/8
Unable to process template language expressions in action 'Compose_IncrementStartDate' inputs at line '0' and column '0': 'In function 'addDays', the value provided for date time string '' was not valid. The datetime string must match ISO 8601 format.'.
Please check the flow once with these errors and help.
Thanks,
Ray
Please check the internal names for the columns created in steps 2 and 3.
In our case, we have used short field names and you might be using different field names.
Ref: Get SharePoint Column Internal Names
Hope this helps!
Thank you so much for writing this blog. I was struggling with the best way to process this logic.
I have gone through all the steps but I found an issue.
Step 6c - We create DueDate with no value
Step 8 - Compose to increment StartDate, but the variable in the instruction is DueDate:
addDays(Variables('DueDate'),1,'yyyy-MM-dd'). This results in an error as we cannot add days to a blank value.
ERROR:
InvalidTemplate. Unable to process template language expressions in action 'Compose_to_increment_StartDate' inputs at line '0' and column '0': 'In function 'addDays', the value provided for date time string '' was not valid. The datetime string must match ISO 8601 format.'.
I surmised that we should initalize the DueDate with the same expression as the StartDate, and this now works.
Thank you again.
Hi Fleur,
There was an issue in the Due Date step - we have fixed it and updated the post. Please re-check the steps and implement it.
Sorry for the inconvenience caused !
Regards,
Jasjit
Hi, can this workflow be used "When an item is created or modified"? I want to calculate the due date once the status is updated to "Submitted" not when the item is created. On step 6, what is "TaskDays" referring to as I don't see that column on any of the sharepoint lists? I'm also getting an error message in the Flow checker for the variable DueDate: "Actions in this flow may result in an infinite trigger loop. Please ensure you add appropriate conditional checks to prevent this flow from triggering itself."
You are most likely missing step 6(d) where we initiate DueDate variable.
And yes, you can use this flow for "When an item is created or modified".
Hope this helps!
Hi Reshma,
We had to update our blog. There was a mistake in the Due Date step. Sorry for the inconvenience caused.
Regards,
Jasjit