Come aggiungere quantità rimanenti

Hello everyone,
basically, I'd like to add the remaining pills or other information to my medication list in the ListPicker, but I don't know how.

Regards
Nicola

Search this board for YAML

I tried searching for YAML but I couldn't figure out how I can solve my dilemma

If I’m not wrong for each medicine you are saving a list with two elements: name and expiration date.

Expand this list adding a third element, the number of pills.

  • in the procedure where you insert a new medicine, add this new data
  • in the list picker add a “long press event” which opens a dialog to modify the quantity of pills of the selected item
  • you can simulate the “long press event” saving a timestamp in the touchdown event and verifying it in the touchup event

P.S.

Why the post title is always in Italian ( no problem at all for me ; - )?

I'll try to follow your advice.
P.S. You're right, I always forget to translate the title too.

I also added the quantity, but I don't know how to change it later

This is the easy way: every time you select a medicine it will ask if you want to change the quantity.

P.S.

In the screen initialize I added an IntegrityCheck, as your list have only 2 elements per medicine, but the rest of the app expects you have 3.

This could be also used to check that every elements has a “reasonable value”… as “s…happens” as you have already discovered ; - )

med01.aia (5.5 KB)

I tried to include your advice in my app, but I ended up making a mess. Help!

Le_mie_medicine2_copy (1).aia (766.0 KB)

Attached the aia with minimum updates.

  • a long press > 2 sec to update quantity

Le_mie_medicine2b.aia (765.0 KB)

1 Like

Thank you so much for your time.
Regards
Nicola