Help to pass the value

Hi, I nee help why i cannot pass the value from the for each loop. It writes only the last Order number to the list. Here is my code:

Case solved. I have used an extension JSONTools.

You set the variable to the each value. It will replace the previous value.
You should:
Use join block (return a string)
Join (get global tagOrderNo; get tag)
Add item to list (return a list)
List=global tagOrderNo
Item=get tag

1 Like

This will return as a list instead of individual Order no. I was wondering why it didn’t pass each value when it reaches the validateOrder procedure.

Try this first, then it will worked

Remove the set variable as well

It did pass through.
but the list only contain one item

I tried both of your advise. yes it pass but it show all in the list.

can you explain more of what you want at the end?
If u just want add in the global MDList, then do
In procedure if variable = Medicine
For each item in the list list= get global tagOrderNo
Do add item in the list
Item=get item

Hi. I have attached the Firebase database and show the data that i need to be stored to list. If you have a better suggestion. i would highly appreciate it. Thanks.

i don’t use firebase so far. Wait others to reply. I can only help with your blocks

1 Like