Custom Collection defaults to data source of parent tab?

Soz, might be totally off base here but, I use custom collections a lot to access Tables separate from the main assigned page table (stick with me campers haha) now, is it just me or does the custom collection now ignore the table assigned to it and and only the mods inside the collection have the separate table data applied (asking for a friend) haha Thanks gliders :joy: PS is there a better way to do what I’m doing ?

  1. I created a new tab with data source ā€œEmpty tableā€
  2. On this new tab I added a custom collection with data source ā€œTree structureā€

If that is what you are trying to do, it seems to work fine.

1 Like

Hey @nathanaelb Thanks so much for your effort in looking into this. I guess what I was trying to figure out (and your example is a good one) if I created a custom all the ā€œchildā€ elements can be hidden using conditions of elements in the assigned table hover the parent collection does not seem to respond instead it’s governed by the page table. I always thought I could hide an entire collection at once by using options on the parent if that makes sense :grinning_face:

If you create a custom collection source to table A, then the components that make up this custom collection can be configured with visibility conditions based on columns in table A. This is normal since the collection is a representation of table A. Sure, you can pull into table A data from another table with relation, query or single value columns, but basically the custom collection represents table A.

What do you mean?

To me, there is no such thing as a ā€œparentā€ collection. Instead, there is a tab whose layout is attached to (ā€œgoverned byā€) a single row somewhere in one of your tables. This table can be the Users table, a general Configuration table (often my preference), a dedicated 1-row table just for that tab (I used to do this but I’ve now moved away from this), or often builders chose a table related to the ā€œtopicā€ of the tab (for example, if the tab mostly shows employees, then the data source would be the Employees table). If no filter is applied, then by default the single row chosen as the source of data for the tab is the first row of the table.

On a tab or any screen for that matter, you can then add collections that have their own data source. There is no hierarchy of collections, there is no parent collection.

It makes a lot of sense. When you select a collection, you can

  1. Determine its visibility conditions, and these conditions are based on data of the single row data source of the tab or the Users table.
  2. Filter the data shown in the collection and the filtering conditions are based on the data in the data source of the collection or the Users table.

I don’t really understand this stuff all that well, but this is where in Glide there is a game of accessing data of one table from another table. And you do this with relations, query or single value columns. Also, in options when you set visibility or filter conditions, the current data source is available as well as the Users table. So in a way the Users table can be considered a master table. You can leverage that by putting ā€œgeneralā€ data for the entire app in there. I personally am uncomfortable with this approach because I get very confused when my data is not clean (what I consider not clean): user-related data is user-related and app-related data is app-related, and I dislike mixing the two.

Remember: use relations, query or single value columns to access data from another table without having to copy it. And then once in a while pinch your nose and hope for the best :sweat_smile: (and hope you won’t have to review it later)

Thanks so much for helping me with this @nathanaelb So I guess what I’m asking is this. Let’s say I have a page and it’s linked to the table ā€œPage Dataā€ but I want to build a component that uses another table called Table A, so I drag a custom collection in and set its data source to ā€œTable Aā€ Inside that I have a text component, a big number component and a switch, all of these are drawing data from Table A. So I want to set a condition on the Custom collection that hides it if a specific column in Table A is set to 0, So I go to the Options/visibility of the Custom Component, but it does not read from Table A it reads the root ā€œPage Dataā€ table. So I can’t hide things in one go, I have to do each element separately. I was sure it was possible before, I just can’t remember if that was the case :grinning_face:

So you want to hide the entire custom collection based on a value in Table A? How would that work? Which row in Table A would determine if the entire custom collection is visible or not?

Page Data determines visibility of the entire custom collection on the screen. The collection component filter determines which rows are shown in the collection. Visibility of components within the custom collection container are determined by Table A data.

Make sure you are working with the correct components. Either the collection itself or components within the collection container. Then determine whether you should be using visibility conditions or filter conditions.

2 Likes

Hey @Jeff_Hager sorry, I know how silly my example must have sounded, and TBH I cant now remember the situation that caused me to ask this question in the first place, I just came across as seemingly not being able to achieve what I had done before and had to hide all of the components separately, could also be a case of tied eyes and a ready fire aim kinda question haha so sorry for the time you and @nathanaelb spent, I really didn’t mean to send you on a wild goose chase. I really appreciate you both :grinning_face:

2 Likes

Hi @Jeff_Hager @nathanaelb sorry to rehash this one when it kinda seemed solved (and I had lost track of the topic in the first place haha) but I just came across the same problem again so I thought you may be able to guide me on a better outcome. So… I created an AI component for the front page of my APP that is like a notification banner (in lew of notifications which would be great) It looks really good and will trigger when I add a row to a table (I’ve called notificationsDB) Now I only need a single row in this table, and when there are no rows the banner will hide due to conditions. The problem is all other components on the Front page of my app pulls data from a different table. So I add a custom container, put the AI notifications inside, and use the fact I can assign a different table for the custom container so I use that table data to show and hide the notification bar, it works great but when the notifications bar it’s not there, I still have a big space where the Custom container is! Now, it’s assigned to the notificationsDB so, in theory, I should be able to hide it as well when that table is empty but it won’t, it’s data is assigned to the Page table (I’m sure this used to be different) so I need your advice on a better way to do what I’m trying to do if you have any ideas.

Thanks for describing what you’ve done.

Could you describe what you want to achieve in the layout of your app, step by step:

user signs in, user arrives on home screen, user sees n notification banners (how many is n), what determines if and when the notification banners are displayed, etc.

How many columns do you have in the notification table? There’s probably a few ways to do it, but one option is to add single value columns to the Page table that pull relavent data from the Notification table (should be easy since the notification table will only contain one row). Then have your AI component use those single value columns to display the notification. You can condition the visibility of the AI component to only display if the single value columns are not empty.

2 Likes

Thank @nathanaelb @Jeff_Hager The app is a helper for small businesses, it manages creating social media across all platforms, monitoring inbound leads across web and social, creating and publishing web content, dynamic to-do lists via Jira, Monday, Hubspot or Odoo (really whatever CRM or Todo the client is using) and managing Client contacts and tracking QR code introductions. The front page is more like an overview of all running systems, like a control panel and if a new post is made, a client reaches out, a benchmark is reached it will display a message dynamically. The credit card-looking tile is a digital business card, The web and Facebook tiles are swipeable analytics pop-ups, Theres an example of a hint I have when the app writes a new social media post for the client business and it’s ready for review and publish, there’s a social calendar to schedule posts, A section for staff to submit content, lots of stuff going on, and people can use either mobile or desktop. I had been using hints as notifications but they look a bit naf so designing something with Ai that looks more like a standard notification is much more appealing and gets better engagement. So the front page is like an aggregator of all the other systems that flow through the app. Which kinda brought me to the question, I thought I used to be able via conditions to just turn content blocs on and off, I’ve been running the app for a year and a half now, but it seems to have changed or I’ve gone mad hahah




2 Likes