cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Carmen15
Helper IV
Helper IV

How to make a field In PowApps to show me multiple options to be chosen from another SP List

Hi 

 

I have tried to adopt different solutions that I have found here and were similar with what I need but nothing worked. 

 

I have an EditForm in PowApps connected to a SPList1  that looks as below ( the list is empty because my intention is to create rows here by submitting the form)

ReceivingPlant is choice type ; ReceivingCompanyCode is Single Line of Text type and ReceiverApproval is Person or Group type

Carmen15_0-1610025941560.png

I do have also the SPList2 that is an ApprovalMatrix and looks like below. The CompanyCode is Single Text of Line and Approver is Person or Group.

 

Carmen15_1-1610026244666.png

 

 

Looking to the EditForm ,I made the field ReceivingCompanyCode to show me automatically (I used lookup) the values  from another SPList3 .So this is working fine. 

 

Now , I need to make the field ReceivingApprover to show me all available options from the SPList2 (approval matrix) for the company code that will be displayed on ReceivingCompanyCode filed. Non of these columns are choices but I would like to have on the field ReceivingApprover the possibility to chose one of the options available in approval matrix for the corresponding company code .

 

 

Carmen15_3-1610026423167.png

 

For example : In the moment I select ReceivingPlant : AE05 , automatically to be displayed the ReceivingCompanyCode:AE13 and a dropdown list with the three options for the ReceivingApprover , options that I do have them in Approval matrix list for specific AE13.

 

 

Is this possible ? 

 

I tried to put Lookup formula in Default property for ReceivingApprover like : 

LookUp(ApprovalMatrix.'Company Code'= DataCardValue10.Text), Choices([@'ApprovalMatrix'].Approver))

and  also to change the Item propriety with Choices([@'ApprovalMatrix'].Approver)

but without any success. 😞 

Any support ? 

Thank you very much! 

 

 

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@Carmen15 

Ah a new week and a clearer look at what you are doing...

 

So, you are seeing something that you can't do directly like that in PowerApps.  Here is what you will need on the Items property:

ForAll(Filter(ApprovalMatrix, 'Company Code' = DataCardValue10.Text),
    ThisRecord.SinglePerson
)

This will return the property records and you should be able to set the information in the Edit Fields.

 

See how that goes for you. 

_____________________________________________________________________________________
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.
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

RandyHayes
Super User
Super User

@Carmen15 

Yes, you need to use the formula that I provided:

ForAll(Filter(Approval_Matrix , 'Company Code' = DataCardValue10.Text), ThisRecord.Approver) 

 

What you are seeing is that the Combobox fields default to claims.  That is the claims value of the person.

Go into the Field -> Edit of the Combobox (in the right properties pane) and set your primary and secondary texts and search fields to be the one that you want to display and search.

That will give you what you want.

_____________________________________________________________________________________
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.
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

14 REPLIES 14
RandyHayes
Super User
Super User

@Carmen15 

Please consider the following:

Set the Items property of the ReceivingApprover dropdown to the following:

   Filter(ApprovalMatrix, 'Company Code' = DataCardValue10.Text)

 

Remove the formulas from the Default property.  Default is used to set the default selected item, not to populate the list.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Thank you Randy! 

It didn't work  😞 

I believe there is still missing something to be set there .

Carmen15_0-1610097774274.png

 

Hi @Carmen15 

looks to my like you are almost there since your dropdown seems to show 3 entries (which it should) but it doesn't know which column to show.

 

Does changing the items property to

 

Filter(ApprovalMatrix, 'Company Code' = DataCardValue10.Text).Approver

 

work?


Carmen15
Helper IV
Helper IV

Thank you Nils ! It doesn't work 😞 

It is showing the same as above ; three options in dropdown but no value displayed . 😞 

RandyHayes
Super User
Super User

@Carmen15 

You appear to have some information in the combobox.  When you do Edit Fields, what is the field for the combobox Primary Text?

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

When I do edit to the field I am seeing this : 

 

Carmen15_0-1610361055949.png

 

RandyHayes
Super User
Super User

@Carmen15 

Ah a new week and a clearer look at what you are doing...

 

So, you are seeing something that you can't do directly like that in PowerApps.  Here is what you will need on the Items property:

ForAll(Filter(ApprovalMatrix, 'Company Code' = DataCardValue10.Text),
    ThisRecord.SinglePerson
)

This will return the property records and you should be able to set the information in the Edit Fields.

 

See how that goes for you. 

_____________________________________________________________________________________
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.
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

Carmen15
Helper IV
Helper IV

Hi Randy , 

 

I put the formula indicated by you and it didn't work . But, based on your indications ,I had another idea and it seams that it works !!!✌️

 

I have inserted a ComboBox on my Data Card (ReceivingApprover) and put on Item property the formula : 

ForAll(Filter(Approval_Matrix , 'Company Code' = DataCardValue10.Text), ThisRecord.Approver.DisplayName) 

 

Now it is showing me all three options that I need 🙂 

 

Thank you so much! You are the best! 

RandyHayes
Super User
Super User

@Carmen15 

LOL...actually now looking at my formula I provided, I had copied and pasted that from another app I have and forgot to change the "SinglePerson" part to match what you needed.  Oops!

 

I am glad you figured that out and it is working now for you.

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,500)