List Inception?

Well, I am out of School and that means I am back Thunking. And right back to the fickle Coding gods.

So, I need a list within a list. Essentially I have a list where there are patient names. If I click on a name it will populate as follows

And If I click on Patient 1

I used these blocks to get the data

And this to view the internal list

What I am looking to be able to do is to be able to click on say Medication 1 that belongs to Patient 1 and delete Medication 1 after an Alert pops up to confirm the removal. I have attempted this iteration Annotation 2020-06-11 220049
But the “Change stored PF by Item” ends up crashing the system and if I remove it, then I can Navigate to my Main View but Medication 1 remains in the stored PF.

I also tried

But it would remove the entire Patient 1 from the PF

I also tried to create an entire edit page that the Patient 1 Information would populate and could then be changed and save, but my result is I then have 2 "Patient 1"s one with Med 1 and one without.

Not sure if you all have any up or downstream ideas for how to fix this. What my current iteration has is the edit screen. But that would require the User to then look at the 2 "Patient 1"s and then pick the updated one which I would like to avoid if possible.

I can post the project also if you would like :slight_smile:

Hi @huntermclarkn, not sure if this is the best answer, but maybe you can use a database of sorts, and then in the listing of the names you would just fetch the name column.

First, you need to learn the concept of “one to many”, which is used for data communication. This means that one element in the main table corresponds to several elements in the subordinate table. The relationship of these elements is based on a unique key or record ID in the main table, for example:

Main table

key name

id1 Patient 1
id2 Patinent 2
idN Pftient N

Detail table

key name

id1 Med1
id1 Med 2
id1 Med 3
id2 Med 1
idN Med 2
idN Med 3

I think it will be easier for you to understand what you need to do.

Okay, not sure if this is what you mean, but I tried this for viewing

And this for deleting
Annotation 2020-06-16 144313

Nothing crashes and the Medications present themselves correctly. But it doesn’t delete the medication

Unfortunately, right now Thunkable X is very unstable and I can’t give advice until it is stable.

1 Like

I gave this iteration a shot as well

But it deleted the entire list not just the medication

Instead of deleting the list delete the options in it by key from the main table

Gave that a shot trying this, but it won’t delete anything

You need to understand everything yourself:

You clicked the button to delete an entry from the list. In this click button block, make blocks to delete from the list without switching to another screen, and so on.

You need to understand whether the delete block from the list works at all. make these blocks and show them to me.

Example of deleting an option from the list

1 Like