Pass dynamic parameters to URL screens/applet

jacque3
Kilo Guru

Hi Everyone,

Is it possible to pass dynamic parameters to a URL screens like this?

jacque3_0-1674059897477.png

Our scenario is ;

1. We have List screen with QR/Barcode type field , this QR contains the sysid of the catalog item, some data that we needed to autopopulate the catalog item.

2. After scanning the QR we will select the catalog item and then open it in a web screen with autopopulated data from the QR.

3. We have multiple QRs to be scanned so we can't add a default value in the URL.

 

Thank you

6 REPLIES 6

jacque3
Kilo Guru

I've used a different approached instead since our mobile has personal and work profile. so I use a QR widget and let the QR redirect to any links 🙂

Thomas Wright
Tera Contributor

I figured out a method of passing parameters into a Catalog Item within the Mobile App / Mobile App Builder from .

We can use session data to store parameters in server execution scripts, and then call those client side from a catalog client script.

I set up a Function with an Action Item

The function had the parameter "Jump to screen after successful action completion" set to true and I set the next screen as a Mobile Web Screen with a link to the catalog item

e.g. /mesp?id=sc_cat_item&sys_id={my_catalog_item_sys_id}

Set up an input screen on your action item to collect whatever data you need

For the Action item execution script you can use the method from here to store data temporarily in the user's session

gs.getSession().putClientData('myData', 'Hello, world!'); 

The above runs when the user submits the action.

Then on your catalog item, set up an onload catalog client script to grab the session data:

e.g.

alert(g_user.getClientData('myData')); 

ThomasWright_0-1723916526437.png

ThomasWright_1-1723916546452.png

ThomasWright_2-1723916603935.png

ThomasWright_3-1723916656073.png

ThomasWright_4-1723916701010.png