Hi, I tried to combine data from 2 different database and I can hardly update the dbPic but BookHstry database work just fine.
You probably need to provide the corresponding index for the entry in your second tag, if it is a list...
Do both of them need an index or I could just put one of them like dbPic.
Is dbPic a list of values or just a single value? If a single value is it a correct path to an image?
I think it's a list since I store and update image in there.
Then as previously stated you will need to provide an index to the correct item in the list. Get the index from the first selection and use that
Do you know what block should I use? I'm only a beginner and do not very well recognize the block that can retrieve the index.
Index from thing in list
is this it? what should I put in there? does thing stands for the index?
'thing' is an item in a list, such as the name of a fruit or the path to an image. 'list' is a Blocks List, e.g. 'List_Fruit', 'List_Images'. The result is the index number. For example, if I have a list of fruit:
Apple
Banana
Grape
Orange
Kiwi
'Orange' is index 4.
Show us how you load dbPic.
Show us the two database Namespaces too.
this is how I load dbPic
and this is the other page where I recently update from the previous code
I still can't update the pic tho.
first database namespace is bookHstry2 and the second which I kept image is dbPic.
both of them is tinydb
Image names you get from the Image Picker aren't permanent enough to store in TinyDB, from what I see in the ImagePicker Help:
https://ai2.appinventor.mit.edu/reference/components/media.html#ImagePicker
Regardless of how you got the current picture, you are using global variable pic as both a list and a single picture name?
If you keep more than one TinyDB, you can avoid tag/value conflicts by using different NameSpace values, like PICTURES vs BOOKS.
Here is a sample app tutorial that matches images and text ...