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

Community site session details

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

Hide New button on Quickview subgrid

Like (0) ShareShare
ReportReport
Posted on 7 Dec 2020 18:10:39 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.

I have the same question (0)
  • AN-09080954-0 Profile Picture
    Microsoft Employee on 06 Dec 2022 at 15:13:13
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 892 Most Valuable Professional

#2
Power Apps 1919 Profile Picture

Power Apps 1919 356

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 310 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete