How do you run a block at the end of a got data from db block?

To whon that might help me

I have a big application with a backend consisting of a database with nine parameters on each tag. I want the db data to update my elements for a list view in the end of the data being downloaded. The question is how i can run a for each block at the end.

In this block i have tried making a counter and comparing it to the lenght of the taglist. For some reason the lenght of the tag list is not the same as the data coming to from the database. The counter says 935 and the tag list says 1238. Do you have a good way to make this for each block run on the last data going through from the database.

First of all please do yourself a favor and update your variable names... a name like name46 etc is just horrible... your future self will appreciate it in a few weeks when you probably like to adjust something in your blocks...

How do you download the data from the database? When do you start your processing? Most probably too early...

Generally start your processing after all data has been downloaded

Taifun

I know it is difficult to understand the global name numbers later on, but building it it is far easier in my oppinion.
I am not downloading and using the data afterwards. I make the processin simultanious with the download.
The question is why the tagnumber can be different from the number of tag datate being recieved in the got data block. How do i make a block in the gotdata block trigger when alle the data is recieved.

Easier for you, harder for us.

For the compiler it does not matter, which names you use... so why not using easily to understand names?
.

There you go... and your processing is fiinshed before the download completed

You forgot to provide a screenshot of that. .

Taifun

I misunderstood what you mean with building earlier...

The time you might save in the beginning you probably have to pay back later searching for errors... and you are already at a point to having to ask for help searching for bugs. .

There also is the concept of local variables you could probably use...

Taifun

ok, thank you very much for the input.

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