Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Answered

Disable Create button on the Entity List based on values from other form in Portal

(0) ShareShare
ReportReport
Posted on by 5

Hello, 

I am quite new to Power apps, and I would like to ask if is there a way to enable/disable the Create button on the Entity List based on the values on another form?

Basically, I have a form that is not completely filled up and an Entity List that the Create new record is enabled. The form and the list comes from 2 different tables. The requirement is that the Create button should be disabled when the Entity form is not completely filled up and it will be enabled once the user filled up the form. 

Categories:
  • oliver.rodrigues Profile Picture
    9,319 Most Valuable Professional on at
    Re: Disable Create button on the Entity List based on values from other form in Portal

    My bad, I think it's missing the .each loop in my code above (that's what happens when you don't test it 😅).
    data-attribute is the schema name of your column in dataverse, i.e.: name, new_customcolumn, cre88_myothercustomcolumn, etc
    tr is basically the element from the loop, updated code bellow (without testing again, hope it helps).

    var list = $(".entitylist.entity-grid").eq(0);
    list.on("loaded", function () {
    
     var addButton = $(list).find("div.toolbar-actions >> a.btn-primary.create-action");
     // empty list
     if (list.find("table tbody > tr").length == 0) {
     addButton.show();
     } else {
     list.find("table tbody > tr").each(function (index, tr) {
     var statusOfApplication = $(tr).find('td[data-attribute="STATUS OR ANY OTHER FIELD"]').attr("data-value");
     if (statusOfApplication == "XXXX") {
     addButton.hide();
     // probably break the loop / return here;
     }
     else {
     addButton.show();
     }
     });
     }
    });
  • karlapalevino Profile Picture
    5 on at
    Re: Disable Create button on the Entity List based on values from other form in Portal

    Hello, thank you for the answer. 

    For the $(tr), where does that come from and for the data-attribute is that the id of the inputs in the form?

  • Verified answer
    oliver.rodrigues Profile Picture
    9,319 Most Valuable Professional on at
    Re: Disable Create button on the Entity List based on values from other form in Portal

    Hi, I was working on a very similar requirement yesterday, here is a sample code for you to get started. Please let us know how you go:

    var list = $(".entitylist.entity-grid").eq(0);
    list.on("loaded", function () {
    
     var addButton = $(list).find("div.toolbar-actions >> a.btn-primary.create-action");
     // empty list
     if (list.find("table tbody > tr").length == 0) {
     addButton.show();
     } else {
     var statusOfApplication = $(tr).find('td[data-attribute="STATUS OR ANY OTHER FIELD"]').attr("data-value");
     if (statusOfApplication == "XXXX") {
     addButton.hide();
     // probably break the loop / return here;
     }
     else {
     addButton.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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43