Grabbing A Key-Value Pair From The URL

I’m looking to set a field in FMBF with whatever the query is in the url:

I was thinking that something like this would work in the Misc. tab:

“namedActions”: {
“onFormLoad”: [{
“action”: “function”,
“function”: “var q = (GrabTheQuery)”" ;\n\n{ model.query = q }",
“options”: {}

My question is what do I replace (GrabTheQuery) with to get everything from the ? to the end of the url?

See docs, there is a new BF.getQuery function in new code bases.


var theValue = BF.getQueryParam('theKeyName') // abc123

Most excellent! We’ll definitely update for that.