Search code examples
sharepointpowerapps

Patching a SharePoint list from a PowerApp?


I am trying to program a Power App to be used for streamlining an interview process. The user will select a candidate from a dropdown and then select scores during the interview. On selecting a submit button, I would like the selected scores to be added to empty columns in a SharePoint list in the correct row based on candidate name from the dropdown.

Patch('Assessment Center Test Data', 
First(Filter('Assessment Center Test Data', Name = CBI_CandidateDropdown.Selected.Value)),
{ScoreTest : CBI_DR_OverallScore.Selected.Value
}
)

The above code is what I tried, where 'Assessment Center Test Data' is the SharePoint list, 'Name' is the column in the list with existing names, and 'CBI_CandidateDropdown' is the name of the dropdown to select the candidate. 'ScoreTest' is the empty column I am trying to add the overall score to.

I get an error on the equal sign after Name and on the .Value after 'CBI_CandidateDropdown'.


Solution

  • Could you try with a LookUp with the filter Name = CBI_CandidateDropdown.Selected.Name instead of First & Filter

    Patch(
       'Assessment Center Test Data', 
       LookUp('Assessment Center Test Data', Name = CBI_CandidateDropdown.Selected.Name),
       {
          ScoreTest : CBI_DR_OverallScore.Selected.Value
       }
    )
    

    If there is still an error, can you share SharePoint structure of list? What is the type of Name, ScoreTest, CBI_CandidateDropdown and CBI_DR_OverallScore?