cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
guyinazo
Level 8

Different Screens with different forms and one Sharepoint list

I am a "noob" when it comes to Power Apps right now and I am tasked with creating a Power App to work in our new SharePoint online environment, which uses a HIPAA compliant questionnaire (with 72 questions).  The form has several different sections to complete so I divided the sections into six different Screens.  On each screen there are one, two, or three sub-forms.  At the end is a digital signature and a Submit button. 

 

I guess my question would be, do I use SubmitForm() function for each form (as the button is on the last form)?  So it would be SubmitForm(Form1); SubmitForm(Form2)...et al.  Does the background logic know that the data entered into each of these forms for each of these screens is for only one SharePoint list record?

 

Thanks for the information and please let me know if I am misguided or the direction I should be taking

 

PS (I posted a similar question in another area of the Community Boards)

1 ACCEPTED SOLUTION

Accepted Solutions
Toasteroven
Level: Powered On

Re: Different Screens with different forms and one Sharepoint list

Multiple submissions to a data source will result in multiple rows being created. If you want to save the output of multiple forms at once to one row definitely use the "patch" function rather than the submitform function. 

 

I have run in to many issues attempting to use submitform with multiple forms at once. in my opinion patch is the way to go.

 

Let me know if you need a more in depth explanation of how to use it 

 

https://docs.microsoft.com/en-us/powerapps/functions/function-patch

View solution in original post

3 REPLIES 3
Toasteroven
Level: Powered On

Re: Different Screens with different forms and one Sharepoint list

Multiple submissions to a data source will result in multiple rows being created. If you want to save the output of multiple forms at once to one row definitely use the "patch" function rather than the submitform function. 

 

I have run in to many issues attempting to use submitform with multiple forms at once. in my opinion patch is the way to go.

 

Let me know if you need a more in depth explanation of how to use it 

 

https://docs.microsoft.com/en-us/powerapps/functions/function-patch

View solution in original post

guyinazo
Level 8

Re: Different Screens with different forms and one Sharepoint list

Thanks for the information.  I figured there would be a function to use (as I wade through them).  I will check that out and let you know if I need further help.

guyinazo
Level 8

Re: Different Screens with different forms and one Sharepoint list

I think I have the syntax down now, but just a few questions.  How do I pass a DATE value?  I thought it would be datecontrol.SelectedDate, but it throws an exception that the data is expected to be a date value.  To bypass this, I am just using NOW(), but I would like to use the date that is entered by the user.  Also two of the fields are Person lookups (name and job title).  I am going to assume I can just use the text that is in the field, but I also see where the syntax is different for lookup columns.

 

One of my columns is a possible multi-select.  Is this also possible using the PATCH statement and how would that work?

 

This is the syntax of Patch I am using right now:

 

Patch('OSHA Respirator Medical Evaluation Questionnaire',
Defaults('OSHA Respirator Medical Evaluation Questionnaire'),
   {
  Title: txtYourName.Text&dateToday.Text,
  Todays_Date: Now(),  
  Your_Name: txtYourName.Text,
  Your_Age: txtYourAge.Text,
  Sex: txtSex.Text,
  Your_height: txtHeight.Text,
  Your_weight: txtWeight.Text,
  Your_job_title: txtJobTitle.Text,
  Your_Phone: txtPhone.Text,
  Phone_Time: txtPhoneTime.Text,
  Contact_HCP_Reviewer: ynContactHCPReviewer.Text,
  Respirator_Type: cmbRespTypes.Text, <---Possible multiselection

.

.

.

  Talk_to_HCP: ynTalkToHCPREviewer.Text,
  Digital_signature: txtSignature.text
   }
 )

 

There are a total of 72 data points that make one record in the SharePoint list

 

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 (Last 30 Days)
Users online (6,058)