cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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
Community Support
Community Support

Hi @hharriss ,

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
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.

Community Support
Community Support

Hi @hharriss ,

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

This worked perfectly thank you so much!

Hi @hharriss ,

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.

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 @hharriss ,

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,820)