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

Result of infotable base type is not displaying in UI after binding in the Mashup

SOLVED
Highlighted
Amethyst

Result of infotable base type is not displaying in UI after binding in the Mashup

Hi,

 

I'm trying to write a services which takes the thing name as input, and provides property values as infotable. The service is working fine but by binding the services to a mashup nothing is displaying. 
Anyone please tell me how to fix this. 

 

Thanks in advance...

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Result of infotable base type is not displaying in UI after binding in the Mashup

You must create and set a DataShape with the desired fields in order to be shown on the Mashup builder.

5 REPLIES 5

Re: Result of infotable base type is not displaying in UI after binding in the Mashup

You must create and set a DataShape with the desired fields in order to be shown on the Mashup builder.

Re: Result of infotable base type is not displaying in UI after binding in the Mashup

@CarlesColl ,

 

I have created the DataShape and attached to the output parameter. 
FYI , in this service I have used a switch case which will check for  different cases and provides me an infotable data. The DataShape bound to the result parameter has few other fields which might be need for other cases.

 

Is it because of having other fields in the same DataShape giving me this issue?

Please correct me if I'm wrong.

Re: Result of infotable base type is not displaying in UI after binding in the Mashup

I don't understand your question, I'm sorry.

Re: Result of infotable base type is not displaying in UI after binding in the Mashup

var params = {
infoTableName : "InfoTable",
dataShapeName : "Models.FunctionDataShape"
};

// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(Models.FunctionDataShape")


var FinalData = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
var nwele =NetworkElement;
if(nwele==null||nwele=="") throw " Please Select Network Element";

switch(nwele)
{
case 'first':
var newEntry = new Object();
newEntry.OrganizationLevel = Things[ThingName].OrganizationLevel; // STRING
newEntry.MobileNO = Things[ThingName].MobileNO; // NUMBER
newEntry.SIM_NO = Things[ThingName].SIM_NO;

FinalData.AddRow(newEntry);

break;

case 'two':
var newEntry = new Object();
newEntry.OrganizationLevel = Things[ThingName].OrganizationLevel; // STRING
newEntry.MobileNO = Things[ThingName].Bill; // NUMBER
newEntry.SIM_NO = Things[ThingName].Model;

FinalData.AddRow(newEntry);

break;

}

 

var result = FinalData;

 

Model.FunctionDataShape has fields of case1 and of case2 also.. 

I have created a datashape with all fields of case1, case2,case3, case4,..

I'm not understanding where is the mistake.

 

Is it because of the data shape, data is not displaying the mashup?

 

Re: Result of infotable base type is not displaying in UI after binding in the Mashup

But fields of case1 and case2 are the same:

  • OrganizationLevel
  • MobileNO
  • SIM_NO

 

If you have this three fields output of the service should be working. You may have the problem on the binding itself to the widget (maybe you didn't defined all the required properties on the widget).