The QueryString module is an R RPGM module for fetching the query string of the page URL for public links.
- Download the latest release and unzip its content in the folder
modules/querystringin your project ; - Add a line
modules/querystring/main.jsin the Custom JS/CSS files entry in your project file ; - Add the following R code somewhere in your project:
source(rpgm.pgmFilePath('modules/querystring/main.R'));
QueryString.fetch(function(params){
# Params is a list of key/value of the URL params
# For example, http://myserver/a/mylink?p1=23&a=abc will have:
# - params$p1 = 23
# - params$a = "abc"
});Warning
Please note that the function will not be called until a user connect to the link. Also note that only the first time the user will enter the instance will work.