Help needed with changing list viewer to different variables

@muneer @tatiang
Hi, I hope you are having a good day.

I have a homework assignments screen and what I would want to occur is when the user clicks on the ‘subject’ field, the list viewer displays their subjects which they have previously entered so that they can pick a subject for the assignments. I have designed the code as follows:

Screen Shot 2564-10-26 at 10.40.54

When the subject field is clicked the first time, it works fine, however, it does not work again once the assignment as been added. I’m not sure why this is occurring, any help would be much appreciated.

Here is a link to the project:

https://x.thunkable.com/copy/0d2c27257406f9e4ec564fce6ffe4903

Note: when you live test the app, you will first have to enter in some subjects.

Thanks!

3 Likes

the UI IS GOOD

Hi, @jakeheron! I think getting a new list-viewer for selecting stored subjects would simplify the process for you

If you create a new listviewer for displaying stored subjects, you would not need to check if list = subjects list when an item click occurs in the assignments list; You can add the code for subjects list - item click into it’s own block.

You can hide/show the list whenever you like, for example after selecting the subject, hide the subject list and show the assignments list.

Let me know if this works for you. Cheers!


Also I had a look into your project, and I must say too - you have designed a very clean and beautiful UI for your app. Congrats! :blush:

Hi @kartik14 ,

Thank you very much for the kind words. I have added your suggestion and it is working, however, there is a still a problem with selecting the text input field. When the input is clicked the first time, everything works fine, however, if you selected it again, nothing happens. Any reason why this may be occurring.

Thanks!

Hi! Please tell me if I am right - you want to show the users your subjects list whenever he/she clicks on the ‘Subject (Type here)’ field.

If I got it right, try this -
image

Let me know if this works. Cheers!

1 Like

@kartik14

Yes it is working, however, as previously stated, it does not work the second time. In other words, once the assignment has been added, if the user clicks on subject again, the subject list will not be shown. You can test it if you like:

https://x.thunkable.com/copy/7b83baa0e20a705f35f87bf6ffa6cf99

(press demo on data entry to automatically populate fields)

@muneer could you possibly help with this? Thanks.

1 Like

I tried the link but I only get empty screen.

I was able to re-mix your project and use the DEMO button as suggested but once I select a subject from the timetable, the app crashes and never reach to the homework screen.

Hi, @jakeheron! I ran some tests on your given project, and it seems that there’s a bug in the textInput.click block - It does not consider more than one clicks. I hope the Thunkable team will fix this.

Meanwhile, you can try this workaround - since you are not letting the user actually enter text into the subject box, why not make it a button? (subject input in the below code represents a button)

Now in the Designer area, you can customize the borderColor, fontSize, etc. of the subject input button to make it look similar to it’s surrounding components (dateInput / textInput).

Let me know if this helps. Cheers!

1 Like

@kartik14 @jakeheron I’ve reported the bug you discovered here:

3 Likes

Thank you for forwarding this issue, in the meantime, I have just used a button disguised as a text input and it works fine. Thanks @kartik14 and @tatiang for your help!

2 Likes

@tatiang
I tested the Text Input click behavior and found that in Thunkable Live App in the phone the click is registered every time you click on something else (the text input goes out of focus) and then back to it.

So if you click anywhere in the screen then click on the Text Input then the click will be registered (using the phone).

I think this is meaningful to differentiate the click from the change event.

2 Likes

Yes, it is helpful to know this. Do you mind adding a comment to the bug report I created?

1 Like

I’ve just did.

1 Like