web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / FetchXML using selecte...
Power Apps
Unanswered

FetchXML using selected value of another field

(0) ShareShare
ReportReport
Posted on by 311

In my model-driven app, I'm using a PCF control "N to N Multiselect" on a form and I want to filter the options available in it based on the selected value of another field (a lookup) on the form.  The PCF control settings has an option to use a FetchXML Webresource for filtering the data.  How to I create FetchXML that looks at the selected value of the other field?

I have the same question (0)
  • magesoe Profile Picture
    80 on at

    You have an inherit problem in that the PCF is probably bound statically to the Fetchxml, but you want it to be changed dynamically.

     

    You could take a field value as an input by bounding the PCF to a field and do the filtering that way. That means you have to copy the PCF and modify the code to your needs

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @tschopp , 

    I had a look on the blog about the control: https://www.itaintboring.com/dynamics-crm/is-it-a-multiselect-optionset-nope-its-an-nn-lookup/ . In the comments below it, it seems that somebody solved the problem with a PlugIn registered on RetrieveMultiple.

     

    I'm thinking if it would be possible to solve your problem by defining the FetchXml with an extra "linked-entity" to the parent entity. Using the ColumnComparison in FetchXML (https://markcarrington.dev/2020/07/15/column-comparisons-in-fetchxml/?utm_campaign=Power%20Platform%20Developers%20Weekly&utm_medium=email&utm_source=Revue%20newsletter) you should be able to make a condition comparing with the parent entity attributes. That would filter the records as you need, right?

    Not sure if it works,  since I have't used the control.

     

    Hope it helps!

     

    Kind regards,

    Diana

     

     

     

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @tschopp , 

     

    Did this solved your issue? Were you able to solve it different?

     

    Kind regards,

    Diana

  • tschopp Profile Picture
    311 on at

    Hi @DianaBirkelbach ,

    I haven't gotten this to work yet.  It sounds like you can't compare columns across entities.  I'm thinking I'll need a javascript solution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 899

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 499

Last 30 days Overall leaderboard