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 Pages / Disable Create button ...
Power Pages
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:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    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();
     }
     }
    });
  • karlapalevino Profile Picture
    5 on at

    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?

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    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();
     }
     });
     }
    });

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 33

#2
sannavajjala87 Profile Picture

sannavajjala87 28 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 22 Super User 2026 Season 2

Last 30 days Overall leaderboard