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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataset PCF Control Is...
Power Apps
Unanswered

Dataset PCF Control Issue - Model Driven App

(0) ShareShare
ReportReport
Posted on by 2
I am looking for help with my PCF control. I have some experience with field PCF controls but am new to dataset templates. In a main view for Dynamics 365 Model Driven App, I need to create a PCF control to display text in a whole number column. I need to keep all the same functionality that comes with the view (sorting, filtering, etc). I do not want to recreate the table as then we lose a lot of functionality, even when recreating paging, selected records, etc. using React. I should just be able to parse through the records, then for each column, find the column that I want to display the text and change the text. In my updateView method, I am doing all of this and creating the new label. I am then calling a function to change the number to text, however that is not working. I have the recordId, Columnname and the new value to be displayed. However, I cannot find a way to update that cell. Debugging this method, it always is coming up null. I have tried:
 
1. 
const row = document.querySelector(`tr[data-id='${recordId}']`);
        if (row) {
            const tcell = row.querySelector(`td[data-column='${columnName}']`);
        }
2. 
if (this.cellRefs[recordId] && this.cellRefs[recordId][columnName]) {
            this.cellRefs[recordId][columnName].textContent = newValue;
        }
3. 
const cell = document.getElementById(`[data-row-id='${recordId}'][data-column-name='${columnName}']`);
        if (cell) {
        cell.textContent = newValue; // Display custom text        
        }
Can someone help me and let me know if there is a way to do this without recreating the entire thing? 
I have the same question (0)
  • Ctse Profile Picture
    43 on at
    If you mean you would like to intercept the logic of an existing view with a dataset-PCF and also keep the default table visual, that's not possible.
    With a dataset-PCF component you are overriding the complete visual of the view, so you have to create your own table and functionality in your PCF component (which is a lot of work).
    If your view is on a form (subgrid), you can use scripting on the form to intercept some logic of the view:
    For changing the text in cell(s) in a view, I would recommend to make a plugin for that (on the retrievemultiple message, post operation).
     

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard