Looks like an issue for switch component

My app’s URL: https://wary-history-6199.glideapp.io/

Here is my only one sheet data : bug_glide_01

The aim of this app was to show threw 2 inlines list, the vegetables items filtered by Is Favorited A, B and bool

The Bool value is False when none of the is Favorited B is TRUE as you can see here :
bug_glide_02

The issue appears when I created a detail tab with 2 inline list :

-the first inline list shows vegetables and is filtered with if is Favorited A is True and has a visibility : it shows if Bool is False
-and the second list is filtered with is Favorited B is True

Each item of the list has a switch component, here is the issue, when I affect to the switch component A from the inline list A, the column Is Favorited A, automatically, the
switch component in the inlinelist B has the same column is Favorited A when I would like Is Favorited B. Here in image : bug_glide_04

bug_glide_05

For me two components from 2 different inline list should behave indepedently. With the switch component, i feel there is an issue.

Thanks for reading me !

Are you pointing those switches to the same column?

Hi ThinhDinh, Thanks for your quick replys. When I point the first switch to the colum is favorited A, and the second switch to the column is favorited B, the first change to the last affectation (is favorited B), it’s a circle, i can’t have two switch with two different columns affectation

If you try to reproduce this, i give you the formula for the bool value :

=if(ARRAYFORMULA(SUMPRODUCT(C2:C))=0;False;True)

First inline list : shows data column A (vegetables) and filtered with column is Favorited A, and visibility only if Bool is False
Second inline list: shows data column A (vegetables) and filtered with column is Favorited B

Each inline list has a switch component where the affectation (colum is Favorited A for list A and is Favorited B for list B ) But I can’t reach this. I tried checking the independent screen configuration per items for the list A, it solved my issue, but I would like to keep the item configuration for a more complex app.

Can you turn on copying for you app? I’m still a confused what the issue is.

1 Like

Hi Jeff Sorry I missed the copying agreement, its done now, you’ll see when you control the visibility of the inline list by checking the is Favorited column in the sheets, if you access to the switch component of the two inline list, you’ll see that you can’t make them assigned to different colum

OK, several things going on here.

  • You have your A list with a title of B-Favorites, which is confusing.
  • Your A list visibility is only going to look at the first row. Maybe that’s what you want, but just be aware that your details screen is only linked to the first row in the sheet, even though you are showing 2 inline lists instead of any data from that first row. If that is not what you intended, then I would consider changing you bool column to an IF/THEN column in the data editor, so it can determine true or false based on each row. Then make that bool column part of your filter instead of visibility.
  • Your visibility is set to check for false. That is probably fine because your formula does set false, but usually I think it’s safer to check for ‘is not true’ instead.
  • As @ThinhDinh asked, it does appear that you have the switch pointing to the same column value. It’s part of Glide’s design to be like that. Detail layouts viewed from a list are attached to the sheet, so if you design your layout in one part of your app, then add a list somewhere else in your app, that same layout is used on the details of any other list. That’s why you aren’t able to add only a Favorites-A switch on the first list, and then only a Favorites-B switch on the second list. Both lists are part of the same sheet so they share a layout. Now there are certain workarounds to get around this problem:
    • You can turn on Independent Screen configuration, which will let you design each list item separately, but you would have to do this for every single list item in both lists.
    • You can have separate sheets with all items duplicated into a second sheet. Then point the second list to the second sheet. This would allow you to have a separate layout that’s different from the first list/sheet.
    • The best option I can think of would involve adding a user specific column. Then for each list you would create a compound action that would first have an action to set a column value to fill the user specific column with a value that indicates which list you clicked on. The second action would then be ‘View Details’. This would open the details of that list item and then based on whichever value you set in the Set Column action, you would display one of two Switches using visibility to check which value is in the user specific column.

If you have a little more clarification on what you are trying to do, maybe we can figure out if there is a better way to handle this.

2 Likes

Hi Jeff,

Okay separating with 2 sheets solved my issue, sorry for the confusion of the first inline, yes I wanted the Bool value to be just one cell. Thank you I know now for the layout that shares the same details for components. I’ll try the specific user column :).
Thanks for your help !

3 Likes