cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Update a sharepoint list with data from another sharepoint list via dropdown patch function.

Hi Guys, 

 

I am currently building an app which will allow users to provide feedback to other colleagues.  

 

I have an existing sharepoint list named "MANGOW Staff List" that is maintained separately and documents all staff in a department.   

 

It contains the following fields 

 

  • Employee name  
  • Employee role
  • Emplee email
  • employee manager
  • managers email 

     

    Within power apps I have these linked as a data source. When you select employee name from the drop down list the other four fields automatically populate using the "depends on option"   

     

    I then have various other textboxes, dropdown lists and radio buttons to provide the feedback info when these are manually filled in and a button is submitted these update the second sharepoint list named "MANGOW Feedback" with no issues. 

     

    However when I try to do it with the dropdown lists that pull data from "MANGOW Staff List" the code doesn't work and I get an error stating "Name isn't valid - This identifier isn't recognised"  

     

     

    I am following the same format for the other drop down lists.  ( The line at the bottom "Employee Manager" isn't working ) 

     

 

Patch('Feedback Tracker',Defaults('Feedback Tracker'),
{
'Date of incident':DatePicker1.SelectedDate,
'Feedback Details':feedbackinfo.Text,
'Feedback Category':feedbacktypedropdown.Selected.Value,
'Product':productdropdown.Selected.Value,
'Fault Identifier':faultidentifyer.Text,
'complaint or escalation':Radio1.Selected.Value,
'Feedback Category':feedbacktypedropdown.Selected.Value,
'Employee Manager':tldropdown.Selected.value
})

 

 

errors.PNG

email.PNGemployee name.PNGmangow sharepoint.PNGstaff list.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

The second formula should work. That is changing the Last bit of the formula;

 

'Employee Manager':tldropdown.Selected.'Employee Name' 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

10 REPLIES 10
Highlighted
Super User III
Super User III

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

Can you show the Items or formula on the employee Manager Dropdown.

 

But try:

Patch('Feedback Tracker',Defaults('Feedback Tracker'), { 'Date of incident':DatePicker1.SelectedDate, 'Feedback Details':feedbackinfo.Text, 'Feedback Category':feedbacktypedropdown.Selected.Value, 'Product':productdropdown.Selected.Value, 'Fault Identifier':faultidentifyer.Text, 'complaint or escalation':Radio1.Selected.Value, 'Feedback Category':feedbacktypedropdown.Selected.Value, 'Employee Manager':tldropdown.Selected.ColumnNameDropdown })

 

Or

Patch('Feedback Tracker',Defaults('Feedback Tracker'), { 'Date of incident':DatePicker1.SelectedDate, 'Feedback Details':feedbackinfo.Text, 'Feedback Category':feedbacktypedropdown.Selected.Value, 'Product':productdropdown.Selected.Value, 'Fault Identifier':faultidentifyer.Text, 'complaint or escalation':Radio1.Selected.Value, 'Feedback Category':feedbacktypedropdown.Selected.Value, 'Employee Manager':tldropdown.Selected.'Employee Name' })

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Highlighted
Frequent Visitor

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

Hi Eka, 

 

Thanks once again for your support. 

 

This is the formula present when I click on the manager field. 

 

Filter('MANGOW Staff List', 'Employee Name' = namedropdown.Selected.'Employee Name') 

 

and here is a screenshot of the properties and depends on 

 

manager dropdown.PNG

Highlighted
Frequent Visitor

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

'Employee Manager':tldropdown.Selected.'Employee Name' - This is now updating the sharepoint list but is populating the employee name "namedropdown" and not their manager that appears in "tldropdown" 

Highlighted
Super User III
Super User III

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

The second formula should work. That is changing the Last bit of the formula;

 

'Employee Manager':tldropdown.Selected.'Employee Name' 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Highlighted
Frequent Visitor

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

It's only kind of working. It's putting in the employee's name instead of their manager. 

Highlighted
Super User III
Super User III

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

From the dropdown formula:

Filter('MANGOW Staff List', 'Employee Name' = namedropdown.Selected.'Employee Name') 

 

The name would be equal to namedropdown

 

You may have to look at this dropdown formula again.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Frequent Visitor

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

This is where im getting confused because within the app it is is displaying the correct data? Do you have any suggestions on what to look at in terms of the formula? 

Highlighted
Super User III
Super User III

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

Try:

1. Insert a Textbox4 then put the formula:

LookUp('MANGOW Staff List',

'Employee Manager'=nameDropdown.Selected.'Employee Name' ,'Employee Manager')

 

Then change the last portion of the patch to:

'Employee Manager': Textbox4.Text

 

Or

you add long formula into the Patch:

'Employee Manager':

LookUp('MANGOW Staff List',

'Employee Manager'=nameDropdown.Selected.'Employee Name' ,'Employee Manager')

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Frequent Visitor

Re: Update a sharepoint list with data from another sharepoint list via dropdown patch function.

I've managed to fix it.  Turned out I had the wrong values in at the end.  

 

All fields are now working. Thank you

 

Patch('Feedback Tracker',Defaults('Feedback Tracker'),
{
'Date of incident':DatePicker1.SelectedDate,
'Feedback Details':feedbackinfo.Text,
'Feedback Category':feedbacktypedropdown.Selected.Value,
'Product':productdropdown.Selected.Value,
'Fault Identifier':faultidentifyer.Text,
'complaint or escalation':Radio1.Selected.Value,
'Employee':namedropdown.Selected.'Employee Name',
'Employee Manager':tldropdown.Selected.'Team Leader',
'Employee Email':emaildropdown.Selected.Email,
'Manager Email':tldropdownemail.Selected.'Team Leader Email',
'Employee Role':roledropdown.Selected.Role
}) 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,900)