cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
steersebastian
Advocate I
Advocate I

SharePoint custom form with PowerApps - Autosave

Hi at all

 

In a SPO list you usually have the possibility to edit a entry and get a autosave for every column.

 

like here:

 

Screenshot 2020-03-04 at 15.33.33.png

 

 

 

 

 

 

 

 

 

 

 

After editing the form with PowerApps this feature isn't available anymore and I have to take "Edit all" and "Save".
Isn't it possible to keep the autosave-feature, even with PowerApps custom forms?

 

Thanks a lot in advance and all the best

 

Sebastian

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @steersebastian ,

Do you want to achieve a "Auto-Save" functionality within the custom form app?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs in PowerApps. As an alternative solution, I think the OnChange property of each Text Input box within the data cards in your Edit form could achieve your needs.

 

Please consider set the OnChange property of the Text Input box (or DatePicker control, or ComboBox, ....) within the data cards in your Edit form to following formula:

For Text field data card:

If(
   SharePointForm1.Mode = FormMode.Edit,
   Patch(
         'SP List',
          SharePointIntegration.Selected,
          {
             TextField1: TextInput1.Text
          }
   )
)

For Date type field data card:

If(
   SharePointForm1.Mode = FormMode.Edit,
   Patch(
         'SP List',
          SharePointIntegration.Selected,
          {
             DateTypeField: DatePicker1.SelectedDate
          }
   )
)

For Choice field data card:

If(
   SharePointForm1.Mode = FormMode.Edit,
   Patch(
         'SP List',
          SharePointIntegration.Selected,
          {
             ChoiceField: {
                            Value: ChoiceFieldComboBox.Selected.Value
                          }
          }
   )
)

you need to apply above formula to each data card in your Edit form.

 

More details about the Patch function, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @steersebastian ,

Do you want to achieve a "Auto-Save" functionality within the custom form app?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs in PowerApps. As an alternative solution, I think the OnChange property of each Text Input box within the data cards in your Edit form could achieve your needs.

 

Please consider set the OnChange property of the Text Input box (or DatePicker control, or ComboBox, ....) within the data cards in your Edit form to following formula:

For Text field data card:

If(
   SharePointForm1.Mode = FormMode.Edit,
   Patch(
         'SP List',
          SharePointIntegration.Selected,
          {
             TextField1: TextInput1.Text
          }
   )
)

For Date type field data card:

If(
   SharePointForm1.Mode = FormMode.Edit,
   Patch(
         'SP List',
          SharePointIntegration.Selected,
          {
             DateTypeField: DatePicker1.SelectedDate
          }
   )
)

For Choice field data card:

If(
   SharePointForm1.Mode = FormMode.Edit,
   Patch(
         'SP List',
          SharePointIntegration.Selected,
          {
             ChoiceField: {
                            Value: ChoiceFieldComboBox.Selected.Value
                          }
          }
   )
)

you need to apply above formula to each data card in your Edit form.

 

More details about the Patch function, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hey @v-xida-msft 

 

Thanks for providing the OnChange code. It works really well!

 

I have a form that has about 90+ fields on it and I have users running into 1 issue. When they click out of the field after editing it, the form jumps all the way to the top and they have to rescroll down to the next field.

 

Do you know why this could be happening? Is there something I need to turn off or change?

 

Brandon

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,043)