16
Views
2
Comments
declare variavel to filter
Question

I can declare a variable to use as a table filter. Example: if this option is true, I change the "filter" variable and reload the table to filter.I'm trying but the table doesn't allow me to use a variable that isn't "boolean"

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Rafael,

Filters are applied to Aggregates or SQL queries. I don't understand what you mean by a "table using a variable". Can you share a module of what you are trying to do?

2025-03-11 17-46-55
Tiago Dias

Hi Rafael,
The result of the expression must be a boolean but you the variable is not required to be, i.e.:
Example 1 ) You want to filter records starting with 'lorem'. 
In the expression you need to provide: ENTITY.Name like "lorem%''
Example 2) You want to filter records that have a date and the date must be filled in.
In the expression you need to provide : ENTITY.Date <> nulldate()

In both cases, "lorem%" could be the text of a text variable and nulldate() could be the value of a Date variable. What matters is that the result of the evaluation must be a boolean.

Best Regards,
Tiago

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.