Skip to main content
14-Alexandrite
May 25, 2021
Solved

Infotable as parameter in collection widget

  • May 25, 2021
  • 1 reply
  • 3068 views

I'm using a collection widget and have a thing with a InfoTable property which holds different fields to be used in a mashup. Some of these fields have as datatype InfoTable, but when I connect with the collection widget and with getproperty the InfoTable fields doesn't seem to work.
All other numeric and string fields work normally, updating dinamically.

Only the InfoTable ones seem to have a problem. Is there a way to use InfoTable as parameter into a collection widget?

I followed this guide to make it work: https://developer.thingworx.com/resources/guides/collection-widget-how-to

screenshots of both my thing with infotable property and mashup with the collection:

As you can see the grid does not show the inftable values.

CaShimiz_1-1621973932517.pngCaShimiz_2-1621973939755.png

 

 

Best answer by PEHOWE

@CaShimiz , 

Did a little extra investigation. In my test case I used the Legacy Grid Widget (which is still available), the Grid Advanced Widget seems to have an issue, The Article - CS337412 Advanced Grid displayed as target Mashup of Navigation function is empty when populated by Mashup parameter in ThingWorx the issue has been addressed in ThingWorx 9.0.6 and ThingWorx 9.1.1.

I changed my test case to have both grids and see the same type of items in composer as you are reporting.

PEHOWE_0-1622051226736.png

Can you switch to the Grid Widget? 

Peter

1 reply

17-Peridot
May 26, 2021

@CaShimiz ,

What parameters do you have defined to you child mashup?

  • TAG   (string)
  • descrip  (string)
  • Sts_on   (boolean)
  • Sts_stop  (boolean)
  • initTable   (infotable)
  • initTable2 (infotable)

What information is being passed to the collection widget?

  • Info table which has a data shape which describes the parameters above

What does you "MashupPropertyBinding" look like?

{
 "TAG" : "TAG",
 "descrip" : "descript",
 "Sts_on" : "Sts_on",
 "Sts_stop" : "Sts_stop",
 "initTable" : "initTable",
 "initTable2" : "initTable2"
}

Let me know what you have and I will compare it with my test case

Peter

CaShimiz14-AlexandriteAuthor
14-Alexandrite
May 26, 2021

@PEHOWE,

Parameters in my child mashup (All except inftable2 are binded to widgets) : 

CaShimiz_0-1621996258180.png

 

- information being passed to the collection widget is a infotable with datashape describing the parameters above, this property from this thing:

CaShimiz_1-1621996406809.png

 

- And my bindings in the collection are these:

CaShimiz_2-1621996489522.png

 

17-Peridot
May 26, 2021

@CaShimiz 

I have revised my test case to be closer to your question. I am using ThingWorx 9.1.0 for my testing. 

I created a child mashup and parameter bindings:

PEHOWE_0-1622037691396.png

With the Collection property "MashupPropertyBinding"

PEHOWE_1-1622039711221.png

In my test case I used the Thing service "GetProperties" to return an Infotable. The Data Shape for the InfoTable is: 

PEHOWE_2-1622039844910.png

I used a different data shape for "inftable". When I bound the infotable to the grid it displayed the columns. Are you seeing the columns in the composer after binding the data source?

Peter