One Table multiple Data source?

Goal: Use different query's based on the selected TAB's

Today I have one Get_Items query with many OR and IF in the where clauses and reTool is slow to get the data based on Tab user is on
Example listing 49 rows in the table takes about 80 sec.

Tested: use of Union in the SQL, this speeding it up some. I want to test the use of separate query's for each Tab.

Need help with how to running different query depending on TAB selected.

I have one Tabel "list_items" that shall list the data.
image

As a do not know any JavaScript coding, maybe some body can help a new beginner.

this is the code I'm testing, but it do not work:

{{tabbedContainer2.currentViewKey === 1 ? 
  Get_Items1 : tabbedContainer2.currentViewKey === 2 ? 
  Get_Items2 : tabbedContainer2.currentViewKey === 3 ? 
  Get_Items3 : tabbedContainer2.currentViewKey === 4 ? 
  Get_Items4 : Get_Item5 }}

Is there any thing wrong with what im trying to do and is there any error in my code?

-Thore

Hey @Thore,

You're on the right track. Try adding .data after each Get_Items as currently you're referring to the query as a whole rather than the data that they have returned

Thanks for your help.