cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerSäm
Continued Contributor
Continued Contributor

Change Sharepoint line/content with a specified ID

Hello all,

 

I have my powerApp stored with sharepoint. Now I want to change a line in sharepoint with powerapps, that means I want to say that when you click on a button, something should change in the line e.g. the row with the ID = 15. Is this possible?

 

A little more precise: I want that when I click on the button the status of an already created row changes. But I have to enter somehow which line should be changed.


Is it possible to formulate something like this:


Patch for line/ID 15(
SharepointContent;
Defaults(SharepointContent);
{
Status: Dropdown_VarStorn_DR.Selected;
}
)

3 ACCEPTED SOLUTIONS

Accepted Solutions
SafaK
Helper I
Helper I

Yes, what you are asking is to update a row, and you have two options to update an already existing value: 

 

1.

Patch(ListName, lookup(ListName, ID=15),
{
Status: Dropdown_VarStorn_DR.Selected;
});

 

2. 

UpdateIf(ListName,ID=15,{Status: Dropdown_VarStorn_DR.Selected})

 

 

View solution in original post

Patch(ListName, lookup(ListName, ID=Value (TextInput_1.TEXT) ),
{
Status: Dropdown_VarStorn_DR.Selected;
});

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


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

View solution in original post

@PowerSäm Yes, just change the type to int, by adding Value(), ->      ID=Value(TextInput_1.TEXT)

 

View solution in original post

5 REPLIES 5
SafaK
Helper I
Helper I

Yes, what you are asking is to update a row, and you have two options to update an already existing value: 

 

1.

Patch(ListName, lookup(ListName, ID=15),
{
Status: Dropdown_VarStorn_DR.Selected;
});

 

2. 

UpdateIf(ListName,ID=15,{Status: Dropdown_VarStorn_DR.Selected})

 

 

zmansuri
Super User
Super User

Take a gallery. Display all your data in that gallery. That way you have visual representation of your data and no need to enter id manually. On your gallery you can give a patch button. When you change something for that row and click patch button it will change that particular row in sharepoint.

Patch(ListName,ThisItem,{Value you want to patch})

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


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

PowerSäm
Continued Contributor
Continued Contributor

@SafaK Thnaks a lot for your quick reply.

Perfect, that's exactly what I was looking for. Just one quick question:

With me the ID is queried, can you also write something like this:

 

Perfect, that's exactly what I was looking for. Just one quick question:

 

In this case the ID is requested, can I write it like this?

 

Patch(ListName, lookup(ListName, ID=TextInput_1.TEXT),
{
Status: Dropdown_VarStorn_DR.Selected;
});

 

It tells me it is not possible because one is a number and the other is a text. Is there any way to change this so that both queries become a number?

 

Thanks in advance!

Patch(ListName, lookup(ListName, ID=Value (TextInput_1.TEXT) ),
{
Status: Dropdown_VarStorn_DR.Selected;
});

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


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

@PowerSäm Yes, just change the type to int, by adding Value(), ->      ID=Value(TextInput_1.TEXT)

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,276)