cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Rajesh
Level: Powered On

Update SharePoint form fields with null values

Hi

 

I've a SharePoint list with quite a few fields. Fields are a mix of multiline text and choice fields. Instead of showing all these fields in a single form, I've split them to show in multiple forms. User experience is wizard based and based on the answers in the current form, next set of questions are shown in the subsequent form. Users can navigate back and forth between these forms. I use PATCH function to update the SharePoint list with all the form data

 

Say there are 3 forms. Form 1 is mandatory. Form 2 is shown based on the options selected in Form 1. Similarly Form 3 is shown based on answers in Form 2. The user journey can end in Form1 itself or in Form2 or Form3 and they click submit button from one of these 3 forms. 

 

Form 1 Submit button  - Patch('My Form',{ID:ItemID} ,Form1.Updates)

Form 2 Submit button  - Patch('My Form',{ID:ItemID} ,Form1.Updates,Form2.Updates)

Form 3 Submit button  - Patch('My Form',{ID:ItemID} ,Form1.Updates, Form2.Updates,Form3.Updates)

 

Supposing the first time user goes through all the 3 forms and submits data at the end of form 3. I can see all the field data from 3 forms getting saved into SharePoint list. Say user comes back and edits the data, makes some different selection in Form 2 which makes the Form 3 no longer applicable and hence the user journey ends in Form2. When user clicks on submits data in Form2, I can see the updated data from the fields in Form1 and Form 2 in SharePoint, but the previously entered data for the fields in Form 3 are not removed. I would like them to be removed as they are no longer valid.

 

I've tried this approach by changing the submit function in Form 2, but that hasn't worked

ResetForm(Form3);Patch('My Form',{ID:ItemID} ,Form1.Updates,Form2.Updates,Form3.Updates)

 

Any suggestion please?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rajesh
Level: Powered On

Re: Update SharePoint form fields with null values

I've managed to solve this by turning on experimental features in app settings(formula level error management) and changing the submit function in form2 as below

 

NewForm(Form3);Patch('My Form',{ID:ItemID} ,Form1.Updates,Form2.Updates,Form3.Updates)

 

Pls refer this link for more on experimental features

https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-dat...

View solution in original post

1 REPLY 1
Rajesh
Level: Powered On

Re: Update SharePoint form fields with null values

I've managed to solve this by turning on experimental features in app settings(formula level error management) and changing the submit function in form2 as below

 

NewForm(Form3);Patch('My Form',{ID:ItemID} ,Form1.Updates,Form2.Updates,Form3.Updates)

 

Pls refer this link for more on experimental features

https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-dat...

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 140 members 5,464 guests
Please welcome our newest community members: