Hi All,
I am working on flow, in which Sharepoint and Excel Online (Business) are connected.
The idea is for user to submit leave request, which is approved by manager. This part works, everything is ok. Bur after adding From date and End Date business days (excluding weekends and holidays) have to be calculated and appear in separate field (Days). As I couldn't find solution for sharepoint similar as it is in Excel (Networkdays formula), I decided to have these calculations in Excel and then update Sharepoint field by adding this number of days, using Flow "Update Item function". Unfortunately I cannot do that as there is no option in Dynamic content to update Sharepoint field with value, calculated in Excel in field Days (1st screenshot) as it is in other fields (2nd Screenshot).
Maybe someone could give an advise how to work it out?
Thanks in advance
Solved! Go to Solution.
Hi @Dainius123 What is the datatype of the Days column of your sharepoint list? Is it the same as that of the column of the excel? what is the datatype that you want to fill in here? if it is an integer and the excel column will be a string but a number then in the sharepoint update item action, you can click on the Days column value and in the expression editor, type int() and with in the brackets select the excel column from the dynamic selector. (the excel column will appear when you tap inside of the bracket of the int function and click on the dynamic selector)
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @Dainius123 ,
Column OTHours is type Number in the list.
It is using the Output of Compose action, and the function used in the Compose action is:
int(body('Get_a_row')?['Sub'])
Note: I am using function int to convert the string to an Integer so that it matches the column type.
Best regards,
Mabel
Hi @Dainius123 What is the datatype of the Days column of your sharepoint list? Is it the same as that of the column of the excel? what is the datatype that you want to fill in here? if it is an integer and the excel column will be a string but a number then in the sharepoint update item action, you can click on the Days column value and in the expression editor, type int() and with in the brackets select the excel column from the dynamic selector. (the excel column will appear when you tap inside of the bracket of the int function and click on the dynamic selector)
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @Dainius123 ,
Do you want to update Days column in SharePoint list after the value calculated in the Excel file?
I assume that Days is of type Number. If so, you may need to use int function to convert the string to integer first.
Besides, after adding the item into the table, you need to get the added row again to update the list item
I have set up the flow likes below for your reference.
The function used in Compose is:
int(body('Get_a_row')?['Sub'])
Best regards,
Mabel
Hi @v-yamao-msft ,
thanks for an answer. Could You please specify what goes to OTHours (marked yellow)?
Thanks
Hi @Dainius123 ,
Column OTHours is type Number in the list.
It is using the Output of Compose action, and the function used in the Compose action is:
int(body('Get_a_row')?['Sub'])
Note: I am using function int to convert the string to an Integer so that it matches the column type.
Best regards,
Mabel
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
53 | |
41 | |
38 | |
38 | |
37 |
User | Count |
---|---|
76 | |
75 | |
71 | |
52 | |
49 |