cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Submit Button Insert Incorrect Data

Hello Experts ,

 

I have a multi screen App , which submits all data on one button click at last screen. The issue is one form "Frm_03" displays data correctly as par cascading and other configuration  but when i submit the data it submits wrong data , i guess the last records.

 

Here is the code i am writing to submit all form together.   

 

OnSelect:

 

ClearCollect(
    PatchedSP,
    Patch(
        'BG Activity Recorder',
        Defaults('BG Activity Recorder'),
        Frm_01.Updates,
        Frm_02.Updates,Frm_03.Updates,
        Frm_04.Updates
    )
);
Set(
    LastIDInserted,
    First(PatchedSP).'Activity ID'
);

 

 

Other forms submit correct data only this form has some issue. i have cross check the screen properties , everything seems fine , something wrong when i submit the data. Please help in this  

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@SachinG31 

Hmmm, that seems a little strange.  So, let's investigate.

You mention that ONLY information on Frm_02 is submitted.  So, to be clear:

  1. Your Frm_02 has ALL of the fields in it?
  2. You have not modified any Update properties in other datacards?

 

Number 1 above will be the most important.  All of the fields of your datasource should be included in the master form.  All fields that you DON'T want to be seen on the master form should have the Visible property of their datacard set to false.

 

Please validate.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

11 REPLIES 11
Helper V
Helper V

Why don't you use SubmitForm(Frm_01);SubmitForm(Frm_02);SubmitForm(Frm_03);SubmitForm(Frm_04) instead?

Super User III
Super User III

@SachinG31 

I would take a look at all of the Update properties in that form to see where the issue is coming from.

Also, you might want to consider doing this as one form rather than multiple forms with a Patch.  You lose all of the functionality of the forms when you patch them like that.  

I would recommend watching my video on splitting forms over multiple screens that will show you how to split them and still maintain all of the valuable features of the form.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hello @RandyHayes , Thank you so much for your response. I have gone through your tutorial and try submitting my forms same way but on submit it is taking only master form data.

As advised in the video i have done this.

 

Gallery On Select:

 

Set(glbcurrentrecord,ThisItem);Navigate([@BasicDetailsScreen])

 

Form :

Item :

 

glbcurrentrecord

 

Default: 

 

Frm_02.Mode

 

Master Form

Item:

 

Patch(glbcurrentrecord, Frm_01.Updates,Frm_03.Updates,Frm_04.Updates)

 

On Submit Button 

 

 

SubmitForm([@Frm_02]);

 

Please advise if i am missing something 

Super User III
Super User III

@SachinG31 

I'm assuming that Frm_02 is your master form?

Please clarify.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Yes @RandyHayes , Frm_02 is my master form.

Super User III
Super User III

@SachinG31 

Hmmm, that seems a little strange.  So, let's investigate.

You mention that ONLY information on Frm_02 is submitted.  So, to be clear:

  1. Your Frm_02 has ALL of the fields in it?
  2. You have not modified any Update properties in other datacards?

 

Number 1 above will be the most important.  All of the fields of your datasource should be included in the master form.  All fields that you DON'T want to be seen on the master form should have the Visible property of their datacard set to false.

 

Please validate.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Hello @RandyHayes , I got it now , That's the catch , i was not linking previous screen filed in frm_02. I thought if we have already referring these screen by variable then no need to mention in master form. 

As you advised now i have to hide all these previous screen fields on my master form. 

I have one more issue here @RandyHayes , Please advise me on this 

My one of the form  Frm_03, i have choosing some value ffrom drop down but these chosen value doesn't reflect in master form and doesnt save in SP list. some other value which i have not selected those values are reflects and saves in SP list. which properties i check for this. for example 

Frm_03 is this selected value  

Capture34.PNG

Master form Data

Capture35.PNG 

SP list saves the data which is appearing in Master form (Second Screen shot)

Super User III
Super User III

@SachinG31 

Yes, the master form needs ALL of the fields in it that you want to submit.  Ones you don't want seen/repeated on that master should have Visible set to false.

 

As for your other issue.  On Frm_03 what is the Update property of the datacard that contains your dropdowns?  That will be the key to determine why it is not seen on the master form.

 

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

hello @RandyHayes , The update property of my datacards is like this 

Dropdown5.Selected.Result
Dropdown10.Selected.PROJID

 for below case instead of selected.result , it was giving selected.Fieldname So i mentioned that field. Pleasea advise 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (30,419)