cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sasidhar_mudra
Helper III
Helper III

Filter choices in Edit Form from SharePoint List

@v-monli-msft ,

Hi Mona,

Hope you are doing great J

I created an app from SharePoint List. I am failing to get the filtered options. Hope you can help.

Below is the scenario.

I have a SharePoint List created with EMP ID, EMP Name, Manager Name, etc… EMP Name & Manager Name being CHOICE fields.

Question 1: I want to filter the employee names when I select Manager Name in the EditForm in PowerApps. Can we achieve this? If yes, how?

Attaching the screenshots for your reference.

list1.jpgskip1.jpgskip2.jpg

 

Question 2: Since I was not able to do so, I worked around creating a Blank App with DropDown(datasource as SP list – Manager Name column) and ListBox(datasource as SP list – Employee Name Column) to select multiple employees. However, the ListBox is moving all over the screen when I am scrolling down instead of staying in the employee datacard and later I realised that the ListBox was not added inside the Form but outside the Form

Can I create a Blank App and from the App, can I gather this information to a Sharepoint List?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @sasidhar_mudra ,

Couple of things:

Using a choice column in SharePoint on the backend usually makes things a little more complicated Smiley Happy

Also, specifying a column designation in your filter formula on a dropdown/combobox while there is also a column designation applied in the properties for the control sometimes confuses the issue.

Try this on the DataCardValue17 Items: property

Filter(skip_test1, Manager_0x0020_Name.Value=DataCardValue18.Selected.Value)

Then, specify the Manager_0x0020_Name column designation using the Value property dropdown under Items:

The properties I'm talking about are the blank fields Items: and Value: below

ddprop.png

Let me know how it goes,

RT

View solution in original post

@RusselThomas 

 

Apologies, I did not get a chance to work on this earlier, hence could not respond. I did try this on the old app i created and it worked somehow 😉

 

Thanks RT. You solved the issue I was struggling with for long... Now I have two apps and I think, i can develop this kind of app in short time whenever there is a need 🙂

 

Thanks a lot again.

 

 

Regards
Sasidhar

View solution in original post

10 REPLIES 10
RusselThomas
Microsoft
Microsoft

Hi @sasidhar_mudra ,

 

So, not sure about Question2, but for Question1 assume;

  • (Manager DropDown Control) = DataCardValue13
  • (Employee DropDown Control) = DataCardValue17
  • "Manager Name" column is referred to as Manager_0x0020_Name
  • "Employee Name" columns is referred to as Employee_0x0020_Name

Set DataCardValue17 Items: property:

Filter(skip_test1, Manager_0x0020_Name=DataCardValue13.Selected.Manager_0x0020_Name)

Set the Value property of the control to the Employee Name column.

That should filter your Employee dropdown by all those employees who have the same manager as the one selected in the Manager dropdown.

Hope this helps,

RT

Thanks RT for the quick response. I tried this Filter() earlier, however i do not know how to change the value property of the control. I guess, I am missing something here.
 
Can you please help me on how to change the control property and where? I still see the error 😞skip3.jpg

 

Regards

Sasi

Hi @sasidhar_mudra 

I made an assumption about the column name as there appeared to be spaces in it - it's probably wrong.

Create a label, (anywhere)- set it's Text property to First(skip_test1). and when the prompt shows you the columns, find the one that is the Manager Name column.  Whatever that's called, use that in the formula in place of Manager_0x0020_Name.

 

Kind regards,

RT

@RusselThomas ,

 

No RT, your assumption was not wrong. The column name has spaces in it. I tried giving the control property a value and it look like below. Though there is no error, i am not able to see the employee names in the preview.

 

Filter(skip_test1, Manager_x0020_Name.Value=DataCardValue18.Selected.Value).Manager_x0020_Name

Screenshots for better understanding.

 

Formula looks goodFormula looks goodEmployee names are not visible in the previewEmployee names are not visible in the preview

Also, since i am not a full time programmer, it is becoming difficult for me to understand your response 😞

 

 

Thanks

Sasi

Hi Sasi,

 

Can you take the screenshots with the properties of the control visible on the right hand side of the screen?

One for the manager dropdown and one for the employee dropdown please 🙂

 

Specifically, I need to see the Items: and the Value: property for each dropdown.

Thanks!

 

Kind regards,

RT

@RusselThomas ,

 

Thanks alot for helping me with this 🙂

 

I strongly believe I am missing something here. PFB screenshots for your reference. I am attaching two screenshots for Manager & Employee columns.

 

skip6.jpgskip7.jpgSkip8.jpgSkip9.jpg

 

Thanks

Sasi

Hi @sasidhar_mudra ,

Couple of things:

Using a choice column in SharePoint on the backend usually makes things a little more complicated Smiley Happy

Also, specifying a column designation in your filter formula on a dropdown/combobox while there is also a column designation applied in the properties for the control sometimes confuses the issue.

Try this on the DataCardValue17 Items: property

Filter(skip_test1, Manager_0x0020_Name.Value=DataCardValue18.Selected.Value)

Then, specify the Manager_0x0020_Name column designation using the Value property dropdown under Items:

The properties I'm talking about are the blank fields Items: and Value: below

ddprop.png

Let me know how it goes,

RT

View solution in original post

@RusselThomas ,

 

Yes RT, you are right. Having Choice column in sharepoint is complicated. Hence I created a new form and achieved something. Will share the screenshots shortly after my working hours. However, I do not see the output i want.

 

Regards

Sasidhar

@RusselThomas ,

 

Hi RT,

Thanks a lot for bearing with me & trying yo help me.

 

Please find the below details of my new app i created instead of old one.

 

Hi RT,

Since i was not able to achieve what I wanted with the form I created earlier, created a new one and the below are the details.

Form1:

I created a Form with first page from SP list I have and later changed the DataCardValue from EDIT TEXT to ALLOWED VALUES which gave me DropDown to select Manager Name and added ListBox to select Multiple employees as I was not able to select multiple associates with the ALLOWED VALUES setting. The Update: of Manager Name Parent card has to be changed to DataCardValue.Selected.Result

(Note: I change the column in SP list to Single line of text instead of Choice)

To filter duplicated manager names, I used Distinct()

To filter employee names by Manger Name, I used Filter(). Update: of Employee Name Parent card has to be DataCardValue.Selected.Employee_x0020_Name

Form2:

Second Form has all TextBoxes to add comments from the meeting conducted (All allows multiple lines of text)

Form3:

Need only notes here. So added text box.

Since I want to add the values to new SP list, I created  New SP list (savefromskiplevel) and Patched the above form information in the new SP list instead of updating record in the existing SP list (skip_test1)

I failed couple of times to update the data in new SP list but after sometime, I somehow managed to update the new SP list with the required data.

The only problem now I have is, though I select multiple employee names in Form1, the new SP list is accepting only 1 employee name. Tried looking for answers in community & I see that there is a Concat() function available. Problem is I am not sure on how to use it in Form1, Employee Name (ListBox) to add multiple employee names to SP list.

Let me know if you have can help me here

 

ScreenShots in order Form1, Form2, Form3, SP list (to add new record in SP List (savefomskiplevel))

Screenshot1_Survey.JPGScreenshot2_Survey.jpgScreenshot3_Survey.jpgScreenshot4_Survey.jpgScreenshot5_Survey.jpg

Patch formula i used to execute the app.

 

Patch(savefromskiplevel3, Defaults(savefromskiplevel3),{Title: "New",'Manager Name':DataCardValue38.Selected.Result,'Employee Name':DataCardValue39.Selected.Employee_x0020_Name,
Date:DataCardValue36.SelectedDate,
Strengths:DataCardValue43.Text,
Start_Continue:DataCardValue44.Text, 
Stop:DataCardValue45.Text, 
'Action Plan':DataCardValue26.Text});

 

Thanks

Sasidhar

 

 

 

 

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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

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.

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