call.CreateElement is just showing braces and is not formatting

Hello Folks,

i'm currently trying myself on lists. Currently I want to make one with nice images and text. I found out the createElement block works for that case. I changed the ListViewLayout to Image, MainText, DetailText. This set up, I build the blocks as you can see in the attached files and unfortunately the result is not as excpected. What am I missing? Can you tell me? Thanks in advance !:smiley:

Its still not working :frowning: What am I missing?



Please provide the contents of your global Spieler as text. Then perhaps someone can help you. Your blocks do not make much sense without being able to see the raw data.

Yes, thank you for answering :smiley:
Sorry, I thought this is a common problem. The brace indicates that it is still in a dictionary maybe? Whenever I change the ListViewLayout to Just MainText or Image, MainText or any other selection, the output stays the same. So it returns the content in the braces everytime. This inticates, that the list is not formatting the content correctly, but interprates it as text. I tried changing the dictionary into a list of pairs, the result looks like this:

The common problem is not providing the requesting information or data (as text)....:wink:

I'm sorry, I wasnt sure about your instruction. I attach a screenshot of the global Variable Spieler in a text label.

Yep, can't do anything with that either, as requested, as text if you can.

OCR'd it....

Should be easier to read now:

You appear to have a list of four JSONs, and from your blocks it appears that you are attempting to save each key's value for each of the four jsons to a tinydb. You need to make this "string" into a dictionary first, then extract the list elements.

"Spieler_Bild":"file:\/\/\/var\/mobile\/Containers\/Data\/Application\/DC78CA32-AA3D-4E5C-9C39-65C4CF434A18\/\Library\/ Application%20Support\/AppInventor\/\/asset.JPG"
"Spieler_Bild":"file:\/\/\/var\/mobile/Containers\/Data\/Application\/ DC78CA32-AA3D-4E5C-9C39-65C4CF434A18\/\Library\/ Application%20SupportV/AppInventor\/\/asset.JPG"
"Spieler_Name": "hh",
"Spieler_Bild":"file:\/\/\/var\/mobile\/Containers\/Data\/Application\/DC78CA32-AA3D-4E5C-9C39-65C4CF434A18\/\Library\/ Application%20SupportV/AppInventor\/\/asset.PNG"
"Spieler_Bild":"file:\/\/\/var\/mobile/Containers\/Data\/\/Application\/DC78CA32-AA3D-4E5C-9C39-65C4CF434A18\/\Library\/ Application%20Support\/AppInventor\/\/asset.PNG"

I have some concerns about your Spieler_Bild urls: AppInventor\/\/asset.PNG which shows two forward slashes...

However, there doesn't seem to be much point in further processing the data until you need it for something. If you do this:

then the "list" is saved to persistent storage in the tinydb, and you can see that each item within the list is a dictionary, which will allow for key/value extraction when needed.

To create a listview of the data, do this:

which for me returns everything except the images....


1 Like

Thank you so much for helping me out. I'm sorry, I'm not sure what you meant with the global Variable Spieler as text. Sorry for the confusion.
Now I changed my blocks as you instructed, but the result is the same.


Again, thank you for helping me sir.

Your blocks do not look anything like my blocks :wink:

Ok so I figured it was working the whole time. Problem was the systemsoftware. On Android it look great, even with the images. Thank you Timai2 and sorry for the complications. :smiling_face_with_tear:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.