Convert datasubset data to CDT

Is there an easy way to convert the datasubset data into a cdt?

The datasubset is like:

[startIndex=1, batchSize=100, sort=, totalCount=4, data=[cells=[value=CAtest: Main Contract Review, drilldown=268455346]; [value=CAtest: Main Contract Review, drilldown=268455355]; [value=CAtest: Main Contract Review, drilldown=268455332]; [value=CAtest: Main Contract Review, drilldown=268455340]]; [cells=[value=[Group:2397], drilldown=]; [value=[Group:2390], drilldown=]; [value=[Group:2399], drilldown=]; [value=[Group:2398], drilldown=]]; [cells=[value=5/25/2015 4:40 AM EDT, drilldown=]; [value=5/25/2015 4:40 AM EDT, drilldown=]; [value=5/25/2015 4:40 AM EDT, drilldown=]; [value=5/25/2015 4:40 AM EDT, drilldown=]]; [cells=[value=, drilldown=]; [value=, drilldown=]; [value=, drilldown=]; [value=, drilldown=]]; [cells=[value=, drilldown=]; [value=, drilldown=]; [value=, drilldown=]; [value=, drilldown=]]; [cells=[value=0, drilldown=]; [value=0, drilldown=]; [...

OriginalPostID-150214

OriginalPostID-150214

  Discussion posts and replies are publicly visible

  • ...value=0, drilldown=]; [value=0, drilldown=]]; [cells=[value=, drilldown=]; [value=, drilldown=]; [value=, drilldown=]; [value=, drilldown=]], identifiers=268455346; 268455355; 268455332; 268455340, report=[name=Main Contract Review, description=Tasks for User.], columns=[label=Task Name, field=0, alignment=LEFT]; [label=Task Assignee(s)/Owner, field=11, alignment=LEFT]; [label=Task Assigned Time, field=25, alignment=LEFT]; [label=Task Finished Time, field=5, alignment=LEFT]; [label=Duration, field=24, alignment=LEFT]; [label=Status, field=2, alignment=LEFT]; [label=Review Decision, field=26, alignment=LEFT]]
  • datasubsets are commonly used for configuring paging grids, data of subset is an array type. it is independent of the CDT's so AFAIK there is no direct approach to directly set a cdt from datasubset. general approach will be to create a rule with type constructor and map independently these values to each field of CDT. But 1 disadvantege with type constructor is that we cannot update this rule directly by impact analysis. Whenever CDT changes we need to update the rule manually.
  • It looks like you're getting this from a task report? The .data field will hold your fields for the CDT. I would apply over a type constructor of the CDT and use merge() to set your looping variables. This rule will need to be updated if you change the report or the CDT structure.
  • Added to the ongoing conversation I would like to say that the impact analysis not updating the rules that make use of type constructors may not be completely correct. For instance, we use rules that make use of type constructors (we are on 7.8), and as long as the rules are in application, impact analysis updates these rules. Might be we can say think of this behavior as version dependent.

    Probably label value pairs (used in many SAIL recipes) can also be considered as an alternative to combination of CDT and type constructors if there isn't a possibility of using the same data structure in process.
  • IA will update the rule so that it's using the most recent version of the cdt, but you'll have to update the rule definition, specifically the type! portion. For example, if we add col1 to a cdt, the cdt version in the rule will be updated after running IA but we would have to add col1 to the type! portion of the rule.
  • Hi Shaoyong, is this issue resolved?
  • I use conorc's method mentioned previously

  • I am having the same requirement. Below is my task report details:

    getWorkflowCustomerList: [startIndex=1, batchSize=25, sort=[field=c0, ascending=true], totalCount=2, data=[c0:4201297521487792,dp0:]; [c0:8061297521487288,dp0:], identifiers=57347; 56887, name=Get Workflow Customers, description=, columnConfigs=[label:CustomerReference,field:c0,drilldownField:dp0,configuredFormatting:NORMAL_TEXT,configuredDrilldown:], errorMessage=]

    When i used type constructor, i got results like below:

    [c0:4201297521487792,dp0:],
    [c0:8061297521487288,dp0:]

    But i need the results like,

    4201297521487792,
    8061297521487288

    Any idea how this can be achieved?

    My expression rule was,
    apply(rule!populateCustomerCDT,rule!getWorkflowCustomerList().data)
  • Inside the expression rule for creating the CDT you'll want to pull out the c0 field from the data object you passed in.

    Index(ri!data, "c0", null)