Problema ingresar nuevos campos en listview

Hola solicito su amable ayuda, tengo un listview que muestra los registros ingresados, el problema es que cuando regreso desde el screen 2 al screen 1 y querer agregar otro registro a la lista existente en lugar de aumentar el registro en la lista se pierde los anteriores y sustituye por el actual ingresado.

Adjunto imagen del evento agregar datos:
muestra
image
image

En este screen inicialmente ingreso las asignaturas:
image

Y luego de regresar del screen 2 al 1 y querer ingresar otra asignatura a las 4 existentes se sustituye por el nuevo registro asĂ­ como muestro a continuaciĂłn:
image

Por favor su colaboraciĂłn para superar este problema que ya he consultado y no puedo resolver, muchas gracias de antemano.

You should show and identify your blocks for Screen1 and for Screen2, and your app screenshots as well (which Screen?).

1 Like

You must learn to work with tables (lists of lists)

Don't store columns.

Store rows.

Also study dictionaries, which keep data together by name instead of by position.

http://ai2.appinventor.mit.edu/reference/blocks/dictionaries.html

Did you see your problem?

  1. Every time you are saving to the items to global list and showing those list items alone to the listview.
  2. And everytime you are wiping your own data into the tinydb in same tag.
  3. If you planned to add everything then first you should know how to make a list from the existing tinydb items (that is very simple)
  4. Then every time, add the current value with above tinydb list and then save that list into tinydb. This is how you should do

Please go through with the above FAQ

1 Like

Could you please show me the blocks, if it's not too much trouble, or if you would perhaps be kind enough to create a simple app to show me, I would really appreciate it in advance.}

Or if you prefer, I can send you my project so you can help me correct the problem, please.

Please let me know your email address if you're happy for me.

Here's a sample project with a similar structure.

I don't know if it will help, because I can't read your language and I am not sure you can read mine.

You need to do only one thing.

During screen initialization just do this

image

Excellent my friend, thank you very much, it works wonderfully.

1 Like