2 Replies Latest reply on Jun 1, 2017 6:10 AM by carlesc RSS
    mberber-2 Newbie

    How can i merge two infotable and output as one infotable?

    Hello everyone;


    In my test project i have a database and the database have two tables. I am fetching data using SQL Query and output as an InfoTable. I want to merge this InfoTable's side by side or top to the bottom . Tables may or may not have same columns. I have been trying to make this work around in few days. The document about "Getting To Know InfoTables" helps at some level but now i am stuck.


    This is my structure.









        getTableOne (SELECT id, name, phone FROM tableone) and TableOneDS (as DataShape)

        getTableTwo (SELECT id, name, phone FROM tabletwo) and TableTwoDS (as DataShape)

        MergeInfoTable (JavaScript) and MergeInfoTableDS(as DataShape which contein all fields the DS's above)



    So far i used CreateDatabaseFromDataShape snippets and CreateValue() but i havent figure it out how can i fetch this two infotables datas and put inside a loop and result will placed row by row.


    Any suggestion will help.


    Thank you !