Is it possible to use multiple datasubsets inside a SAIL grid. I have a gridFiel

Is it possible to use multiple datasubsets inside a SAIL grid. I have a gridField that is currently using two datasubsets to display data but only values from one datasubset is getting populated right now. Following is my code of two datasubsets which are called milestone_datasubset and psa_datasubset:
load(

local!start,
local!end,
local!gridSelection: a!gridSelection
(
pagingInfo:a!pagingInfo
(
startIndex:1,
batchSize:10
                    )
          ),
local!list: if(rule!COMMON_IsNullOrEmpty(ri!start), null, if(rule!COMMON_IsNullOrEmpty(ri!end), null, rule!PSA_PSAAssignmentsPSACountBtwTimeFrame(cons!PSA_MILESTONE_TYPES[1],ri!start,ri!end))),


local!psa: if(rule!COMMON_IsNullOrEmpty(local!list.PSA_ID), {}, apply(rule!DCMIFS_getPSAByPSAId,local!list.PSA_ID)),



with(
{

local!milestone_datasubset:todatasubset(local!list, local!gridSelection.pagingInfo),
local!psa_datasubset:todatasubset(local!psa, local!gridSelection.pagingInfo),
}
)
)



And my gridField lo...

OriginalPostID-106601

OriginalPostID-106601

  Discussion posts and replies are publicly visible

Parents
  • Two datasubsets will not work if paging is enabled. Since they don't have the same fields it would break. If you managed to make two pagingInfos, the rows would not sort together.

    A quick way to do this would be to make a rule to construct an ad-hoc datatype (or make another CDT the normal way),
    rule!gridFiller(
    {
    psaNumber:ri!psaNumber,
    milestoneDate:ri!milestoneDate,
    etc
    }
    )

    Then in your Report populate this "ad hoc" data structure like below. Put the result in a datasubset.
    apply(rule!gridFiller(_,_),merge(psa.psaNumber,list.milestoneDate)
Reply
  • Two datasubsets will not work if paging is enabled. Since they don't have the same fields it would break. If you managed to make two pagingInfos, the rows would not sort together.

    A quick way to do this would be to make a rule to construct an ad-hoc datatype (or make another CDT the normal way),
    rule!gridFiller(
    {
    psaNumber:ri!psaNumber,
    milestoneDate:ri!milestoneDate,
    etc
    }
    )

    Then in your Report populate this "ad hoc" data structure like below. Put the result in a datasubset.
    apply(rule!gridFiller(_,_),merge(psa.psaNumber,list.milestoneDate)
Children
No Data