We are working with Dataset PCF control, in that we get all grid record and do some filter on that records using our custom logic.
we want to update that record collection in context.
Can we update record collection in context? Please provide any method and work around for this.
What do you mean update in context
Do you mean
1) update some values within records in the dataset
2) change / remove / re-sort the actual records stored within the dataset?
3) limit the records displayed based on the filter
If it's the last option, I create an array(s) of the filtered record guids on first load and then add a check in the display logic to skip any records not in the appropriate array.
Hi @PCF_Developer ,
Could you please share a bit more about your scenario?
Do you want to update a record in context within your PCF control?
Based on the needs that you mentioned, I think webAPI Client API of PowerApps Component Framework could achieve your needs. Within your PCF control logic code, please consider add the following method to update a record:
context.webAPI.updateRecord(entityLogicalName, id, data).then(successCallback, errorCallback);
More details about the updateRecord function, please check the following article:
Note: You may need to execute above method within a filteredRecordsTable.forEach() function
I also wonder if it's possible to update the DataSet. If the webAPI (or implementing an own Request) is the only possibility, that means that it can work only for Model-Driven Apps.
A powerful feature of PCF is being able to run in CanvasApps, where the designer decides which is the Data Source. But the WebAPI is not supported in Canvas Apps.
If we cannot update the data, it means that in CanvasApps the DataSet PCFs must be ReadOnly. 🤔
Check out the on demand sessions that are available now!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Features releasing from October 2020 through March 2021