cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Changing Value in Sharepoint via PowerApps

Hi guys,

 

I have an app that gets data from a form and creates a Gallery and submits the data to a sharepoint list. I'd like to be possible to edit two of the gallery's columns to the sharepoint database via a dropdown list.

 

I've been trying to use the following code but with no results:

"OnChange":

 

 UpdateIf(
        'Gestão Ingest Linhas';
        Prioridade = ThisItem.Prioridade;
        {
            Prioridade: 2})

 

'Gestão Ingest Linhas' is the name of my database

"Prioridade is the name of the column I'd like do edit.

 

I also tried using "Prioridade.Value" but with no success.

 

Best Regards,

Gabriel

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi@gabrielpinheiro,

Based on the issue that you mentioned, do you want to update the 'Prioridade' column in your SP list?

Could you please share a bit more about your scenario?

  1. Is there a Dropdown for you to assign value to the 'Prioridade' column?
  2. What is the column type of the 'Prioridade' column, a Choice, or a Text?
  3. Do you want to update the whole 'Prioridade' column or just a field within it?

Further, an error message screenshot will be better.

I have a test on my side, there is a Dropdown to update the Prioridade' field.

  •  If the 'Prioridade' column is a Text type.

The formula you provided will update the whole 'Prioridade' column rather than a field value. If you just want to update one field, you could try the Patch() function.

Set the OnSelect property of the ">"  within the Gallery as below:

 

Patch(
    '0825',
    ThisItem,
    {Prioridade: Dropdown1.Selected.Value}
)

 

  • If the 'Prioridade' column is a Choice type, set the OnSelect property of the ">"  within the Gallery as below:

 

Patch(
    '0825',
    ThisItem,
    {Prioridade1: {Value:Dropdown1.Selected.Value}}
)

 

  • If the 'Prioridade' column is a Choice type and you want to update the whole 'Prioridade' column, please try the following:

 

UpdateIf(
    '0825',
    Prioridade = ThisItem.Prioridade,
    {Prioridade1: {Value: Dropdown1.Selected.Value}}
)

 

Or

 

UpdateIf(
    '0825',
    Prioridade = ThisItem.Prioridade,
    {Prioridade1: {Value: 2}}
)

 

Best Regards,

Qi

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi@gabrielpinheiro,

Based on the issue that you mentioned, do you want to update the 'Prioridade' column in your SP list?

Could you please share a bit more about your scenario?

  1. Is there a Dropdown for you to assign value to the 'Prioridade' column?
  2. What is the column type of the 'Prioridade' column, a Choice, or a Text?
  3. Do you want to update the whole 'Prioridade' column or just a field within it?

Further, an error message screenshot will be better.

I have a test on my side, there is a Dropdown to update the Prioridade' field.

  •  If the 'Prioridade' column is a Text type.

The formula you provided will update the whole 'Prioridade' column rather than a field value. If you just want to update one field, you could try the Patch() function.

Set the OnSelect property of the ">"  within the Gallery as below:

 

Patch(
    '0825',
    ThisItem,
    {Prioridade: Dropdown1.Selected.Value}
)

 

  • If the 'Prioridade' column is a Choice type, set the OnSelect property of the ">"  within the Gallery as below:

 

Patch(
    '0825',
    ThisItem,
    {Prioridade1: {Value:Dropdown1.Selected.Value}}
)

 

  • If the 'Prioridade' column is a Choice type and you want to update the whole 'Prioridade' column, please try the following:

 

UpdateIf(
    '0825',
    Prioridade = ThisItem.Prioridade,
    {Prioridade1: {Value: Dropdown1.Selected.Value}}
)

 

Or

 

UpdateIf(
    '0825',
    Prioridade = ThisItem.Prioridade,
    {Prioridade1: {Value: 2}}
)

 

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (49,725)