Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Including web ressource javascript component code to a model driven app

(0) ShareShare
ReportReport
Posted on by 27
Hello,
 
I have a model driven application which has table section on the left:
To hide the table section (without hiding what is displayed when clicking on a table for example because i can use a link to stimulate the click on an option under table section), I created a web ressource:
Here is the code inside of the file:
function hideTablesGroup() {
    var interval = setInterval(function() {
        var vcpTablesGroup = document.querySelector("[title='VCP Tables']");
        if (TablesGroup) {
            TablesGroup.parentElement.style.display = 'none';
            clearInterval(interval);
        }
    }, 1000); 
}

//Function on page load
document.addEventListener("DOMContentLoaded", function() {
    hideTablesGroup();
});
 
I included the web ressource on the event onload of a main form of one of the tables but it does not work at all... So I removed it and i am trying to include it directly on the model driven application, is there a way to do so? Thanks in advance!
Regards.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1