Hi everyone,
We're using PowerApps to build a model driven app that uses the "file" type column in a table. As I understand it, this option hasn't been available for model driven apps for very long. The file upload control on a form works fairly well. It takes the selected file and stores this directly in the appropriate Dataverse table column. However, we cannot disable this file input with a business rule somehow. Business Rule editor simply doesn't give the option.

The plan is to use JavaScript to disable the input when it needs to be disabled. The JavaScript however does not get access to the targeted section (containing the button input we need to grab) using id (getElementById). The section ID can be controlled from the classic form edit view. So, if the section is grabbed, we can then search for the button and disable it. But the section appears to be generated after the onLoad event finishes. The result is, that I can grab the section when I run "document.getElementById('my_specific_section_id')" from the browser console, but when the application executes the script, it always results in null.
The section can't be found. This is only the case when using the file input form field. Other elements can be found as expected. In Dynamics365 user groups I was reading about how getlementById is not supported there. But given the fact that I can use this to grab other elements, I think it is not the case here.
What can I do to get the file input field disabled (as in "locked", unable to select a file, or delete one if one is already there)?
Best regards,
- Alex