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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Dashboard & Binding data

gch
13-Aquamarine
13-Aquamarine

Dashboard & Binding data

Hi,

 

I tried to make the following training:https://developer.thingworx.com/en/resources/guides/customizable-responsive-ui/ui-completed-samples

 

But the dashboard is not working. On the left side I have a list, when I select an element of the list the content of the dashboard should be actualized. This is not happening. According to me it seems that the property worldName of the gadget is never bind to a value, but I don't know how to do this. Do you have an idea how to do that? 

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:gch)

Sorry, you are using an actual Thingworx Dashboard and Gadget setup.

The only way then to propagate the selection is by using a Session Parameter.

So set the Selected Row worldName to a Session parameter you create,

and then use that session parameter to bind to the service within your gadgets.

 

View solution in original post

9 REPLIES 9
PaiChung
22-Sapphire I
(To:gch)

I don't have the exercise open so I will have to guess.

Your list receives data, that data will have a Selected row, bind the selected row 'Worldname'?

to the subsequent service that is being called to bring back the detailed data related to your selection.

Use from that initial data service, Selected Row changed event to fire the second service.

gch
13-Aquamarine
13-Aquamarine
(To:PaiChung)

Hi PaiChung, thank you very much for your Answer, but I'm not sure I understand it. In the training Step 4.12 the data (ThingTemplates_HeloWorldTemplate.GetImplementedThings.allData) are bind to the list widget - There is no binding with the selected row. I bind the selected row now (ThingTemplates_HelloWorldTemplate.GetImplementedThings.SelectedRow.name) to the parameter of the service used by the Gadget (DynamicThingTemplates_HelloWorldTemplate.GetPropertyValues.EntityName) But it still doesn't work, what is missing?

In the Step 2.7 a new mashup parameter 'worldName' is created and then bind to the parameter of the service used by the Gadget (DynamicThingTemplates_HelloWorldTemplate.GetPropertyValues.EntityName). I'm don't know why then it's not used after that

gch
13-Aquamarine
13-Aquamarine
(To:PaiChung)

Here some screenshots

gch
13-Aquamarine
13-Aquamarine
(To:gch)

I think I found the problem (not the solution):

 

Normally I will pass the selected entry to the contained mashup through a mashup parameter. In the contained mashup I will use this parameter for the function call. Is there a better way to do that?

 

In the dashboard I do not have any parameters that I can pass to the mashup. How to do that?

 

Thanks for your help!

thingw0rxgenie
12-Amethyst
(To:gch)

Hi,

 

Looks like the guide is missing a step or two.

 

1, If you look at the sample, theTestGadgetLibrary1 has a WorldName Mashup parameter. InTestDashboardMashup1, drag and drop your 'Selected Row' from the 'GetImplementedThings' service (used on the list) to the Dashboard. It might prompt you to confirm the gadget library TestGadgetLibrary1, confirm.

 

2. In TestGadgetLibrary1, ensure you have a connection from the Mashup parameter 'WorldName' to each gadget.

gch
13-Aquamarine
13-Aquamarine
(To:thingw0rxgenie)

Hi,

 

yes the TestGadgetLibrary has a WorldName Mashup parameter. But the TestGadgetLibrary is included in a Dashboard (created through a service) and the Dashboard has no Mashup Parameter. The dashboard is included in the Mashup InTestDashboardMashup1.

 

When I try to drag and drop the selected row or an attribute of the selected row I do not see the attribute WorldName of the TestGadgetLibrary.

PaiChung
22-Sapphire I
(To:gch)

Sorry, you are using an actual Thingworx Dashboard and Gadget setup.

The only way then to propagate the selection is by using a Session Parameter.

So set the Selected Row worldName to a Session parameter you create,

and then use that session parameter to bind to the service within your gadgets.

 

thingw0rxgenie
12-Amethyst
(To:gch)


drag_name.png

 

Here is a quick image. Just take the name field from the select row, then drop it the way I do here. You will drop it onto the MashupToAddGadgets field. If this field is not already set to the Gadget Library, then set it.

gch
13-Aquamarine
13-Aquamarine
(To:thingw0rxgenie)

Hi, 

 

unfortunately it still doesn't work, I will use the session parameters. Thanks!

Announcements


Top Tags