cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TimRohr
Level 10

Re: Cascading Dropdowns - Cant seem to get it.

Can you share the structure of your data now? It will impact how we tweak your formula.

 

Here's a starting point. Modify this and post back.

 

╔════════════════════════════════════════════════╗
║ SharePoint List: Companies ║
╚════════════════════════════════════════════════╝
│ Company (unique identifier) │
│ ...other descriptive fields if necessary │
└╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼┘

═╗
SharePoint List: Markets
════════════════════════════════════════════════
Market Dept (unique identifier)
...other descriptive fields if necessary
╼┘

╔════════════════════════════════════════════════╗
║ SharePoint List: Marketing Requests ║
╚════════════════════════════════════════════════╝
│ Company │
│ Market Dept │
└╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼╼┘
In the above table, Marketing Requests, the combo of Company & Market Dept should be unique.

 

 

pocketens
Level: Powered On

Re: Cascading Dropdowns - Cant seem to get it.

Yes that is done. 

TimRohr
Level 10

Re: Cascading Dropdowns - Cant seem to get it.

Make sure you have added those other lists as datasources. Then your function for the Market dropdown would be something like:

 

Filter('Marketing Requests', Company.Id = CompanyDataCard)

 

After you type the period following Company, you should see the "Id" option (in blue, above). If you don't, use the set of options powerapps gives you.

Make sure the orange bit is correctly referencing your Company dropdown, and that it is getting the right piece of data.

pocketens
Level: Powered On

Re: Cascading Dropdowns - Cant seem to get it.

Yes I have all that information in there, but when I test the app out, the market/dept field has zero options?

TimRohr
Level 10

Re: Cascading Dropdowns - Cant seem to get it.

Can you post your current formula for both dropdowns so we can see what you have?

pocketens
Level: Powered On

Re: Cascading Dropdowns - Cant seem to get it.

THe company field is this : Choices('Marketing Requests'.Company)

 

The Market Dept field is this(currently): Filter('Marketing Requests',Company.Id = CompanyDataCard)

Originally it was this : Choices('Marketing Requests'.Market_x002f_Dept)

TimRohr
Level 10

Re: Cascading Dropdowns - Cant seem to get it.

Does CompanyDataCard get you the data you are after? That is, if you assign a Label to have a Text property of CompanyDataCard, does it fill with the right information after you make a selection in that dropdown? Because if you are referring to the dropdown, itself, you're going to need the .Selected.Value or .Selected.Company, depending on how you structure your Items for the Company dropdown.

 

Speaking of that, I wouldn't pull the Companies from the Marketing Requests list... unless you're going to have Companies in your Company list that won't appear in the Marketing Requests list (that is, they won't be "active"). Provided I had ensured that the data would be properly linked between Company and Marketing Requests, I would probably use the Companies list as the Items for the Company dropdown (it is already a 1-for-1 representation of the Companies):

Companies

 

On the other hand, if I was worried that a Company might be "inactive" or that I might in the future have a Company like that, I might try, instead:

SortByColumns(Distinct('Marketing Requests', Company), "Result")

 

 

pocketens
Level: Powered On

Re: Cascading Dropdowns - Cant seem to get it.

OoOOH K. I got it figured out, a couple of weeks late, but yes. (I moved the columns from Sharepoint list and used excel just to reference them and it worked, ish) Now I am having a different issue, where I try and "Collect" the data and its not showing up in the Sharepoint List. Trying to use this format for the submit button(its no longer just a "form" its individual dropdowns and fields and such:

 

Collect('Marketing Requests',{Company_1:Text(CompanyDD.Selected.Value)},{Market_dept1:Text('Market DD'.Selected.Value)})
 

 

And nothing works. BLAH

TimRohr
Level 10

Re: Cascading Dropdowns - Cant seem to get it.

Collect() won't write data to your connected datasource... It just writes data to a "virtual" object, which you happen to name the same thing as your SharePoint list.

 

You want to use Patch(), instead.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 345 members 5,722 guests
Please welcome our newest community members: