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 / Filter choices in form
Power Apps
Unanswered

Filter choices in form

(0) ShareShare
ReportReport
Posted on by 129

Hello,

I have an application that uses different forms with different dataverse data types.

 

Here is a screenshot of my app:

TomVictor_0-1699613035809.png

 

I need to filter the "Order" line and the "Line/task" line which are, in the dataverse database, lookups.

 

How do I do this?

 

Thanks,

Tom Victor

Categories:
I have the same question (0)
  • Hassan_SZ_365 Profile Picture
    542 on at

    Hi @TomVictor ,

    To filter lookup fields in a form in Power Apps, especially when using Dataverse, you can set the Items property of the data card to a filtered dataset based on the selected value of another field. Here is a concise explanation of how to do this:

    1. Set up the Relationship: Ensure that the lookup fields in Dataverse have a relationship that reflects the dependency you want to enforce in the app.

    2. Use the Filter Function: On the Items property of the "Line/task" data card, use the Filter function to filter the available choices based on the selected "Order".

    3. Apply the Filter: Assuming that "Order" is selected in a dropdown or combobox named ddOrder, you could set the Items property of the "Line/task" dropdown or combobox to something like this:

     

    Filter('YourLineTaskEntity', 'LookupFieldOnLineTaskEntity'.'RelatedField' = ddOrder.Selected.'PrimaryKeyField')

     

    Replace 'YourLineTaskEntity', 'LookupFieldOnLineTaskEntity', 'RelatedField', and 'PrimaryKeyField' with the actual names from your Dataverse schema.

    Remember to replace placeholders with actual field names and ensure that proper relationships exist in your Dataverse schema. If the "Order" field is not a dropdown but a different control type, you will need to adjust the formula to match.

     
     

    Cascading Dropdowns: If you need a cascading effect, where selecting an "Order" filters the "Line/task" options, and selecting a "Line/task" filters another set of options, apply similar logic to each dependent dropdown.
    Best Regards,
    Hassan Raza

  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Select your Dropdown. Select the "Items" Property Copy the existing code.

    Lets Assume the existing code is "exsitingCode"

    Filter(existingCode, YourColumnName = "Value you want to filter")

    if your column name has space

    Filter(existingCode, 'Your Column Name' = "Value you want to filter")
  • CU22100725-0 Profile Picture
    129 on at

    Hi @Hassan_SZ_365 @ShaheerAhmad ,

     

    It don't seem to work for me, I do have my dependency between my different dataverse columns.

     

    I'm sending you a screenshot of the names of my 3 lookup columns.

     

    TomVictor_0-1699614966341.png

     

    To be even more precise, "Commande" is filtered according to the choice of "Client" and "Ligne/tâche" is filtered according to the choice of "Commande" and "Client".

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard