Repeat row: template expression

Hi,

I have a repeat row that displays a component and I want to have three scenarios on how to filter the data rendered by the repeater.

So far, I have defined a ServerConnect that fetches the data from the Server.
I have also linked to the ServerConnect, three DataViews with each one a specific set of filters.

I am trying to toggle the DataView that is linked to the repeater expression depending on what scenario the user selects but the template (dv_{{var_selection.value}}.data) is not working, can you please advise how to proceed?

Hello,
Why not use page routing and include the 3 different data views with their layouts in separate views, then change the view depending on user selection.

Hi @Teodor, thanks for your help but for maintenance purposes I prefer to have one layout instead of three.
As an alternative approach, I will try to use ServerConnect.data.where(var_string) and change the string depending on which scenario the user wants to display. I will update the post if this works or not

Finally I am trying the below approach, however I am not able to crack the syntax of the dataview filter, can you please suggest what is wrong?

Dataview filter:

InterruptedFlag == {{var_interrupted.value}} && ExpectedExpiryDate >= {{var_date_min.value}} && ExpectedExpiryDate < {{var_date_max.value}}

FYI, I am setting the values of the variables depending on the selected scenario to update the data view:
Scenario 1:

var_interrupted = 0; var_date_min = Today.datetime.toISODate(); var_date_max = ‘9999-12-31’;

Scenario 2:

var_interrupted = 1; var_date_min = ‘0000-00-00’; var_date_max = ‘9999-12-31’;

Scenario 3:

var_interrupted = 0; var_date_min = ‘0000-00-00’; var_date_max = Today.datetime.toISODate();

Finally, instead of using the data view filter, I have used the below syntax with the serverconnect that worked well. case closed:

sc_1.data.query1.where("InterruptedFlag", var_interrupted.value, "==").where("ExpectedExpiryDate", var_date_min.value, ">=").where("ExpectedExpiryDate", var_date_max.value, "<")