From 13042876b83a2efa1c3328c8f396f4a62b3cefce Mon Sep 17 00:00:00 2001 From: dc Date: Sun, 27 Sep 2026 20:47:53 +0000 Subject: [PATCH] docs(troubleshooting): a worked URL-parameter example for the hook read --- docs/dci-troubleshooting.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/dci-troubleshooting.md b/docs/dci-troubleshooting.md index 77e65e2..a2ef798 100644 --- a/docs/dci-troubleshooting.md +++ b/docs/dci-troubleshooting.md @@ -196,16 +196,26 @@ A service called directly (for instance from a URL, or by a script), or by an ol ### Reading the tables from a hook -A [hook script](macros.md) is `%include`d into the running service, so it shares the service's WORK library and can read the tables directly. To pick up a URL parameter by name: +A [hook script](macros.md) is `%include`d into the running service, so it shares the service's WORK library and can read the tables directly. Take an embedded editor opened at: + +``` +https://datacontroller.io/#/editor/SASHELP.CLASS?labels=true&embed=va +``` + +`browser_url_vars` then holds a row per parameter - `labels=true` and `embed=va` - so a hook can pick up either by name: ```sas %let labels=N; +%let embed=N; %if %sysfunc(exist(work.browser_url_vars)) %then %do; proc sql noprint; select value into :labels from work.browser_url_vars where name = 'labels'; + select value into :embed + from work.browser_url_vars + where name = 'embed'; quit; %end; ```