Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • CU22100725-0 Profile Picture
    129 on at
    Re: Filter choices in form

    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".

  • Shaheer Ahmad Profile Picture
    2,194 Super User 2025 Season 1 on at
    Re: Filter choices in form

    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")
  • Hassan_SZ_365 Profile Picture
    542 on at
    Re: Filter choices in form

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,962 Most Valuable Professional

Leaderboard