Hi all, I’ve got a dashboard that uses a JS script to dynamically set the $row_count_tok$ token based on screen orientation: 24 for landscape (2 pages of 12 rows) 40 for portrait (2 pages of 20 r...
See more...
Hi all, I’ve got a dashboard that uses a JS script to dynamically set the $row_count_tok$ token based on screen orientation: 24 for landscape (2 pages of 12 rows) 40 for portrait (2 pages of 20 rows) I pass this token into my search to determine how many rows to return, and then paginate them like so: ......
| head $row_count_tok$
| streamstats count as Page
| eval Page = case(
$row_count_tok$=24 AND Page<=12, 0,
$row_count_tok$=24 AND Page>12, 1,
$row_count_tok$=40 AND Page<=20, 0,
$row_count_tok$=40 AND Page>20, 1
)
| eval display = floor(tonumber(strftime(now(), "%S")) / 10) % 2
| where Page = display
| fields - display The token and logic work (tested manually), but I get this message on page load indicating the token was not ready when the search ran: Search is waiting for input... How do I force the query to wait for the token to load ? Many thanks.