Can I show the same spreadsheet tab as multiple tabs in my app, but sorted, filtered or displayed differently?

(not sure if it goes here or in Features request)

Posting back here a question I had in Spectrum but I think was missed. I love the filtering option but it seems that you can only apply it to one tab. Is there a way to have other tabs with the same sheet but filtered in different ways?
Or should I do some Google sheets manip to make this work (duplicating the same sheet several times to create the relevant tabs in Glide and then filtering each one individually)?

Hey @Stephanie_Bonnet, good to see you here. :slight_smile:

You can’t do it easily with tabs at the moment, but you can if you link to that screen with a button or image. I’m sure you can probably do the same with references as well.

In the GIF below you can see I’ve sorted my same sheet in two different ways and in the last one I’ve filtered it.

You could use arrayformula to copy data from one sheet into another and then sort that differently. That would be the way to do it with tabs.

Thanks I think i’ll start studying how to do array formulas then as the image option may not work with the cross reference lists that I have now.

We plan to make this much easier soon! You will be able to create many tabs that are all independently configurable views of the same sheet.

7 Likes

Ouh very very exciting!!!

As a workaround, you can write QUERY functions to filter and sort data at the same time.
One QUERY formula every new tab. :slight_smile:

1 Like

Would that allow for new data entered into the main tab to be automatically updated and filtered appropriately in the other tabs?

Yes. Just have the range properly set in the query.

So I managed to do a lot but I can’t figure out the syntax to allow to have TWO keywords from my filtered column to be selected.
I have a list of all accommodations and a column “type” that says whether they are a hotel, a villa or a B&B.
I want to create a new tab which synchronised with the main accommodations but filter them by either “hotel” OR “B&B”. I have the following formula,
=query(importrange(“1ZJXanHEgm_GznEPjsz1P-24vpsnByzJCdlWTtJXZGg8”,“Accommodations!A1:N435”),“select * where Col7 = ‘Hotel’”)

How do I add Or B&B to ‘hotel’?

Firstly, you should remove ‘435’ next to the N in the range input for the QUERY function. That would make it extensible for the new data that you add to the raw data.

Secondly, you can append the query in the QUERY function with OR Col7 = ‘B&B’.

@sardamit Thank you so much for your quick reply and in particular for the tip about removing 435.
I did what you said but get an error message. query I used is
=query(importrange(“1ZJXanHEgm_GznEPjsz1P-24vpsnByzJCdlWTtJXZGg8”,“Accommodations!A1:N”),“select * where Col7 = 'Hotel’OR Col7 = ‘B&B’”)

but the error message that comes is #VALUE!
Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "Col7 “” at line 1, column 33. Was expecting one of: “(” … “(” …

The thing is I do not have a column 33 so I don’t understand why it’s trying to get value from there?

I don’t see a space between ‘Hotel’OR Col7=…

Can you try inserting a space there?

1 Like

Ah ah, you’re right! It worked. Thanks again so much.

1 Like

@sardamit hope I’m not abusing your kindness but wondered if you could help me again? All the queries work well as long as I didn’t reload the sheet in Glide.
Now that I have done that, my first query pull the first row of my main tab (main tab is image 1) and put this in the header of the tab where I have the query (image 2). See attached images.
Do you think it’s a google sheet query issue or a Glide bug? If the latter, I’ll post it in the bug category. Thanks again

No problem at all.

Looks like a Google Sheets issue.
I would try and remove the double quotes around ‘little delicious…’.

Another thing to try: Pass 1 as the third argument to the QUERY function.
It indicates how many rows to ignore to reach the start of the data. Alternately, it means who many rows in the data are data headers.

Ok so the first thing did nothing and I don’t know how to do the “pass” stuff?

QUERY(range,query,1)

1 Like

It worked. Thank you SO much, I have learned a lot by following your instructions and am starting to understand the query syntax. Really really grateful. If I can return the favour in any way, let me know.

1 Like

No problem, Stephanie. I am glad I could be of help!

Cheers. :slight_smile: