cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

creating a record using different forms & screens

I have an Entity for a questionnaire I'm working on called "Response". It has the following fields:

Name: cr5bb_vendorname, cr5bb_question1, cr5bb_question2, cr5bb_question3, cr5bb_question4, cr5bb_question5

 

On Screen 1 of power apps, I have the field to enter in Vendor Name. the text input is DataCardValue1

On Screen 2, I have questions 1-5 which have text inputs of DataCardValue5- DataCardValue9. 

 

So far, I have a button on screen 1 that navigates to screen 2. On screen 2, I have a submit button with the code:

Patch(Responses, Defaults(Responses), {cr5bb_vendorname: DataCardValue1.Text, cr5bb_question1: DataCardValue5.Text})

Ideally, I was hoping the function would store the vendor name from screen1 and question 1 from screen 2 into the same record but I think my syntaxing is off. 

 

Lastly, the final product will have around a hundred questions which might make for one really long patch function.... if anyone has any ideas please let me know! Here's also a picture of the application so far 

Screen Shot 2020-04-06 at 12.07.24 AM.pngScreen Shot 2020-04-06 at 12.08.15 AM.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Do you want to save the vendor name and the question1 through question5 into single one record in your Entity?

 

Based on the screenshot that you mentioned, I find that you enable these fields within separated Edit forms (Form1 & Form2), is it true?

 

Based on the needs that you mentioned, I think the EditForm.Updates formula could achieve your needs. Please modify your formula as below:

Patch(
     Responses, 
     Defaults(Responses),
     Form1.Updates,
     Form2.Updates
)

 

Please take a try with above solution, check if the issue is solved.

 

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

6 REPLIES 6
eka24
Super User III
Super User III

On the first request, create a variable for the field to store the values in screen1:
 Set(MyVendor,DataCardValue1.Text); Set(MyVendorName,DataCardValue2.Text)

Then on Screen2 put the name of the variable into the default of the DataCardValues:

 MyVendor
 MyVendorName

 

On the second request, instead of patch you can use a form then use SubmitForm which does not deal individually

with the fields

 

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Do you want to save the vendor name and the question1 through question5 into single one record in your Entity?

 

Based on the screenshot that you mentioned, I find that you enable these fields within separated Edit forms (Form1 & Form2), is it true?

 

Based on the needs that you mentioned, I think the EditForm.Updates formula could achieve your needs. Please modify your formula as below:

Patch(
     Responses, 
     Defaults(Responses),
     Form1.Updates,
     Form2.Updates
)

 

Please take a try with above solution, check if the issue is solved.

 

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

Anonymous
Not applicable

This worked perfectly thank you so much!

Hi @Anonymous ,

Have you solved your problem?

 

If you have solved your problem, and my above solution is helpful in your scenario, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

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

I tried accepting it as soon as I saw it but I keep getting the error message:

 

"Authentication failed for the action you are trying to do. This failure could be due to your browser not supporting JavaScript, JavaScript not being enabled, or trying to use the action URL directly in the browser address bar instead of clicking the link on the page.".

 

I've messed with chrome settings and tried safari. I'll figure it out soon but theres a possibility that maybe it won't let me because my account is through a university email?

Hi @Anonymous ,

Please consider clear cache of your browser, and sign in this community with your proper credential.

 

Yeah, I think this issue may be related to Browser settings, please consider try different browsers, check if the issue is solved. Please do it and mark it as a "Solution".

 

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.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,089)