cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Continued Contributor
Continued Contributor

Cascading drop down only if populated in item along with other columns

I have 4 drop downs in a edit form:

 

Matter - Matter_DropDown

Assignment LOB Description - LOB_DropDown

SIC (visible/ required only if Matter = Tax or Matter = Business Advisory Services) -SIC_DropDown

Client Name/ Assignment - Client_CardValue

 

Client Name is a selection that is filtered down by all above it: Matter, Assignment LOB, SIC).

 

How do I write the items so that it only filters for SIC if Matter = Tax or Matter = Business Advisory Services?

 

This is what I have right now:

 

Client_CardValue - Items:

 

Distinct(

  Sort(

    Filter(

      '[dbo].[vps_App_ICWO_HCM_CA_Client]',

      MATT_CAT_CODE_Desc = Matter_DropDown.SelectedText.Result &&

        Assignment_LOB_Desc = LOB_DropDown.Selected.Result), CLIENT_NAME), CLIENT_NAME)

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @TesDA ,

Could you please share a bit more about your scenario?

Do you want to add the SIC_Dropdown filter to your current Filter formula only when the Matter = Tax or Matter = Business Advisory Services?

 

Based on the needs that you mentioned, I think the If function could achieve your needs. Please consider take a try with the following workaround:

Set the Items property of the Client_CardValue to following:

Distinct(
         Sort(
               Filter(
                     '[dbo].[vps_App_ICWO_HCM_CA_Client]',
                      MATT_CAT_CODE_Desc = Matter_DropDown.SelectedText.Result,
                      Assignment_LOB_Desc = LOB_DropDown.Selected.Result,
                      If(
                          Matter_DropDown.SelectedText.Result = "Tax" || Matter_DropDown.SelectedText.Result = "Business Advisory Services",
                          SIC_Desc = SIC_DropDown.SelectedText.Result,  // SIC_Desc represenrs the field in your data source, please replace it with actual column name
                          true
                      )
               ), 
               CLIENT_NAME
         ), 
         CLIENT_NAME
)

 

If you want to hide the SIC data card in your Edit form, please try the following workaround:

Set the Visible property of the SIC data card in your Edit form to following:

If(
   Matter_DropDown.SelectedText.Result = "Tax" || Matter_DropDown.SelectedText.Result = "Business Advisory Services",
   true,
   false
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @TesDA ,

Could you please share a bit more about your scenario?

Do you want to add the SIC_Dropdown filter to your current Filter formula only when the Matter = Tax or Matter = Business Advisory Services?

 

Based on the needs that you mentioned, I think the If function could achieve your needs. Please consider take a try with the following workaround:

Set the Items property of the Client_CardValue to following:

Distinct(
         Sort(
               Filter(
                     '[dbo].[vps_App_ICWO_HCM_CA_Client]',
                      MATT_CAT_CODE_Desc = Matter_DropDown.SelectedText.Result,
                      Assignment_LOB_Desc = LOB_DropDown.Selected.Result,
                      If(
                          Matter_DropDown.SelectedText.Result = "Tax" || Matter_DropDown.SelectedText.Result = "Business Advisory Services",
                          SIC_Desc = SIC_DropDown.SelectedText.Result,  // SIC_Desc represenrs the field in your data source, please replace it with actual column name
                          true
                      )
               ), 
               CLIENT_NAME
         ), 
         CLIENT_NAME
)

 

If you want to hide the SIC data card in your Edit form, please try the following workaround:

Set the Visible property of the SIC data card in your Edit form to following:

If(
   Matter_DropDown.SelectedText.Result = "Tax" || Matter_DropDown.SelectedText.Result = "Business Advisory Services",
   true,
   false
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,733)