cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Pass a query parameter from URL to master

suraj_visvesh
5-Regular Member

Pass a query parameter from URL to master

How to pass a query parameter from URL to Thingworx Master? I know we can set a mashup parameter, but is there a possibility to send this mashup parameter to master before the master loads?
Also, is there a way to load the master after the service in contained mashup has been completed?

Thanks,
Su

4 REPLIES 4

Hi @suraj_visvesh 

 

You can pass default value for Mashup Parameter in URL

 

For example : If you have a Mashup Parameter named "thingName" and if you want to load/set default value for it.

You can set value while accessing URL - <<THINGWORX>>/Mashups/TestMashup?thingName=TestThing

 

/VR

suraj_visvesh
5-Regular Member
(To:Velkumar)

Hi @Velkumar,

Yes I know we can get a parameter for a mashup, but how do I pass this to master of the mashup? I have a service in master which would require a parameter from the URL.

Thanks,
Suraj

Hi @suraj_visvesh 

 

You can create a session parameter and pass value from child mashup to session. In Master Mashup, you can retrieve value from Session parameters

 

More about Session Parameters - Session Parameters (ptc.com)

 

/VR

suraj_visvesh
5-Regular Member
(To:Velkumar)

so this is my use case, I have a session parameter for which value is being set by a service in the mashup on load. I want to set this session parameter's value as CustomClass for master. But the master loads before even the service completes in the mashup, which in turn does not set the customClass when it's loaded the first time. But the class is set when I refresh the page.

Can you help me out here?

Thanks,
Su

Top Tags