Hello, I'm relatively new to Power automate so please excuse me if this has already been asked.
I'm generating a report from a SharePoint list which contains booking information. What I want to achieve is to automatically swap out the duration values for text.
My current Setup is this:
Power apps trigger -> Get Items -> Select (pictured below) -> Create CSV Table -> into file (Pictured below)-> into email (finish)
Which produces the following output :
What I would like to achieve is for the flow to automatically swap "30" -> "30 Minutes", "60" -> "1 hour" etc etc...
As this is a fantastic product I know this can be achieved somehow, its just that I've not quite learned how to effectively search these forums for specific requests such as this.
So you will edit your SP list, then when an item is created or modified, it will be get items then through the paralle branch, 16 number, this would update the number to text values. These 16 branches would then common up with select in which would would use the text version of the time. Once the data has been selected then create your CSV file and send. Flow ends.
Or at least that is what I think you want.
Andrew
I think the minutes colum in your sp list is a number field and you want it to be in text so that is why I suggested you use the 16 branches to write the text data indvidually into a new time column as text. Then use the text in the select to output the CSV.
However I could be wrong.
Andrew
Just to further on the above, the column where the information is being pulled from is formatted as a number
Hi Both,
Really appreciate the rapid replies from both of you. Andrew I was in the process of getting more information for you just when i saw happy's response so I figured I'd better test that quickly.
@happyume I've given that a go, the formula I used was the following:
Any ideas?
concat(int(div(outputs('Compose'), 60)), ' hours and ', int(mod(outputs('Compose'), 60)), ' minutes')
You can use above expression to convert your duration into format x hours and y minutes
div(outputs('Compose'), 60) is giving the hour component
mod(outputs('Compose'), 60) is giving the minute component
You will have to replace outputs('Compose') with your item()?['Duration'] or equivalent
If you don't want 0 hours and to show up for cases where Duration is less than 60, you can always use a condition to check, something like if(outputs('Compose') >= 60
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.
The way I would do it is to have a number of paralle branches based on the duration and then add a seperate column for duration in text. Therefore if 30 was entered, this would go down the 30 branch and then add the 30 minutes in the text field. Once you have the 30 minutes and say 60 minutes working you can then go and add the rest. However there will be a limit as to how many branches you can have so assuming an 8 hour day in 30 minutes booking interval that would require 16 branches.
However reading your question above, I am not sure the above logic will help you. It would be good to understand the full process as I am assuming you are modifing a list initialy but I feel that you do not want an email for every change.
Let me know what you think.
Regards,
Andrew
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.