Switch lists in a list view

This is a simplified arrangement of what I am trying to.

I want to use a single list view component to display two different lists, one at a time, whenever required.

I have two buttons for that. This logic is able to display either of the lists to the list viewer for the first attempt.

If I click “Button 2”, ListView displays “List2” but then If I click “Button 1”, it gives me “Undefined” error.
same case if I click “Button 1” first after screen initialises, ListView can display “List1” but then it is not being able to show “List1” on “Button1” click.

I have tried to replicate the situation while using Airtable database getting the column to list, from another project where I encountered the problem, hence I have used the third list i.e. “tempList”. So please ignore “tempList” part.

You can also focus on this part of the blocks.

Annotation 2020-05-06 095637

Help is appreciated.
Thanks in advance.
Regards.

With a single button, I can achieve what I expect.

Remove clear list block.

1 Like

Wonderful Nikhil! Thanks a lot! It worked! Regards. Nihar.

Its okay @TheGenius as we are here to help you. :smiling_face_with_three_hearts:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.