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)"]
)))
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
Thank you!
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