I have a question from pcf.
I want to get other records from dataset except for the name of the table associated with the lookup record. What should I do?
I can get only name from record
Sure, @nanenchanga 🙂 Take your time and try things out.
You can have a look to the Network Protocol in the Browser devtools, while the PCF is running. There you'll see the request which get generated, and you'll easily figure out what you need to change in dataset linking, to make it work.
Love Korean 😊
Sure, fell free to translate. Just please don't forget to mention the source.
Hope this helps!
Thank you so much for your help.
I solved it using the other method you suggested, 'Multiple-Datasets with Link'.
However, I still don't understand how to use linking.
It doesn't seem to work well even if you add a value with hard coding.
Can I try a few more days and ask you again if it doesn't work?
And I think your blog will help me a lot. Can I translate the contents of blogs and git hubs into Korean and share them on my blog or something?
Hi @nanenchanga
Just in case it applies to your use case: if you don't need a generic PCF, there is another solution: you just extend the view where the PCF is called. Because in the views you can add columns from a linked table, as long it's a many-to-one relationship.
Now back to the programmatic approach:
You could try first with hardcoded names. Just to get an understanding,
From the screenshots above, I didn't git the name of your main table (the one you apply the PCF on). So from I've got there would be
//<NAME> would be the name of yozr main tabbe
context.parameters.dataset.linking.addLinkedEntity({
name: "<NAME>",
from "<NAME>id",
to: "cr072_sublookup",
linking: "innner",
alias: "ParentRelation"
});
This one adds only the relationship. Then you need to add the column (also in init)
(dataset as any).addColumn("cr072_subname", "ParentRelationship");
So when you get the data, you can access the column
dataset.records[...].getValue("ParentRelationship.cr072_subname")
I have a section about addColumn also in my blog (https://dianabirkelbach.wordpress.com/2022/06/12/pcf-dataset-relationships-linking-in-model-driven-apps/)
Hope it helps!
Hello.
I tried to connect to Dataset using your example source code, but it didn't work properly.
Please check which property should be put in.
brasov2de/DatasetExample at 2_simpledataset-extended-relationship (github.com)
The following table views exist and you want to get a specific value for the associated table in 'SubLookUp'.
The following table exists and the name is 'cr072_onlynamable'
I want to extract 'cr072_subname' from here.
And I set the PCF's Properties as follows.
But I can't any data in view
What is the wrong setting?
----------------------------------------------------------------------
And it's a problem with modifying my code, not an example.
And in my source code, I added the following code within the init method
I don't know how to extract the desired value afterwards.
Thank you for your help.
I wanted to get the values of the linked table as you thought.
I will make it referring to your blog and let you know if I have any questions.
Hi @nanenchanga ,
Let me check if I understood the question.
You have a dataset, and want to get the table name for a lookup?
Using the getValue() on a lookup you get the etn, id and the name
Maybe you want to get also more columns from the table pointed out by the lookup.
In that case you can use the dataset "linking": https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/linking?WT.mc_id=BA-MVP-5004107
For the linked tables, you can add columns using "addColumn": https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/dataset/addcolumn?WT.mc_id=BA-MVP-5004107
I've wrote a blog about all kind of linking with dataset here. Maybe it helps you further: https://dianabirkelbach.wordpress.com/2022/06/12/pcf-dataset-relationships-linking-in-model-driven-apps/
WarrenBelz
55
Most Valuable Professional
mmbr1606
42
Super User 2025 Season 1
Michael E. Gernaey
31
Super User 2025 Season 1