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

How to Submit Between Forms - Only Looking At Current Form Fields

All, In my PowerApp form - I have 7 forms I am utilizing for user input. I am utilizing a SharePoint Online List for my data source. The first form has 2 required fields of Name and Plate Number I have the following issues - I need some help with: 1) When I submit between forms - example between forms 2 and 3 I keep getting a No Item to Display Message which I can fix by entering in the following of the Forms Edit Advanced Item property as such: Defaults('Vehicle Inspection Sheet'); However once I do this when I submit between forms 2 and 3 - the Required field input message fires but those required fields are not on the current form. Therefore is their different syntax I need to utilize in my Forms Edit Advanced Item property so it only looks at the current Forms fields? 2) My Submits in between forms were hanging sometimes and in looking at the forum here - I found this which appears to work but I was wondering if this is the best practice and if another solution is better - I added this format to each Form - obviously just changing the Navigate and SubmitForm parameters: Refresh('Vehicle Inspection Sheet');Navigate(EditScreen1,ScreenTransition.Fade);SubmitForm(EditForm1)
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @koneill ,

Firstly, go back to your SharePoint list - you will have a field called Your Name  - set Require that this column contains information to No

CompField.png

If the Item setting is working for you (it probably will on a new form), leave it.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @koneill ,

So a bit of troubleshooting can be done, can you please advise the following:

  • The Item property of each form including whether the data source is a list or a collection.
  • The code that includes the SubmitForm on each.
  • If the forms are selected from a gallery, the Items property of these galleries.

Also a screenshot of the forms showing the errors would be useful.

One other note from your post - Name is not a good title for a field - it is a reserved word in Power Apps.

Below I've attached some screen shots to answer the questions - in doing this I realized that right now I'm using a Collection on the initial screen then for the user entry forms I'm using a List: 1) The first screen a user sees is the browse screen where I am using a Collection on the initial screen as my thought was this was most efficient - koneill_powerapp_browse_screen1.png - I can change this easily I assume to call the List in the initial OnVisible Action if needed. 2) The submit button of the initial screen is as such: NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None) 3) The first form a user sees to enter data is as such: koneill_powerapp_editform1_screen2.png 4) The first form submit button is as such: Refresh('Vehicle Inspection Sheet');Navigate(EditScreen1,ScreenTransition.Fade);SubmitForm(EditForm1) 5) The second form a user sees to enter data is as such: OnSuccess: Navigate(EditScreen3) DataSource: 'Vehicle Inspection Sheet' Default Mode: FormMode.Edit Item: Defaults('Vehicle Inspection Sheet') 6) The second form submit button is a such: OnSelect: Refresh('Vehicle Inspection Sheet');Navigate(EditScreen2,ScreenTransition.Fade);SubmitForm(EditForm2) 7) The error I get when I submit the second form is as such: powerapp_browse_screen_shot.png

Hi @koneill
Firstly I need to put your post in a format I can read properly - I have done this below for reference going forward. Where is the error on the screen you refer to? Also in item 3, why is the item

Defaults('Vehicle Inspection Sheet')

rather than identifying the item to be edited with something like

Lookup(
   'Vehicle Inspection Sheet',
   ID = YourGalleryName.Selected.ID
)

 

  • The first screen a user sees is the browse screen where I am using a Collection on the initial screen as my thought was this was most efficient. I can change this easily I assume to call the List in the initial OnVisible Action if needed.
    koneill_powerapp_browse_screen1.png























  •  The submit button of the initial screen is as such:

 

NewForm(EditForm1);
Navigate(EditScreen1, ScreenTransition.None)

 

  • The first form a user sees to enter data is as such:
    koneill_powerapp_editform1_screen2.png



















  • The first form submit button is as such: 

 

Refresh('Vehicle Inspection Sheet');
Navigate(EditScreen1,ScreenTransition.Fade);
SubmitForm(EditForm1)

 

  • The second form a user sees to enter data is as such:
    OnSuccess: 
    Navigate(EditScreen3)
     
    DataSource: 'Vehicle Inspection Sheet'
    Mode: FormMode.Edit
    Item: Defaults('Vehicle Inspection Sheet')
  • The second form submit button is a such:
    OnSelect:

 

Refresh('Vehicle Inspection Sheet');
Navigate(EditScreen2,ScreenTransition.Fade);
SubmitForm(EditForm2) 

 

  • The error I get when I submit the second form is as such: 
    powerapp_browse_screen_shot (1).png

@WarrenBelz  - Sorry about the formatting - I've had some oddities with the forums editor - so much that I missed the fact I didn't add the error screen - so in between my second and third screens when I submit I get this error:

koneill_powerapp_submit_button_screen3_error.png

 

So I think your question about why I have Defaults('Vehicle Inspection Sheet')

 

instead of the following:

 

Lookup(
   'Vehicle Inspection Sheet',
   ID = YourGalleryName.Selected.ID
)

 

maybe the problem so in each form - I'll have to add the fields that are to be utilized it appears.

I didn't know the way to set this up or syntax as this is only the 3rd PowerApp form I've created.

Hi @koneill ,

Firstly, go back to your SharePoint list - you will have a field called Your Name  - set Require that this column contains information to No

CompField.png

If the Item setting is working for you (it probably will on a new form), leave it.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Very awesome - this works it appears.

 

Guess for any required fields - using client side script within the form is best. 

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,501)