Filter result of invoked datasource

I want to invoke a datasource and save it into a property. So far so good.

Is it possible to filter the records stored in the property? I thought I can do this using the condition by setting the property, e.g. ${result.amount} > 0.

Do I use the wrong syntax or am I completely wrong?

Thanks in advance, Markus

This is array most probably, you need to select first some item, for example first item:
${result[0].amount > 0}

If it’s standard database method invoke should be even:
${result.value[0].amount > 0}

You can use your browser developer tools network tab to observe what’s returned.

Thanks for your reply. It is not what I am looking for. I want to use it as a filter for the result.

I’m afraid that I don’t understand what you are looking for. A screenshot or some more details will be helpful.

I invoke a datasource method (WebAPI) and save the result into a property. This is what I always do when I want to bind e.g. a DataGrid with data.

The question is: I do not want to have all records of the result in my DataGrid. I want to filter the result before or while I am saving it into the property.

From the API, I get aaaaall the records, but I want to use only a few of them. E.g. only newer than a specific data, where a value is bigger than a number and so on.

I also could change my API and use parameters to filter on the API-side, but I want to keep it more general and filter it with Radzen.

Do you know what I mean?

See my first reply. The JavaScript syntax for filtering arrays is:
${result.filter(i => i.amount > 0)}

again, use your browser network tab to check exact property names, retrieved data, etc.

Did you try the example and get an error as it seems to work for me in a simple example although need to update count also?

image