Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
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...
Solved! Go to Solution.
You must create and set a DataShape with the desired fields in order to be shown on the Mashup builder.
You must create and set a DataShape with the desired fields in order to be shown on the Mashup builder.
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.
I don't understand your question, I'm sorry.
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?
But fields of case1 and case2 are the same:
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).