How do you display selected date picker date and then save to DB

on screen 3 I want to select a date from date picker, display it on the text box below then save to tiny DB to display on screen 4. On screen 4 I want to display the date and ''notes'' and be able to delete a selected item from the db.

The key is simplicity so i can understand it please and thanks

Trail_APP (1).aia (174.6 KB)

You are saving the DataPicket.Text, not the date selected. And you are trying to display it in DataPicker.Text ...try to save the Date (like you have in the procedure with DatePicker.Instant and FormatDate) and to display that same date in the textBox.

Anyway, if the notes are associated to a date, it would be better that you use the date like a tag and the notes like value. So, you can recover the dates and their associated notes easier.

Thanks Ramon, how would that look in blocks? I get what you mean about the procedure but not sure how to duplicate it.
Thank you

I could use a visual explanation of this if anyone has the time, thank you.

Is this what you need?

image

1 Like

Is this visual enough for you?

Thanks, It hasn't resolved my issue and I'm even more confused tbh, essentially i want to enter the date chosen from date picker with ''notes'' to the DB and display that result on page 4 tidily, I currently can get notes to show but not the date, can anyone help?


Trail_APP (3).aia (174.6 KB)

I still require help with this if anyone is willing to, thanks

Is the date intended to be the current date, or either current, past or future as selected by the user?

Virtual Screens would make the data available from one "Screen" to another.

https://groups.google.com/d/msg/mitappinventortest/K-zAr2X3nio/qzrDox_pBgAJ

How about like this:

that really makes sense to me thanks Tima, to finish this off I need to display that on a following page and be able to select an item from the listview and delete selected item from the DB (and viewer), could you help me with this? thanks again. (for clarity it doesnt have to be clicked on, if thats easiest its fine, a text box search and delete is fine aswell)


Easiest seems a listview which displays value, which can be clicked on to delete, can anyone advise? thanks


still cannot remove item and get it to refresh

SelectionIndex

Sorry could you elaborate?

Read the tool tips to see the difference between SelectonIndex and Selection.

Then read the tool tip for the remove item from list block.

Then come back and tell us what you learned.

Am i correct in saying i need to create a list index? i am getting the empty list error

I neglected to mention the gap in your data flow.

You try to remove a list item from a temporary copy of what was stored under that TinyDB tag.

Then you go and store into TinyDB the contents of a global variable that you never loaded or updated.

http://www.appinventor.org/bookChapters/chapter16.pdf