cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
Super User III
Super User III

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.

 

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

'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" 

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

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

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.

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? 

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.

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
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (27,050)