Custom Datasets

I am trying to create a custom "local!" dataset within a "with" scope.

In my case I have for example a local!datsubSet like this :

local!datasubSet: a!queryEntity(
entity: cons!entity,
query: a!query(
selection: a!querySelection(columns: {
a!queryColumn(field: "A"),
a!queryColumn(field: "B"),
a!queryColumn(field: "C"),
}),
logicalExpression: local!logicalExpression,
pagingInfo: local!pagingInfo
)
)

Now this dataset is shown in a grid. I would like to add additional data displayed in the grid without changing the entity structure being queried. Let's say I want to add a column "D" and I already have an array for it that is local!Dvalues in the with scope.

How can I create a 4th column in the local!datasubset with the name "D" that will have as values local!Dvalues.

Is this possible? I tried with merge() and a!datasub...

OriginalPostID-241479

  Discussion posts and replies are publicly visible

Parents
  • As brettf mentionned in his #2 he's spot on my actual true problem. I finally made it work by creating a datasubset A with the query, then a local!Dvalues : (get values whatsoever) and finally doing a datasubset B with the data property as such :

    data :
    {
    A : local!datasubSet.data.A,
    B : local!datasubSet.data.B,
    C : local!datasubSet.data.C,
    D : local!DValues
    }

    And use the datasubset B for the grid not A. Quite messy to get my sort to work but a WHOLE lot less messy than to modify the data structure behind to add a D in the view and such!

    Thanks for the tips.
Reply
  • As brettf mentionned in his #2 he's spot on my actual true problem. I finally made it work by creating a datasubset A with the query, then a local!Dvalues : (get values whatsoever) and finally doing a datasubset B with the data property as such :

    data :
    {
    A : local!datasubSet.data.A,
    B : local!datasubSet.data.B,
    C : local!datasubSet.data.C,
    D : local!DValues
    }

    And use the datasubset B for the grid not A. Quite messy to get my sort to work but a WHOLE lot less messy than to modify the data structure behind to add a D in the view and such!

    Thanks for the tips.
Children
No Data