web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Make Visible/Not-Visib...
Power Apps
Answered

Make Visible/Not-Visible a Gallery item based on data in a second table?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Context:

I have a vertical Gallery Listing that holds a Horizontal Gallery listing within it.  The vertical is called 'Apps' and the horizontal is the 'Functions' within the apps.

 

Desired Functionality:

I would like to be able to toggle the 'Apps' (Vertical) to show either 'All Apps' or 'Apps Subscribed to by the currently selected Customer'.  The full Apps listing comes from a SharePoint listing called 'Apps'  the correlation of 'Apps Subscribed to by Customer' is in a second SharePoint listing and only holds the App code from the 'Apps' listing that the customer subscribes to.

 

I was hoping there would be a control like 'TemplateVisible' that worked like the 'TemplateFill' control, but there isn't one.  The method I had planned on using was to put a Text box in the App Gallery that did a Lookup against the second SharePoint listing to determine if the selected customer has subscribed to the App.  

 

I considered the 'Filter' like I do with these two Galleries currently - but I don't know of a way to join the two SharePoint listings where I have all of the needed fields available.

 

Functionally I need to be able to toggle between seeing all Apps and allowing the Customer to select the App that they subscribe to or seeing only the Apps that they subscribe to.

 

Anyone have any advice/suggestion as to how I can approach this?

 

Thanks!

Tom.

Categories:
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi,

     

    "I was hoping there would be a control like 'TemplateVisible' that worked like the 'TemplateFill' control, but there isn't one."

     

    Please consider submit this as an idea, under PowerApps idea forum.

     

    For a workaorund, we could consider add an If() to switch the Filter condition under the Gallery items with a toggle switch, for different item.

    For example, 

     

    Filter(List1, if(toggle1.value=true,
     Lookup(List2, condition, Field)=FieldinList1,
     true)
     )

    Once toggle is turned on, users would see only the items they subscribed.

     

    Regards,

    Michael

  • T.Grounds Profile Picture
    Microsoft Employee on at

    Sorry it has taken me so long to work through this... I simplified this down to a single Filter to try to work through each element and here is what I came up with.  I'm getting feedback in the IDE telling me I 'Can't use Table Values in this Context' within the Lookup...

     

    Filter(D365Apps,'Cmb:SelectedCommunity'.Selected.Title=Community.Value && LookUp(CustomerAppsLicensed, 'CMB:SelectCustomer'.Selected.Value in Customer.Value && D365Apps.Title in App_ID.Value,App_ID)=D365Apps.Title

    Here is what I think I'm trying to do in plain english-

     

    Filter on my primary Table - D365Apps

    I'm filtering out only those records that are part of the selected community (I know this works, it's what I'm doing today) && (AND)

    Lookup in my secondary table (CustomerAppsLicensed)

    Looking up by a combination of the selected Customer && (AND)

    from my D365Apps table the current App_ID that is being fetched

    as long as the record found (the result of the Lookup) matches the App code (Title) being fetched from D365Apps.

     

    I guess that where I'm stumped is how do I in effect perform an outer join between the two tables on App_ID (Title)?

     

    I can't seem to get my head wrapped around this.

     

    Tom.

  • Verified answer
    T.Grounds Profile Picture
    Microsoft Employee on at

    I wasn't able to get this to work so I re-thought my approach.  In my APPS table were 4 values that drove the Gallery & Sub-Gallery.  I wound up duplicating these values in the 'Licensed' table so that when the checkbox on whether a customer had licensed or not was checked it adds the fields to the second table.  I then built an if statement around my Filter( statement which determined which data source to build the base gallery using.  I had to make sure that the field names were EXACTLY the same so that PowerApps took care of the rest.

     

    I did run into one issue - one of the 4 values is an image URL for the icon of the App that appears in the Gallery.  In my Patch update of the record in my License SharePoint list I worked for over an hour to figure out why it was't working - I didn't have any errors in the inline editor but the record wasn't being created in my second table.  Then I did a little research and there is a limitation in being able to update an Image field in the second table.  So I ended up turing the Image update in the Gallery into a Lookup againt my Apps table - it's not efficient and slows down performance given that it's having to make two calls to the table to update the Image... but it works and I was able to delivery the functionality that they requested.

     

    SortByColumns(If(AllorLicensedToggle.Value = true,
    If('CMB:SelectSuccessEngagement'.Selected.Value="---",
    Filter(CustomerAppsLicensed,'Cmb:SelectedCommunity'.Selected.Title=Community.Value && 'CMB:SelectCustomer'.Selected.Value in Customer.Value),
    Filter(CustomerAppsLicensed,'Cmb:SelectedCommunity'.Selected.Title=Community.Value && 'CMB:SelectCustomer'.Selected.Value in Customer.Value && 'CMB:SelectSuccessEngagement'.Selected.Value in SuccessEngagement.Value)),
    Filter(D365Apps,'Cmb:SelectedCommunity'.Selected.Title=Community.Value)),"APP_Position",Ascending)

    Here is the final If Statement and the multiple data sources.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard