web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Hide New button on Qui...
Power Apps
Unanswered

Hide New button on Quickview subgrid

(0) ShareShare
ReportReport
Posted on by 311

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.

I have the same question (0)
  • AN-09080954-0 Profile Picture
    Microsoft Employee on at

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard