Hi all,
I'm working on a powerapp task. My app has a 'Page' with a 'Web Form', it has 'Web Form Step' for sure. And I have some logics in the 'Web Form Step' -> 'Custom JavaScript'.
Now I have an external .js file, which exports some functions I want to import to the 'Custom JavaScript'. I uploaded it to 'Web Files', and named the partial url 'myFileName.js'; I added '<script type="module" src="/myFileName.js"></script>' to 'Web Page' -> 'Content Page' -> 'Content' -> 'Copy (HTML)'.
Then if I added 'import { functionName } from "/myFileName.js";' to 'Web Form Step' -> 'Custom JavaScript', the page will lose all behaviors added by the custom js, so basically the custom js broke down by the 'import' part.
Any suggestion for this?
@joeyzy123 usually when importing JS I simply use:
<script src="/MYJS.js"></script>
I normally add that to the Tracking Code content snippet.. this way it's loaded on every page, but you can also do that at the page level
Lucas001
60
Super User 2025 Season 2
Fubar
55
Super User 2025 Season 2
surya narayanan
35