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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Create Mashup URL with Initial Infotable Parameter

JK_10744682
13-Aquamarine

Create Mashup URL with Initial Infotable Parameter

Hi all,

 

I am aware that you can set a mashup parameter using a URL for example:

<<THINGWORX>>/Mashups/TestMashup?thingName=TestThing

 

However, I have a use case where I would like to preload an infotable property into the URL. Is this possible? And if it is does anyone know the syntax?

ACCEPTED SOLUTION

Accepted Solutions

I tested with urlencoded serialized infotable and it worked

{"dataShape":{"fieldDefinitions":{"description":{"name":"description","description":"Entity description","baseType":"STRING","ordinal":0,"aspects":{}},"name":{"name":"name","description":"Entity name","baseType":"STRING","ordinal":0,"aspects":{"isPrimaryKey":true}}}},"rows":[{"description":"world","name":"Hello"}]}

url encoded:

http://localhost/Thingworx/Runtime/index.html?mashup=Test&entities=%7B%22dataShape%22:%7B%22fieldDefinitions%22:%7B%22description%22:%7B%22name%22:%22description%22,%22description%22:%22Entity%20description%22,%22baseType%22:%22STRING%22,%22ordinal%22:0,%22aspects%22:%7B%7D%7D,%22name%22:%7B%22name%...

and it did render my grid which bound the entities mashup parameter:

nmutter_0-1762952495874.png

mashup config:

nmutter_1-1762952619071.png

 

Not sure if there is a more compact way for this. I dont think you can pass too much data to it via url this way...

 

Maybe you could have some "landing" mashup which would navigate to your target mashup, passing wanted default parameters instead?

View solution in original post

5 REPLIES 5

I tested with urlencoded serialized infotable and it worked

{"dataShape":{"fieldDefinitions":{"description":{"name":"description","description":"Entity description","baseType":"STRING","ordinal":0,"aspects":{}},"name":{"name":"name","description":"Entity name","baseType":"STRING","ordinal":0,"aspects":{"isPrimaryKey":true}}}},"rows":[{"description":"world","name":"Hello"}]}

url encoded:

http://localhost/Thingworx/Runtime/index.html?mashup=Test&entities=%7B%22dataShape%22:%7B%22fieldDefinitions%22:%7B%22description%22:%7B%22name%22:%22description%22,%22description%22:%22Entity%20description%22,%22baseType%22:%22STRING%22,%22ordinal%22:0,%22aspects%22:%7B%7D%7D,%22name%22:%7B%22name%...

and it did render my grid which bound the entities mashup parameter:

nmutter_0-1762952495874.png

mashup config:

nmutter_1-1762952619071.png

 

Not sure if there is a more compact way for this. I dont think you can pass too much data to it via url this way...

 

Maybe you could have some "landing" mashup which would navigate to your target mashup, passing wanted default parameters instead?

JK_10744682
13-Aquamarine
(To:nmutter)

This did work, but I found for my case it was easier to send query parameters through the URL then call a query of the data in the mashup, rather than trying to push a large infotable of data through the URL.

this sounds better, indeed

Hi @JK_10744682  would you please share the steps with which you have achieved desired behaviour so that it would be helpful for the community to easily understand if they have a similar query in the future. Thanks

JK_10744682
13-Aquamarine
(To:MA8731174)

Can either use the accepted answer for passing an infotable, but for my problem I simply passed parameters for a query through then queried the thingName + Property. Can use something like this:

 

<<THINGWORX>>/Mashups/TestMashup?thingName=TestThing

Announcements


Top Tags