Skip to main content
1-Visitor
June 12, 2014
Question

Problem with Union in 5.0

  • June 12, 2014
  • 2 replies
  • 1465 views

The InfoTableFunctions.Union service is not working for us in 5.0. Below is some sample code.

var params1 = {
infoTableName : "InfoTable",
dataShapeName : "LWShareType"
};

// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(LWShareType)
var result1 = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params1);

result1.AddRow({"Name":"name1","Value":"value1"});
result1.AddRow({"Name":"name2","Value":"value2"});
result1.AddRow({"Name":"name3","Value":"value3"});

var params2 = {
infoTableName : "InfoTable",
dataShapeName : "LWShareType"
};

// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(LWShareType)
var result2 = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params2);

result2.AddRow({"Name":"name4","Value":"value4"});
result2.AddRow({"Name":"name5","Value":"value5"});
result2.AddRow({"Name":"name6","Value":"value6"});


var params = {

t2: result2 /* INFOTABLE /,<br> t1: result1/ INFOTABLE */
};

// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Union(params);

2 replies

gregko1-VisitorAuthor
1-Visitor
June 12, 2014

It appears as though the merged results are returned in t1 instead of the output result of the service call.

5-Regular Member
June 12, 2014

Hi Greg,

Thank you very much for bringing this to our attention. It seems this is a bug in the Union snippet. I have reported this to our development team and will notify you as soon as it is resolved.


Thank you,

Saeed