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 :
Power Pages - Customize & Extend
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
    Button in power pages dataverse list
    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,347 Most Valuable Professional on at
    Button in power pages dataverse list
    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
    Button in power pages dataverse list
    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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 55

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 2

#3
Fubar Profile Picture

Fubar 35 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics