cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Challenge getting simple cascading drop-down working

I have what I thought was a simple cascading drop-down menu challenge. I figured this would only take 15 minutes to resolve and now 4 hours later I am reaching out to the community for help. I have a simple SharePoint list of Delivery Type Options. There are 2 columns on it ServiceOption and ServiceType. I have 2 drop-downs ServiceTypeOption and ServiceType. Here may be part of my issue. ServiceType is a simple "Choice" drop-down with 3 options USPS, UPS and FEDEX. This is coming from the main form list called PersonalUseForm. The ServiceTypeOption is a Lookup drop-down pulling from the Delivery Type Options list, ServiceOption column.

I am wondering if these both need to pull from the Delivery Type Options SP list in order to get the cascade to work properly?

I have tried everything as it is with no success.

 

I tried the new WYSIWYG approach that everyone seems to claim works: 

This gives me this code on the ServiceTypeOption for the Item function: 

Filter(DeliveryTypeOptions, ServiceType = DataCardValueServiceType.Selected.Value)

 

This gives no errors and I was really hopeful it would work as many say it does, as my usual luck, it does not. I get an empty drop-down

 

I also followed another post on here and tried this code for the ServiceTypeOption:

Filter(Choices([@DeliveryTypeOptions].ServiceType),Value in Filter(AddColumns(DeliveryTypeOptions,"T1", ServiceType.Value), ServiceOption= DataCardValueServiceType.Selected.Value).T1)

 

This also gives me an empty drop-down menu. I am thinking this shouldn't be this hard. Maybe the SharePoint list I have inherited is architected wrong however I have seen others with very similar lists mapping things like cities to States...

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

 

try this:

Distinct(
     Filter(
           DeliveryTypeOptions,
           ServiceType.Value = DataCardValueServiceType.Selected.Value
     ),
     ServiceOption
)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

4 REPLIES 4
v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about the "ServiceOption" column and "ServiceType" column in your Delivery Type Options list? The 'ServiceType' is Choice type field, the serviceOption' is a LookUp type field?

 

Do you want to display related Service Option values within the DataCardValueServiceTypeOption based on the selected ServiceType option?

 

According to the formula that you typed within the Items property of the DataCardValueServiceTypeOption, I think there is something wrong with it.

 

I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the DataCardValueServiceTypeOption ComboBox to following:

 

Filter(
       Choices(DeliveryTypeOptions.ServiceOption), // or type Choices([@DeliveryTypeOptions].ServiceOption) here
       Value in Concat(
                       Filter(DeliveryTypeOptions, ServiceType.Value = DataCardValueServiceType.Selected.Value),
                       ServiceOption.Value & ";"
                )
)

 

Note: I assume that the 'ServiceType' is Choice type field, the serviceOption' is a LookUp type field in your DeliveryTypeOptions List

then set the "Value" column as Display Column Value within the DataCardValueServiceTypeOption ComboBox.

 

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.
Anonymous
Not applicable

Sorry, the images below were supposed to accompany my initial post. I hope they help. 

To answer your question, The "Service Type" drop-down is a choice field pulling from the main "PersonalUseForm" list. 

The "ServiceTypeOption" is a lookup field pulling from the DeliveryTypeOptions list from the "ServiceOptions" column.

 

I tried plugging in your recommended code and am getting the red errors on the following:

Choices(DeliveryTypeOptions.ServiceOption),

I also tried your alternative with the same issues.

Choices([@DeliveryTypeOptions].ServiceOption),

WYSIWYG.PNGDeliveryTypeOptions.PNG

Hi @Anonymous ,

Does the "DataCardValueServiceTypeOption" ComboBox exist inside a Edit form?

Are the "ServiceOption" and "SourceType" column both Text type columns in your DeliveryTypeOptions List, right?

 

If the "ServiceOption" and "SourceType" column are both Text type columns in your DeliveryTypeOptions List, please try the following workaround:

Set the Items property of the "DataCardValueServiceTypeOption" ComboBox to following:

Distinct(
     Filter(
           DeliveryTypeOptions,
           ServiceType = DataCardValueServiceType.Selected.Value
     ),
     ServiceOption
)

Note: Please type above formula within the Items property of the "DataCardValueServiceTypeOption" ComboBox directly, rather than use the "Depends On" functionality of the ComboBox.

 

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.

Hi @Anonymous ,

 

try this:

Distinct(
     Filter(
           DeliveryTypeOptions,
           ServiceType.Value = DataCardValueServiceType.Selected.Value
     ),
     ServiceOption
)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (3,960)