# Help needed with retrieving sub-lists

**URL:** <https://community.thunkable.com/t/help-needed-with-retrieving-sub-lists/1521062>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, variables, lists, question, help\
**Created:** [September 23, 2021, 2:48am UTC](https://community.thunkable.com/t/help-needed-with-retrieving-sub-lists/1521062 "2021-09-23T02:48:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 23, 2021, 1:34pm UTC](https://community.thunkable.com/t/help-needed-with-retrieving-sub-lists/1521062/4 "2021-09-23T13:34:58Z")

</div>

When I redesigned the blocks, I have one thing in mind. These code blocks will be in a function to be called from **3** different buttons:

- Today Button: which will make `thisDay variable` equal to `TODAY`.
- Yesterday Button: which will make `thisDay variable` equal to `TODAY` - 1.
- Tommow Button: which will make `thisDay variable` equal to `TODAY` + 1.

You will then simply run the function and retrieve the sub-list of the required day.

This is the function

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/0/b038454cf1cecc7911691c5c49e3d637100c9986.png)

These are the buttons to show selected timetable  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/7/577e8a563904fb0a5214f13003734caa024b202b.png)

---

_[View the full topic](https://community.thunkable.com/t/help-needed-with-retrieving-sub-lists/1521062)._
