I have a tabbed form using a gallery. If my item in the gallery is selected, it display the corresponding edit form. Example, if 'General' was selected from my gallery, it shows 'General' EditForm and all other forms are visible. My use case is user switches view as they want and when they're done they click on 'tick' button which uses Patch command across all forms. My formula is as below. My problem is Patch seems to clear all other forms that is not visible so I end up with some data not being saved. Have you encountered this?
Key = Text(MainGallery.Selected.ID)),
Key2 = Text(MainGallery.Selected.ID)),Table3Form.Updates
Solved! Go to Solution.
I couldn't pick a pattern yet, it seems random. The bizaare thing is I have 2 buttons, one is to save draft and one is to save it and promote the item (submit button) into the next status. The save draft works fine. The difference is the submit button calls Microsoft Flow to update the Status field and then navigates back to the home screen.
I then eliminated the Microsoft Flow function, and it's still the same.
I think I have found a pattern. I actually have a header form, and all the others are item form. I then only have 1 gallery which is the headerform. In order to display the other forms upon selection, I do a look-up based on the selected item in the gallery. I think after Patch I lose the selection from the gallery and thus succeeding Patch command fails.
@Drrickryp it seems to have worked!!! What I did was OnVisible property of the screen, I set 'Key' of each item form as the ID of whatever item was selected in the Header Gallery.
//SGID is the ID of the Form I want displayed//
//Lookup Item to be displayed//
On Item property of the SGForm, I did this:
LookUp(SGTable,SGKey = Text(SGID))
The HeaderForm still 'blanks out' after patch (blank out meaning powerapps will show 'No Item To Display'. I'm analyzing a bit further but I think it was indeed the Patch function resetting the selected items in my gallery.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.