cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoshuaRobert
Frequent Visitor

Nested Linking of entities on DataSet

Hi everyone! 

 

Is it possible to add nested linking of entities on Dataset?
Currently I can link entities using 

context.parameters.sampleDataset.linking.addLinkedEntity(...)

It's possible with fetchXml to add link-entity within a link-entity, is it possible with dataSet addLinkedEntity ?

4 REPLIES 4
AnqiChen
Power Apps
Power Apps

Yes, you could, we are writing samples, here is the sample:

// code snippet
var expression = {
name: "account",
from: "accountid",
to: "parentcustomerid",
linkType:"inner",
alias:"anyuniquealaisname ",
};

context.parameters.dataSetGrid.linking.addLinkedEntity(expression);
context.parameters.dataSetGrid.addColumn("new_additional_attributename", "anyuniquealaisname "); // anyuniquealaisname same as above
context.parameters.dataSetGrid.refresh();

 

If u need to get value of those linked entity columns, u could check the column name from

context.parameters.datasetGrid.columns,

then use

context.parameters.datasetGrid.records[recordId].getValue(<colum_name_u_want>)

 

Feel free to let us know your concern

Hi @AnqiChen! I think by the word nested he means implementing a fetchXml of something like this on a bounded dataset filter

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="entity_a">
    <attribute name="name" />
    <link-entity name="entity_ab" from="entity_aid" to="entity_aid" link-type="inner" alias="ac">
      <link-entity name="entity_b" from="entity_bid" to="entity_bid" link-type="inner" alias="ad">
        <filter type="and">
          <condition attribute="attr" operator="in">
            <value uiname="aa" uitype="entity_b">{56D33AE2-7906-EA11-A811-000D3A793530}</value>
            <value uiname="bb" uitype="entity_b">{976F38C2-EB01-EA11-A811-000D3A7972C1}</value>
            <value uiname="cc" uitype="entity_b">{2F03710B-EC01-EA11-A811-000D3A7972C1}</value>
          </condition>
        </filter>
      </link-entity>
    </link-entity>
  </entity>
</fetch>

as you can see, I'm not filtering on a first level linked entity but on a 2nd level and possible N-levels. 
Is this currently possible with filtering on bounded pcf datasets?

Thank you very much
Cheers!

 

Nested links are not possible - you can only add a single relationship from the root entity - think of it as the same as filtering on grid columns.
lpetzoldt
New Member

I think @ScottDurow is right about this, but support for nested linking should really be included in an update. It prevents many meaningful queries that would allow for more rich filtering and presentation.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,228)