test_date_filter = { label = "Test Date Filter Expression" shortcut = "tdf" requires_profile = true parameters = { date_filter_expression = { shortcut = "dfe" required = true } } expression = ` include "templates.util.date_filter.get_date_filter_info"; node dbi = new_node(); echo("internal.profile_name: " . internal.profile_name); 'v.dbi' = ''; #get_database_info(internal.profile_name, 'v.dbi', true); get_database_info(internal.profile_name, 'v.dbi'); echo("dbi: " . node_as_string('v.dbi')); string earliest_log_date = @'v.dbi'{"earliest_date_time"}; string latest_log_date = @'v.dbi'{"latest_date_time"}; # Don't pin to the end of the data; pin to today latest_log_date = substr(epoc_to_date_time(now()), 0, 11); echo("earliest_log_date=" . earliest_log_date); echo("latest_log_date=" . latest_log_date); v.earliest_log_date = earliest_log_date; v.latest_log_date = latest_log_date; echo("dfe: " . date_filter_expression); node dfi = new_node(); get_date_filter_info(date_filter_expression, dfi, true, earliest_log_date, latest_log_date); echo("dfi: " . node_as_string(dfi)); echo("Final expression: " . @dfi{"expression"}); ` # expression } # test_date_filter