I've customized a SharePoint List Forms using a PowerApps button.

Is it possible to run custom JavaScript code in these PowerApps forms?

I was not yet able to do it. It seems Microsoft does not want us to do it. But is there some kind of a workaround? For example, PowerApps has no printing capabilities (Update: printing is now possible with the Print function) and I'm trying to add an HTML button that would do just that.

enter image description here

enter image description here

I have also tried a button control, but it does not let me add my own JavaScript there:

enter image description here

Adding a script tag via the HTML control didn't work either :(

enter image description here

If you have any suggestions or insight - I would really appreciate it.

4 Answers 4


Powerapp is meant for power users. These power users have been long using tools like PowerPoint and excel. So the way here does seems limited to excel formulas, not custom code.

Spfx could be the way for devs, but yes it will require a lot more effort.


There is a print option in Powerapps use the function Print() you can also hide/show buttons when you print using the "form.Printing"or not(Form.Printing) in the visible property. however it can only print what is on screen in a single page. If it is is multiple pages you are out of luck and need to use ms flow instead.


By default, we cannot run custom JavaScript code in these PowerApps forms.

PowerApps is for no custom code.

The UI of PowerApps is intended to be a no-code surface for building apps without code.

There is a workaround for the issue.

You could customize the list form by InfoPath.

  • 1
    InfoPath? Ummm....NO. Feb 14, 2019 at 18:13
  • 1
    Funny that Timmy voted you down, when the only way to get JavaScript into a form like this is through InfoPath. Set up your InfoPath form and fields. Save. Publish. Login into designer, go to the list, find the InfoPath form and add in your JavaScript. It is ugly but it works. Unfortunately Microsoft is forcing us to use processes that don't match our business needs. It's joke and why so many people are still On-Prem.
    – Brian Rood
    Sep 24, 2020 at 18:53

Custom code is not allowed in power apps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.