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; ```