I am making a simple inventory application wherein I will be storing the Product Name, price and stock of it. Once I added it on the list, I want to view on on the ListView. But I have some error:
you are creating three different lists and then adding the whole three lists to other new list "prodList". You need to create a list of product where each element be a list of three items (name, price and stock). Something like this:
I have more question, sorry for bothering you >< I used TinyDB as storage for it. Then I input some data on the list, then I try to go to another screen. When I go back to the inventory screen, all I input data is gone. Why is that so?
In the listView? you need, in the Initialize block, to read from tinyDB the stored data and, if not empty, show it in the listView if you want to show it when starting the screen.
Hello once again! How about this. I have update button and it works. t just that when I pick something from the ListView, it will display on their respective text boxes but it is not updated.
For example this:
I have a list for the oat, and originally it is 6 in stocks. I changed it to 9. The List view updated but when I selected, it does not match with what is shown in the text boxes after picking
You have the list prodList where you are inserting the new elements to display in ListView, where you are updating the elements (with Update button) and that is the list you are storing in tinyDB.
But, in AfterPicking event you are using the three individual lists....which are not updated....maybe those three list are not necessary?
You can take the three elements from the Selection:
Earlier, the adding the products is already working and I can put any text I want as I seud the "join", hence I also put a ", ₱"
But I have a problem now, wherein after picking from ListView, the Peso sign is also included on the text box since I select the list item get element to index 2
I tried using join function at split text at and also tries split text on index 2 but it did not work, how can we fix it?
I do not want to include the peso sign since I put myself on the feet of user, if I did not remember to remove it, the updated element will result to have two peso sign
Thank you very much for your kind help! I am just a student and also my first time using this so I can say that I really still do not know how to work the blocks out. Thank you once again!!
Hello, I am here again! I have a question. How can we do it where if there is an unanswered field, there will be a error message beside that field and it will not continue to do the action, it will just stop the user.
For example, I didn't put a value on the price, if I click the add button, it will show the error, making the user force to put data on it.