Adding new lists within app inventor app

2019-08-03 08:39发布

问题:

I'm having a bit of awkwardness in App Inventor and lists. I had hoped to generate a list for a user entered value. For eample - a text box the user enters Book title, publication year, author, and ISBN. I would like to create a list with the ISBN as list number.

How feasible/practical is this?

Add items x,y,z to (previously non-existent) ISBN list does not work.

I'm currently trying a working around with empty lists List1, List2, etc that are filled sequentlially but this is less than ideal.

回答1:

This is very feasible/practical. You have to use 2 lists: listISBN which stores your ISBN and another list, let's call it listDetails which stores sublists of the detail data.

To save the data, use two add items to list blocks, see screenshot:

To select the items from your lists, use the same list index together with select list item blocks.

More about lists here, also see chapter 19 here