cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerSäm
Skilled Sharer
Skilled Sharer

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;
});

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})

@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;
});

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

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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