Filter logs in clouddb

I need get several records into a clouddb table.
How can I filter a recorset with some condition in clouddb?

Infinite thanks

The question you asked is not understandable according to the given information (nothing), please reply with following points

Record sets are hard to obtain in tag/value data bases.

Some data bases support secondary indices in their native API, but not any AI2 components.

You could try clever tag/subtag design to match how you want to filter or shard data, or you could code your own secondary indices.

Alternatively, you can read a high level tag to get back an entire branch of the data tree and use JSON conversion and structure walking to filter the result.

thanks anyway guys...

The question seems quite precise to me, and I don't think it is difficult to understand...

This is the path that I am managing to partially solve:

a) the Clouddb.GetValue function of the extension
Clouddb produces an unordered list of ALL records in the tag.

b) I process this unordered list using the SetFilter function
of the extension, which
produces a left-to-right filter of the string of each element in the list of the resulting listview.

At least the first significant characters can be filtered out.

The result is not very elegant, much less professional, but it is a step forward.

If someone is interested in me sending them an example of a filtered listview, I can send them an .aia to analyze it.

Greetings from Buenos Aires, Argentina

Why not show use some raw data coming back from cloudDB, the structure you are using in your cloudDB, and an idea of what you expect your filtered output to look like in the listview, otherwise we are just guessing at what your are doing and trying to achieve. This request seems reasonable....

I'm not a fan of extensions.

There are some nice list filter blocks deep down in the list blocks palette.

The tag that I am interested in filtering has the following fields:

delimiter chars between fiels are "***"


DateTime (char, "dd/mm/yyyy")

Event code (char, "Police")

UserName(char, "John Doe")

Latitude / Longitude (numeric "-34.55, -58.6547")

I need to filter only the records from a certain day.

The processes work well, as you can see in the photo:

I went the extra mile here and generalized the filter by column, rather than just applying the text contains test to every Element in the list.

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

Dragging blocks




David de Argentina

I took a look at CloudDB to refresh my memory of how well it supports branching of tags.

It does not.

Seeing how your app accumulates data by date/time, I recommend keeping only one day or month worth's of data per tag, to avoid having to download the entire history of your data each time you want to view something.

prior to processing the entire table, it reorders it.

apparently everything is working very well, with three fields that I can filter based on your script.

Here you have the example to test it

listview.aia (3.2 KB)

The sort block you use looks at the front of each list item for its sort key.
Your date format is, what, dd/mm/yyyy?
That's the date format you chose.

So all the day 01 of all the months in all the years come before all the day 02s of all the months of all the years.

I would have chosen a format like, to make the sort come out chronologically.

Here are two alternative sort blocks you could use, if you are committed to that date format or if you want to sort on one of the other fields:

I only read your code.

Testing it is up to you.

Thank you very much again.

In the example we saw, I don't care too much about the sorting by date, because I filter by full day in the dd/mm/yyyy format

It is probably more efficient to redefine the key tree, to provide greater versatility.