Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

PCF SDK Not Returning Lookup Values Using Data-set Property in Canvas App

(1) ShareShare
ReportReport
Posted on by 2,194

Hello everyone,

I'm currently working on a Canvas App and encountering an issue with the PCF (PowerApps Component Framework) SDK. Specifically, I'm having trouble getting the SDK to return lookup values when using data-set properties.

Here are the details:

Context: I'm developing a Canvas App where I'm trying to leverage PCF to interact with lookup fields in a dataset. The values are being retrieved in Studio Mode but not in Play Mode.
Issue: The SDK does not seem to return the expected lookup values. Instead, it returns null value in the Play Mode.
Attempts to Resolve: I've double-checked the dataset schema and ensured that the lookup fields are correctly defined. I've also reviewed the official documentation but haven't found a solution to this specific issue.

 

const rows: Array<JSONObject> = new Array<JSONObject>();

        const records = this._context.parameters.items.records

        const sortedRecordsIds = this._context.parameters.items.sortedRecordIds;

        sortedRecordsIds.forEach(ids => {

            let gridDataSource: Record<string, any> = {} as Record<string, object>;

            gridDataSource.primaryId = ids;

            this._context.parameters.items.columns.forEach(c => {

                const rec = records[ids].getValue(c.name);

                const rec1 = records[ids].getFormattedValue(c.name);

                gridDataSource = { ...gridDataSource, [c.name]: rec, [`${c.name}-f`]: rec1 };

            })

            rows.push({ ...gridDataSource });

        });

console.log("rows", rows);

 

I am using this code to get values from the Data-set property.

 

Has anyone else encountered this problem? Are any workarounds or configurations needed to get lookup values through the PCF SDK in a Canvas App?

Any help or guidance would be greatly appreciated!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard