Dynamic components value descending order

dear all,
is it possible to set dynamic components to display the value from Firebase database in descending order?
the latest data/value is on top.
thank you.

try this extension

https://community.kodular.io/t/free-listninja-extension-from-still-learning/288514

Use sort method

@Still-learning thanks for suggesting your extension but im still figuring out how and where to put the sorting blocks :downcast_face_with_sweat: with my current blocks below
blocks (2)

image
got it! thanks @Still-learning

1 Like

This can be possible only if you store tag as number from descending to ascending, then call get tags store in variable using reverse list block, then call it will show latest data first.

Hi @Still-learning,

Wana ask what if the list is empty or nothing, what is the workaround for the sortdescend blocks ya?
Thanks

then use one condition like if the list is empty through alert else run the logic

when web go text
if length of the list call web1 JSON Text Decode json Text(get response content) = create empty list
then show notifier alert
else call Listnoinja SortDesending list call web1 JSONTextDecode json text(get rspon COnt)

hi @Still-learning,
seems doesn’t work :cry: please help
image

Oh sorry i misspelled it. Insted of create empty list in the comparison block use 0 (zero)

Length will return integer and it cannot be compared with yailist.

  1. If you use length then compare with 0
  2. If you remove the length let it be the same structure

still the same, or i did it wrongly?
image

remove length then compare with 0
use

if  json text decode = ""
then 

image

remove 0 to
string

image

can u show me the do it result of json text decode

you saying this one?
image

I want to know just what the json text decode block return.
U can set label text to json text decode return .and show me
we need to know what is the block returning?

image
this one with values in firebase database

ok
use this

if response content = ""
then

blocks (1)

  1. when there’s data in firebase database, no issue

  2. when there’s no data in firebase database, then will show below
    image