
Announcements
So i have a form that I have built out in Power Apps, as a Canvas app. I want to create a button to Download all current info as a HTML file almost, to have as like a table, and the user can pick where to save it. I have no clue on how to go about starting this process. I have the download Icon, but not certain on the action code.
User presses button
OnSelect (Takes current Text Inputs, and puts them in a table type of format, asks user where to save, then downloads as a HTML or PDF type of file)
Please help. I dont want to use Power Automate unless I have to, as it kinda lags a bit and this is out in the field which might not have the most reliable of internet connections.
I did this, but with Power Automate and I think that there is no other way around it.
Basically, you want to make a flow that takes and ID from a Power App.
Then on the OnSelect property of the button you want to use, write NameOfTheFlow.Run(ID of the item). You can get the ID from BrowseGallery.Selected.ID, but there a couple of other ways.
Then, inside the flow you should have:
1. PowerApps trigger to get the id
2. Get Item - from sharepoint
3. Compose connector. This is the thing that will contain your HTML. So write the shell of your HTML in Vs Code, or whatever you choose. Then paste it inside the Compose connector. Then, using Dynamic Values, fill the HTML with the values from your record. --- After this, I strongly suggest you copy all the content from the compose connector, including Dynamic Values, using ctrl+a and ctrl+c, and then paste it in a html file and save it somewhere. That way, if you need to change something in the future about your html, you can do it in Vs Code, then you can just paste it back in the Compose connector and your Dynamic Values will still be there. I do this as using Dynamic Values is such a pain.
Also, you can include CSS and JS inside the HTML so you can have more functionality.
4. Create file. Take the body from the Compose generate a file ending with .html, save it where you want and you're done
Feel free to ask if you have any questions