ProjectBucket y ObtenerValor de etiqueta en desplegable

necesito reducir la cantidad de extensiones de firebase
por ello quiero implementar uno solo para 3 desplegables
la etiqueta contenedora al iniciar el screen es:
prueba

image

por ejemplo cuando la etiqueta sea 1
debería obtener en el desplegable la lista de 1 2 3

image

Primero deberias cambiar tus etiquetas en firebase de 1,2,3,4,5 a 01,02,03,04,05. Es mejor porque firebase "odia" las etiquetas 0,1,2,3...
Despues ...

To be fair, it doesn't hate tags 0,1,2,3 etc., but treats them as a Firebase array, which behaves differently to a normal set of tags.

1 Like

Thank you for the clarification :slight_smile:

But when I save tags as 0,1,2,3 ... and I use firebase component I don't get data from firebase example..

image

blocks used

Works for me

image

I believe the problem is with get tag list.

image

When Button1 call GetTagList in bucket no data received from firebase instead when I call data one by one with Button2 I receive data. When I use tags in the form of 01,02,03.... get tag list works fine

Because it is an array, and not a set of key:value pairs

I have added this issue to my web page.

1 Like

Yes it was the last line, missed it :slight_smile: So as a conclusion if we don't know the exact number of tags in our firebase or the exact tags and we want to use GetTagList as a list it is not recommended to use numbers in the form of 0,1,2,3 ... because we won't receive any data

Or call back the entire array

image

or use the web component

1 Like

Again thank you and forgive me for highjacking the topic

perfecto

image

desplegable tercero

y como podría reemplazar el ListUtil1 para ordenar el contenido tengo entendido que ya hay métodos para evitar esta extensión

saludos

Puedes probar asi ..

y si quisiera ordenar alfabéticamente?
image

encontré la forma

image

¿si el contenido fuera variado numero texto?
image

como lo obtendría ordenado de tal manera que el los números vallan primero luego texto

saludos

Here is the nested if/then comparison you need:

  • if item1 is a number,
    • then if item2 is a number
      • then (item1 < item2)
      • else true
    • else if item2 is a number
      • then false
      • else text compare item1 < item2

P.S. These blocks can be dragged directly into your Blocks Editor workspace.

Dragging blocks

1 Like

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