cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KatLane
Helper I
Helper I

Power Apps Drop Down from Sharepoint List - customise to show these items if this option is selected

Hi.

 

I have a sharepoint list and I'm customising the form in power apps.

 

I have a drop down list of documents, but I only want certain items to be visible based on a previous selection.

 

For example the three document categories I have are 'Employment', 'Maintenance' and 'CPD & Licensing'.

 

If I select 'CPD & Licensing', I only want to see 'Real Estae Certificate / Licence' and 'CPD Statement' to appear.

If I select 'Maintenance', I only want to see 'Drivers Licence', 'Car Insurance', 'Car Registration' etc.

If I select 'Employment', I only want to see 'Letter of Offer', 'Job Description', 'Employment Agreement' etc.

 

I'm aiming to remove the margin for error in which category certain documents belong.

 

Currently I have one column in my SP list and I've customised the items for the CPD & Licensing category.

 

I've also added additional fields through Power Apps for the other two categories and customised those item lists.

 

I've used this formula (and variations of same based on which category and list I'm linking) with success to only show the specified items, by way of only showing the document list that relates to that category.  So I have three versions of the below code, one for each category and its matching document list.

 

If(DataCardValue5.Selected.Value="CPD & Licensing",true,false)

 

BUT, the other two document lists aren't displaying in the SP list, because they were created directly in Power Apps.

 

See below, you'll notice that there are no document types listed next to 'Maintenance' or 'Employment'.

KatLane_0-1632292646756.png

 

I dont want to recreate the other two in SP as this will give me three columns with staggered results depending on which category is picked.  I want to display one 'Document Type' column in SP, filled with the correct document type for that category.

 

So I'm after a solution to either display the other two document type lists in SP (without adding them in side by side so they look like three different columns) or a formula to be able to have one document type list, but only display the nominated items based on the document category picked.

 

Also, side note, does anyone know why 'CPD Statement' is displaying differently to 'Real Estate Certificate / Licence' when they're both in the same category?

KatLane_1-1632292735070.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
C-Papa
Super User
Super User

Hi, you can do this with IF() function on your dropdown items, the below formula should do it...

 

If(Dropdown1.Selected.Value = "CPD & Licensing",["Real Estate Certificate / Licence", "CPD Statement"],If(Dropdown1.Selected.Value = "Maintenance",["Drivers Licence","Car Insurance","Car Registration"],If(Dropdown1.Selected.Value = "Letter of Offer",["Letter of Offer","Job Description","Employment Agreement"])))

 

Dropdown1.Selected.Value is you first dropdown that filters the second, you may need to change the name / element to suit. 

 

View solution in original post

2 REPLIES 2
C-Papa
Super User
Super User

Hi, you can do this with IF() function on your dropdown items, the below formula should do it...

 

If(Dropdown1.Selected.Value = "CPD & Licensing",["Real Estate Certificate / Licence", "CPD Statement"],If(Dropdown1.Selected.Value = "Maintenance",["Drivers Licence","Car Insurance","Car Registration"],If(Dropdown1.Selected.Value = "Letter of Offer",["Letter of Offer","Job Description","Employment Agreement"])))

 

Dropdown1.Selected.Value is you first dropdown that filters the second, you may need to change the name / element to suit. 

 

That's perfect, thank you 😀

 

I also managed to figure out why some of types look different - format column > choice pills!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,845)