Hello,
I have an application that uses different forms with different dataverse data types.
Here is a screenshot of my app:
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
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.
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".
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")
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:
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.
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".
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
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,962
Most Valuable Professional