Displaying values from multiple tags in Firebase

Hi,
I'm trying to display a text value (tag "equipDescription) and a list value (tag "equipQuestions") at the same time. I can show them separately, although for some reason the text value only shows the first word when it is more than one word (see screenshot), and as expected with .json files the order of retrieved list is random, which I would also like to correct, if not too complicated. I suspect it involves making a list of the tags (Q01, Q02, Q03, etc.) and putting them in sequence, then calling the corresponding values.
Screen Shot 2022-06-12 at 10.19.52 AM



I've reviewed similar posted questions, but still not sure how to apply to my case...
Thanks in advance, Kris

OK, this returns the description and the questions in one json

image

image

image

image

What exactly do you want to do with the returned data now? Show an example....

Done a bit of extracting and sorting....

image

Credits @Kevinkun for his Listutils extension

1 Like

Thanks, I'll try that. The app has graphics (e.g. a drill rig) with sprites over pieces of equipment on the graphic, When a sprite is touched it sets a "equipItem" tag, that then brings up a list of questions to consider when doing the inspection. It's a read only, no user writing to the DB. I had it working with a much simpler DB in FusionTables but never got around to updating it when Fusion was discontinued. I decided to start mainly from scratch to make it look a bit better this time. See processsafety.app web-site.

Here is an old JSON finder app written before dictionary support, blocks-only ...

1 Like

Thanks, I'll "parse" through the document, looks like what I need to get a better understanding of handling the database.

Thanks, that code and extension solved the issue of correct order of the questions. Now how to show the questions without the brackets and the tags, more like my original screenshot? I tried using the "get values" block but it won't insert into the "call ListUtil1" block.Screenshot_20220613-204405 1.jpg


Thanks again!

You could do something like this:

image

1 Like

Thanks. I was having trouble understanding why the index number is "2" to show the Label1 text and "1" to show the list of questions, when the items are in reverse order in the .json file. I guess it's trial and error to find out the order it's parsed to when retrieved from Firebase.

Yes, if they come through from firebase in a different order, then you may need to test which way around they are, then set the indexes accordingly.

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