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:
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!