This message originated from Cribl Community Slack.
Click here to view the original link.
I am trying to implement state tracking for a rest collector. How do I reference the state in the collect parameters
trying to assign the parameter 'newerThan' an integer with the javascript prevState.lastActivityId == null ? 7369027 : prevState.lastActivityId When I run a preview it just passes url encoded of my javascript, but the expression should set to 7369027
Solved
REST Collector State Tracking Fails To Assign NewerThan Parameter Correctly
Best answer by Jon Rust
Not Robert's fault. Quirk in the way we handle JS fields that may be plain text
To be sure: Start all JS entries with backticks (
View original) and use template expressions (${}`) inside to enclose the JS bits. And for text always start with a single or double quoteSign up
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
