Skip to main content

Notifications

Community site session details

Community site session details

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

Hide New button on Quickview subgrid

(0) ShareShare
ReportReport
Posted on by 306

In my model-driven app, I have a QuickView Form for a table that has two subgrids on it for related tables.  For those subgrids, I don't want the "New" ribbon option to be available.  But for those same related tables, I DO want the New option available when those subgrids are on a Main form.  I can use Ribbon Workbench to hide the New option for all subgrids.  But, is there a way to only hide it when on a QuickView form?  I could use a different View for the subgrid on the QuickView form, but I don't see a way to specify ribbon options for specific Views.

  • AN-09080954-0 Profile Picture
    Microsoft Employee on at
    Re: Hide New button on Quickview subgrid

    Hi, for your scenario,
    I believe you will be using quick view form on some other table. So, you can add an enable rule (Custom rule) to the "New" button of the subgrid with a parameter as Primary Control and use below code to get the entity information of the parent entity.


    var showButton = true;
    var formContext = primaryControl;
    if (formContext.parentFormContext !== null && formContext.parentFormContext !== undefined) {
    var parentEntityName = formContext.parentFormContext.data.entity.getEntityName();
    if (parentEntityName == {parent entity name}) {
    showButton = false;
    }
    }

    return showButton;

     

    With the above code, if I am using the quick view form of table "ABC" on table "DEF", "formContext" would be context of table "ABC" and "formContext.parentFormContext" would be the context of table "DEF".
    So, on table "DEF", my quick view form won't show the "New" subgrid button, but on the main form it will show.


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

Announcing the Engage with the Community forum!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 109 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 72

Overall leaderboard