Populating the spinner with database data

Can anyone help me?
I have this Firebase registration:

I’m using the web component to get all the data from the Hypermarkets, Products, and Brands list and then populate the spinners.

But it’s giving an error, and I don’t even know what the error is.

For now I don’t know where we’re going but when the clouds meets too much it’s where the rain falls, but I it’s feels like something bad can happen here,

I reported it, after the update takes place, boom :collision: new bug appears, but Kodular why?

If you’re creating a project makes sure not errors are in your code, else you won’t debug, this error cover all wrong places in the coed

I recently created a post, ask to Kodular, guess what I, 4 hours pending

Hi Carlos,

Try this,
blocks(49)

{{“key1”:“value1”}, {“key2”:“value2”}} after decode will be ((key1 value1) (key2 value2)) you need a list of pairs to dictionary to bring back to a readable format

It keeps giving an error. The error message appears so quickly that I can’t read it all.
Can you show me what else is missing?
I saw in the discussion about this error message that it’s a Kodular update. The problem is that the messages that appeared were fixed, so we knew where to attack. Now they appear very quickly and then this gigantic one appears that crashes everything.
Has anyone reported this to Kodular support?

Will the data be structured in this way?

Bucket contains

"Cadastro":{
  "Hipermercados":"Villefort",
  "Marcas":"Camil",
  "Produtos":"Arroz"
}

and you’re trying to
blocks(51)

To do this the bucket must be orcamento_compras

Let’s see if this picture can help

I changed the bucket:

But the error remains:

I’ll put the Aia on to see if you can check what’s going on.
orcamento_compras.aia (143.8 KB)

:warning: Always remove the API keys before putting your project online :warning:

Why are you using both the Firebase and Web components? :grinning_face_with_smiling_eyes:
You can do everything with just one.

To fix your project,

  • I simply specified the bucket in the URL /orcamento_compras.json
    https://FIREBASE_PROJECT_ID.firebaseio.com/orcamento_compras.json

  • Global res replaces your bucket variable, which is no longer needed.

  • To replace the characters, it’s enough to specify just one ".

orcamento_compras.aia (143.9 KB)

Change your API key immediately :grin:!

Happy :kodular:oding!

Go to this website, it’s really well made and it will clear up any doubts you might have (by using the webComponent you can also save data without those annoying quotes and even implement authentication).
The only downside is that you don’t have the .DataChanged block.

I had forgotten about this here:

Thanks

1 Like

Is everything working?
If so, very good :partying_face:

Happy :kodular:oding!!!

It’s working when I’ve already registered items for supermarkets, products, and brands.
When nothing is registered, it displays an error.
I deleted the Firebase database and created a new one.
Is there a way to fix this?

The list is probably empty.
I use the web component for postal code retrieval. I use two response codes: 200 when the data is found and 400 when it is not found.

Aggressive, but it works :rofl:

Add a condition so that the functions are executed only if the response has code 200 and is different from “null”.

Your request url is wromg. It should end with /.json and not along with the bucket. json?

It should be firebase_url/bucket/.json?

Can you show us how you solved it? It could be useful for anyone who encountered the same problem.