cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aysan
Advocate II
Advocate II

Help with drop down generated from another list

Hello,

I have an app that is using some SharePoint lists as the data sources.I am trying to generate a dropdown list in my main list ( RFC) which reads the items from another list (Reviewers) 

The items in the drop-down are filtered based on the Level pf approvers (the Name field is person field)

Aysan_0-1643220643170.png

on my main list, I have created another field called L2 approvers(person field)

Aysan_1-1643220717277.png

on the app I could successfully load the required approvers which are marked as L2 

Aysan_2-1643220847873.png

 

I am using the selected value from the dropdown list Datacard

Aysan_6-1643221657131.png

The field gets submitted to the list with no issue

 

Aysan_3-1643221268052.png

I can see the field on form view mode as well 

Aysan_4-1643221430080.png

the issue is when I want to edit the form the drop down is blank and doesn't show the value 😞 

 

Aysan_5-1643221529437.png

thank you for your help

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Aysan 

No problem helping you!

 

So the problem is going to come in on how you have the lookups and the person columns set up.

You're kind of doubling the data in a sense...you have a Lookup to a record that is going to have the name in it, but then you are also storing that name in your list.  From a data standpoint, this could be an issue if you have changes in the future to names.

 

But, that said...

You need to get the record from the Reviewers list that is based on the stored approver name.

The question will be, is there only going to be one record in the Reviewers list that will have that L2 approver name in it?  Or will there be multiple rows potentially?

 

If there are potentially multiple records, then you really need to fall back to relying on the lookup.

 

But, I have a bigger question for you - If the Reviewers is a lookup and the user can choose the Reviewers in the form AND the reviewers record has a L2 approver named in it...then why is the user then able to edit that in the form?  Will this not cause is discrepancy in the data?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@Aysan 

Your dropdown is not a DropDown control, it is a Combobox.

As such, you will need to set the DefaultSelectedItems (DSI) property of the control to a valid record that will match the Items property of your combobox.

 

What is the Items property of the Combobox?  And, what is the DSI at this point?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes 

Thanks for your reply

DefaultSelectedItems = Parent.Default

Aysan_0-1643225990238.png

the item property is Filter(Reviewers,Level.Value ="L2") reviewer is the list of people in this Combobox I need to just list people who are L2

RandyHayes
Super User
Super User

@Aysan 

Yes...so that will *never* match anything!

In your Items you are returning complete records from your Reviewers list.  This will have every column in the record.

 

So, you have two columns in your list - Reviewers and Level2 Approver.  I'm referring to the list that the form is based on, not the lookup list (Reviewers).

 

Let's dig a little deeper:

1) What type of column is Reviewers and Level2 Approver in your primary list (again, not the Reviewers list you mentioned)?

2) What is the Default and Update property formulas for the Reviews and Level2 Approvers datacards?

3) What is the DSI and Items property on the Reviewers combobox?

4) Is Reviewers multi-select or single selection? Same question for Level2 Approvers.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi,

1) the Reviewers field is a lookup field and the L2 approver field is person type.

Aysan_0-1643231540181.png

2) both set to Thisitem.'field name'

Aysan_1-1643231609511.png    

Aysan_2-1643231644945.png

3)DSI for Reviewers is set to parent. default

4)Both are a single selection 

 

 

Just wanted to let you know that the L2 approver field submits to mail SharePoint list with no issue, I can see it on the list, just can`t see it on the edit form mode 😞 

 

Thank you for taking the time and helping me 

 

 

Sorry forgot to add update value for both fields 

Reviewers is set to DataCardValue8.Selected

Level2 approver is set to DataCardValue44.Selected.Name

Aysan_3-1643232143697.png

 

 

RandyHayes
Super User
Super User

@Aysan 

No problem helping you!

 

So the problem is going to come in on how you have the lookups and the person columns set up.

You're kind of doubling the data in a sense...you have a Lookup to a record that is going to have the name in it, but then you are also storing that name in your list.  From a data standpoint, this could be an issue if you have changes in the future to names.

 

But, that said...

You need to get the record from the Reviewers list that is based on the stored approver name.

The question will be, is there only going to be one record in the Reviewers list that will have that L2 approver name in it?  Or will there be multiple rows potentially?

 

If there are potentially multiple records, then you really need to fall back to relying on the lookup.

 

But, I have a bigger question for you - If the Reviewers is a lookup and the user can choose the Reviewers in the form AND the reviewers record has a L2 approver named in it...then why is the user then able to edit that in the form?  Will this not cause is discrepancy in the data?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes  thank you for those questions 🙂 it got me thinking, I have decided to use power Automate and filtering to choose the right L2 approvers. Also, a lesson learned for myself, which is to try to avoid from Lookup fields as much as I can.

 

Thank you!

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (2,536)