Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Dropdown Filtering Not Working as Expected in Edit Form

(0) ShareShare
ReportReport
Posted on by 62

I'm facing an issue with a dropdown in a PowerApps edit form. I want the dropdown options to change dynamically based on the value of a specific column in a SharePoint list called "SQDCP_impact". Here's my current code and a screenshot of it, 
CODE: If(
!IsBlank(ThisItem.ID),
Filter(
["Minor", "Major", "Critical", "Product Safety", "Big Incident", "Low risk incident (yellow)", "High risk incident (red)", "Injury without absence (yellow)", "Injury with absence (red)"],
Or(
!IsBlank(Find("Quality", ThisItem.SQDCP_impact)),
!IsBlank(Find("Delivery", ThisItem.SQDCP_impact)),
!IsBlank(Find("Cost", ThisItem.SQDCP_impact)),
!IsBlank(Find("People", ThisItem.SQDCP_impact))
)
),
// Default options if record is new (ThisItem.ID will be blank)
If(
ThisItem.SQDCP_impact = "Quality",
["Minor", "Major", "Critical", "Product Safety", "Big Incident"],
If(
ThisItem.SQDCP_impact = "Safety",
["Low risk incident (yellow)", "High risk incident (red)", "Injury without absence (yellow)", "Injury with absence (red)"]
)))
Screenshot (209).png

  • I expect the dropdown to show "Minor", "Major", etc., options when 'SQDCP_impact' includes "Quality," "Delivery," "Cost," or "People."
  • If 'SQDCP_impact' contains "Safety," it should show the "Low risk incident", etc. options.
  • Currently, the filtering isn't working consistently. when the record SQDCP_impact' includes "Quality," "Delivery," "Cost," or "People." it shows ALL the options but if it the record's SQDCP_impact = "Safety" the dropdown is blank by default and does not show any options.

    SIDE NOTE: The 'SQDCP_impact' column can only contain one of the keywords (Quality, Delivery, Cost, People, Safety) at a time.

EDIT: I am also aware I could go for the easier option of just making the dropdown selection everything but this is not what I am trying to achieve

Categories:
  • PolarMare Profile Picture
    PolarMare 62 on at
    Re: Dropdown Filtering Not Working as Expected in Edit Form

    Thank you!

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 145,567 on at
    Re: Dropdown Filtering Not Working as Expected in Edit Form

    Hi @SeifAltamimi ,

    I cannot see your model or data, but based on your requirements list, this structure should be a good start.

    With(
     {
     _Table1:
     ["Minor", "Major", "Critical", "Product Safety", "Big Incident", "Low risk incident (yellow)", "High risk incident (red)", "Injury without absence (yellow)", "Injury with absence (red)"],
     _Table2:
     ["Minor", "Major", "Critical", "Product Safety", "Big Incident"]
     },
     If(
     !IsBlank(ThisItem.ID),
     If(
     ThisItem.SQDCP_impact in ["Quality", "Deleivery", "Cost", "People"],
     _Table2,
     "Safety" in ThisItem.SQDCP_impact,
     _Table1
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard