How to display List Viewer

I want to specify the date using DateInput, display it on the label, search from the DateInput field in Data Sources, and display column1 of the corresponding row. What should I do?

Please help me because the block cannot be connected and it is unknown.

Thank you.

[image removed]

Can you please crop your images before posting them? It looks tiny because of all the white space in the screenshot and it takes up a lot of space on the forums.

tatiang

Thank you for your reply!
I have recaptured it so can you see it?

Thank you.

1 Like

Here’s a demo of how to do that:

https://x.thunkable.com/copy/ccf72ad3dcbe7044d261bbf49754d570

(See the first screen that has your username.)

The key is to make sure the DateInput values in your data source exactly match the date format of your Date Input component. You can see in your screenshot (and my demo) that the label has “Apr 19, 2022” but your data source column has “2022/04/19”. Those will never match. So either change the column values or change the date input format so they match:

1 Like

Tatian

You can reply.

I confirmed the block I received, but the further of “Label 30” is one pornography
There is a line in the list.
I did a block with Listviewer, but it becomes a list with one character and three.
Is there a way to display the 1st and 5th lines of the date in the marriage list viewer?

Thank you.

1 Like

When you use the block in list..... find first occurrence. then you know for a fact this can only bring you the first item in the data set which will never be the ideal situation to create a list as lists are by definition comprise more than a single item.

The other issue is that when you pass a string of characters to a list, Thunkable will try to fit the string into a list by assuming that each character is an entry in the list.

To overcome the above two situations, I did the following:

  • I created these two variables (although you can do without but I prefer it this way).
    image
  • I added a List Viewer component and initialize it after the date is picked.
  • I then assigned these variables the lists I would use from the data set.
    image
  • Now I loop through the dates in the list and compare it with the date picked, if found then I add the corresponding text of Column 1 to the list

Here is the complete block

Here is a sample output

Hope this explains it clearly.

1 Like

muneer
tatiang

Thank you for your reply.

I set it up as you told me, and it was done! !!

Thank you very much! Thank you!

2 Likes

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