Good Evening,
I want change register in sharepoint list base data, with fuction Patch. My list sharepoint have more that of 20 columns and i need change or edit some data.
Thanks.
Solved! Go to Solution.
Hi @CarlosN :
Do you need such two buttons:
If so,I suggest you to adopt such a scheme:
1\Create two icons to switch modes:
2\Use a button to submit records or modify records
I made a similar case for your reference:
1\Set the app's OnStar proeprty to
Set(Mod,"New") /*Mod is my custom variable*/
Then run OnStart
2\Add a gallery(Gallery4)
Items
OfficeSupplyList
3\Add three icons(Edit/Check/Add) into this gallery
Edit-OnSelect
Set(Mod,"Edit")
Check-OnSelect
Set(Mod,"View")
Add-OnSelect
Set(Mod,"New")
4\Set up 4 textInput box controls(ItemNumber/PageNumber/Description/Quantity)
ItemNumber
Default
If(Mod="New",Blank(),Gallery4.Selected.ItemNumber)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
PageNumber
Default
If(Mod="New",Blank(),Gallery4.Selected.PageNumber)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
Description
Default
If(Mod="New",Blank(),Gallery4.Selected.Description)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
Quantity
Default
If(Mod="New",Blank(),Gallery4.Selected.Quantity)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
5\Add a button
OnSelect:
If( Mod = "New", Collect( OfficeSupplyList, { ItemNumber: ItemNumber.Text, PageNumber: PageNumber.Text, Description: Description.Text, Quantity: Quantity.Text } ), Patch( OfficeSupplyList, Gallery4.Selected, { ItemNumber: ItemNumber.Text, PageNumber: PageNumber.Text, Description: Description.Text, Quantity: Quantity.Text } ) ); Reset(ItemNumber); Reset(PageNumber); Reset(Description); Reset(Quantity)
Best Regards,
Bof
Hello there. Welcome to the help forums.
You need to provide more detailed information. I don't understand what you want to accomplish.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
If you want to change the Form into Edit Mode use this code in the Editar button's OnSelect property
EditForm(Form1);
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thank you,
but it is not the answer, the screen is not a form of the power apps.
Hi @CarlosN :
Do you need such two buttons:
If so,I suggest you to adopt such a scheme:
1\Create two icons to switch modes:
2\Use a button to submit records or modify records
I made a similar case for your reference:
1\Set the app's OnStar proeprty to
Set(Mod,"New") /*Mod is my custom variable*/
Then run OnStart
2\Add a gallery(Gallery4)
Items
OfficeSupplyList
3\Add three icons(Edit/Check/Add) into this gallery
Edit-OnSelect
Set(Mod,"Edit")
Check-OnSelect
Set(Mod,"View")
Add-OnSelect
Set(Mod,"New")
4\Set up 4 textInput box controls(ItemNumber/PageNumber/Description/Quantity)
ItemNumber
Default
If(Mod="New",Blank(),Gallery4.Selected.ItemNumber)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
PageNumber
Default
If(Mod="New",Blank(),Gallery4.Selected.PageNumber)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
Description
Default
If(Mod="New",Blank(),Gallery4.Selected.Description)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
Quantity
Default
If(Mod="New",Blank(),Gallery4.Selected.Quantity)
DisplayMode
If(Mod="View",DisplayMode.View,DisplayMode.Edit)
5\Add a button
OnSelect:
If( Mod = "New", Collect( OfficeSupplyList, { ItemNumber: ItemNumber.Text, PageNumber: PageNumber.Text, Description: Description.Text, Quantity: Quantity.Text } ), Patch( OfficeSupplyList, Gallery4.Selected, { ItemNumber: ItemNumber.Text, PageNumber: PageNumber.Text, Description: Description.Text, Quantity: Quantity.Text } ) ); Reset(ItemNumber); Reset(PageNumber); Reset(Description); Reset(Quantity)
Best Regards,
Bof