Set FROM and TO automatically via query

Is there any way to set the built-in FROM and TO variables programatically, based on another variable or dashboard parameter? My dash analyzes a log file and takes the file ID as a parameter. It sets several other parameters automatically with small queries using that file ID. Pulling the correct time bounds for the dash would be just as simple, but I can’t tell how to make the time bounds depend on a query.

I couldn’t find discussion of this in the docs. I found this thread saying it can’t be done, but that was a few years ago so I’m hoping this function has been added.

If it can’t be then my workaround will be to make custom parameters that are query-based, and then make every time-based plot in the dash depend on those instead of the built-in time variables. but i’d rather avoid that

what is your datasource

also what value does the 1st variable have and how does it affect from to

The data source is Bigquery. The input is a free-text string holding a log GUID. So the user might input XXXX-YYYY-ZZZZ, and the query to set FROM would be something like SELECT start_time FROM mydb.my_logs_table WHERE log_id = $log_guid

so when you say from to I assumed it is the date picker from to. but now you are referring to a log_id field

not seeing the correlation from log_guid to the FROM TO fields

I’m not sure I understand you. Yes, when I say FROM and TO I’m referring to the date picker fields.

I have my own Bigquery data table which has many columns, including a log_id column, a start_time column, and an end_time column, and many rows, one for each valid log_id.

My desired behavior is that the user would paste a log_id into the variable input, and then the FROM variable would be set automatically, via running the SQL I quoted above, which would return the relevant start time for the row in my table matching pasted log_id. the TO variable would be set the same way.