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;
}
)
Solved! Go to Solution.
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})
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)
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})
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)
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |