Error in fetching firebase data

my blocks is causing to fetch the same region if they have the same water level. can someone help me? this is what happen :point_down:

this is my aia, please help me.

Posting your blocks is a better and quicker way to get help as all don’t have time to check your AIA.

However, you can check this guide for better understanding of getting data from Firebase.

1 Like

here’s my blocks.

Call all the values using dictionary and by using for each number from to by block, read each value of the water level ., Put the common values in a variable, now read this value with water level and take the index , with this take the key…

test_firebase_3(1).aia (66.7 KB)

try to test this

1 Like

thank you so much, it works now :heart: :heart:
but is there other arrangement? i mean like descending order of waterlevel.

You want descending or ascending order level?

1 Like

yes, because this is 152.4 its supposed to be at the top

how will i do that?

Test this

test_firebase_7.aia (59.5 KB)

still doing this @dora_paz

hi @Still-learning, the descending works in here

but when the water level reach 100 the descending order doesnt work anymore.

This method works only if numbers have same digits. For example 001, 100, 095…

yes, looking for alternate… this method will work till 100 only…

Try this

test_firebase_final.aia (71.9 KB)

1 Like

hi thank you it’s working.
for last question is there a way to refresh the web component without repeatedly displaying the data? because this is what happens if its reaches the last data

if i did this i used a button to refresh like this

Try this with refresh

test_firebase_final_refresh.aia (73.9 KB)

1 Like

THANK YOU SO MUCH :heart: :heart: :heart

1 Like

As said i`ve tried less number of blocks…

just test this too…

test_firebase_3_1.aia (59.6 KB)

I have used the listaddon along with clock component to take the index of the ascending, quite easy only… Pls correct me if i am wrong… also try with any number of duplicate water level to even with any digit, i hope it will work good…

1 Like

Thank you, this is good too. Thank you so much

1 Like

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