merging two different data sets in a grid

I have a data store based cdt and a set of online data from another system (accessed via a!httpQuery) that I'd like to merge in a grid, is there a recipe for such an action?

Each row in the CDT may or may not have a corresponding item in the dataset taht comes back from the REST query.

OriginalPostID-242185

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    There may be a more graceful way of doing this that I'm not thinking of, but as far as I know you might need to manually aggregate field-by-field into a new CDT or dictionary in your local variable. I would suggest (mainly for sanity's sake) querying the 2 parent data types into their own local variables first, i.e. local!appianDataSet & local!httpQueryDataSet

    So you might do next:

    local!aggregatedData: {
    fieldA: append( local!appianDataSet.fieldA, local!httpQueryDataSet.AField ),
    fieldB: append( local!appianDataSet.fieldB, local!httpQueryDataSet.BField )
    ...
    },

    (then within your with()):
    local!dataSubset: todatasubset( local!aggregatedData, local!pagingInfo ) ...
Reply
  • 0
    Certified Lead Developer
    There may be a more graceful way of doing this that I'm not thinking of, but as far as I know you might need to manually aggregate field-by-field into a new CDT or dictionary in your local variable. I would suggest (mainly for sanity's sake) querying the 2 parent data types into their own local variables first, i.e. local!appianDataSet & local!httpQueryDataSet

    So you might do next:

    local!aggregatedData: {
    fieldA: append( local!appianDataSet.fieldA, local!httpQueryDataSet.AField ),
    fieldB: append( local!appianDataSet.fieldB, local!httpQueryDataSet.BField )
    ...
    },

    (then within your with()):
    local!dataSubset: todatasubset( local!aggregatedData, local!pagingInfo ) ...
Children
No Data