I am fairly new to this forum and PowerApps, so I apologise if this has already been explained in other topics.
I am currently in the process of creating an application based on an Excel MainTable, which has a variety of different columns. Here a new item can be added and be edited as a "Lead", "Opportunity", "Proposal Dev", "Proposal Sent", etc. etc.
The list will eventually get long and hence I thought I would create an overall Mainpage which would direct to different BrowseGalleries according to whether they are "Lead", "Opportunity", etc. etc.
However, after doing this, I realise that the form can only show items from one gallery:
Is it possible to open the FormMode.Edit FormMode.View regardless of which BrowseGallery it comes from?
In each Gallery's OnSelect property for a gallery item, you can add this formula to set a variable (in this case called "GalleryType".) to whatever type you're working with.
Then, in the Items property of your Edit Form, you can add a switch, like this:
Switch(GalleryType, "Lead", Gallery1.Selected, "Opportunity", Gallery2.Selected, "Proposal Dev", Gallery3.Selected)
Thank you very much for the quick response.
Apologies, as I am new with PowerApps, I do not exactly follow what you mean. When you set a variable to a name such as "GalleryType", where do I need to add this? The below picture is with following formula: Set(GalleryType; "Lead") ---(Changed as I was trying different things when it did not work).
See below example. The formula for the OnSelect needs to be for the Gallery Item, not the entire gallery.
If Phase is the name of your property you could do this:
So I have tried to do that, but it does not seem to redirect me anywhere when I go into "Test-Mode", am I missing something?
Although the below formula is slight different I believe these are identical, right? In the PowerApps I use I have to use ";"
Hi again, thank you for the help.
I have tried all the things you have asked without luck until now. I guess being new and having to work with a different syntax seems to be an obstacle.
I have tried to tidy up the different layers and have now added one Page including Browse Gallery for each of the different phases ("Leads", "Opportunity", "Proposal Dev", etc.) and added the code you suggested:
I tried with and without & Navigate(EditTest), but nothing shows up.
Below is the filter for each of the galleries (I have also here tried without the ";Phase = "Leads")
Lastly I added the initial code you suggested using the Switch(, but here I seem to get a syntax error:
This is definitely doable without having a gallery for each type. That will complicate things down the road. It's best to get it working so that the gallery fills dynamically.
The syntax is confusing to me in the screenshots. It's not like the syntax I'm using. I was unaware there was different syntax in different languages.
To explain without explicit examples (hopefully someone else can help with the syntax), The Items property will be a filtered result of your MainTable data where the filter for Phase will be a dynamic variable (either from a Textbox or other selection method). That will drive the Gallery data without needed one for each Phase.
From there, when selecting a gallery item from the main gallery, that selected item will drive the further filtering needed to edit or create an entry. The functions needed to make all this happen are the usual suspects (Filter(), Set(), Lookup(), Switch())
Hopefully that helps, but there seems to be some problems showing explicit examples.
Thank you. I have now figured out how to change the language so that I keep the same syntax.
I think you are certainly right, it must be able to be done in a more neat way, rather than having several different galleries.
I will keep your advice in mind and try.
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.
In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.