2 Replies Latest reply on Jun 12, 2014 11:12 AM by saeedma RSS
    gregko Explorer

    Problem with Union in 5.0

    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);