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 / Button in power pages ...
Power Pages
Answered

Button in power pages dataverse list

(0) ShareShare
ReportReport
Posted on by 112
I am in the process of moving our internal ticket system to power pages and I want to add a button in each row that's essentially "open ticket". I just need help figuring out how to get a button added to the list then I can run with this.
Categories:
I have the same question (0)
  • ZackS Profile Picture
    112 on at
    More context:
     
    I've tried to use javascript, css, and html but I can't seem to figure it out.
  • Suggested answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at
    Hi, you can achieve this by using the OOB List + Basic Forms from Power Pages.
     
    How far did you get with your list configuration? 
     
  • Verified answer
    ZackS Profile Picture
    112 on at
    I figured out how to do it in JavaScript, I adjusted it to work for everyone here
     
    document.addEventListener("DOMContentLoaded", function () {
        const listInterval = setInterval(() => {
            const tableBody = document.querySelector(".view-grid table tbody");
     
            if (tableBody) {
                clearInterval(listInterval);
     
                //find all the rows
                const rows = tableBody.querySelectorAll("tr");
     
                rows.forEach(row => {
                    //find the column to put the button
                    const pickUpTicketCell = row.querySelector('td[data-th="Pick up ticket"]');
     
                    if (pickUpTicketCell) {
                        //to prevent dupped buttons
                        if (!pickUpTicketCell.querySelector("button")) {
                            //create the button
                            const button = document.createElement("button");
                            button.innerText = "Pick Up Ticket";
                            button.style.margin = "5px"; //style
                           
                            //click event
                            button.addEventListener("click", function () {
                                const ticketId = row.dataset.id;
                                alert(`Pop up message, row ID: ${ticketId}`);
                           
                            });
     
                   
                            pickUpTicketCell.appendChild(button);
                        }
                    }
                });
     
                console.log("Buttons added successfully.");
            }
        }, 500);
    });

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 Pages

#1
Valantis Profile Picture

Valantis 59

#2
11manish Profile Picture

11manish 51

#3
omkarsupreme Profile Picture

omkarsupreme 27

Last 30 days Overall leaderboard