173229 - no subject - We have a Portal Report that work on ver

We have a Portal Report that work on version 7.3 to read some data from a CDT process variable. The Department columns in this report is configured to get its value from the following expression.

=if(isnull(pv!cdtHighLevelEstimate1.tDeptAssigned),pv!cdtHighLevelEstimateLevel2.tDeptAssigned,pv!cdtHighLevelEstimate1.tDeptAssigned)

All the other columns are defined using the same CDTs in the same fashion. The Portal Report takes care of formatting and looping; which is nice.

Now, we want to replace this Portal Report with a Dynamic Channel that displayed the table as displayed below. How can we achieve that and loop on the CDTs while doing the same if-condition as we did in Portal Report?

Thanks.


OriginalPostID-173229



  Discussion posts and replies are publicly visible

Parents
  • I believe you will be able to use apply() and merge(), you will just need a few helper rules. For example, to test this out with columns 1, 2 and 3, create these helper rules:

    rule!getPipelineData1(ri!data1,ri!data2):

    =if(isnull(ri!data1),ri!data2,ri!data1)

    rule!getPipelineData2(ri!data1,ri!data2,ri!data3):

    =if(isnull(ri!data1),ri!data2,ri!data3)

    Then the table would be defined as:

    =ncolumntable(
              {"text1","text2","text3"},
              apply(rule!getPipelineData1,merge(pv!cdtHighLevelEstimate1.tDeptAssigned,pv!cdtHighLevelEstimateLevel2.tDeptAssigned)),
              apply(rule!getPipelineData2,merge(pv!cdtHighLevelEstimate1.iTaskId,pv!cdtHighLevelEstimateLevel2.tStatus,pv!cdtHighLevelEstimate1.tStatus)),
              apply(fn!text,apply(fn!todate(apply(rule!getPipelineData2,merge(pv!cdtHighLevelEstimate1.iTaskId,pv!cdtHighLevelEstimateLevel2.dTaskDueDate,pv!cdtHighLevelEstimate1.dTaskDueDate))),"mmm dd, yyyy")
    )

    Try that out, let me know if it works from you - we can expand from there.
Reply
  • I believe you will be able to use apply() and merge(), you will just need a few helper rules. For example, to test this out with columns 1, 2 and 3, create these helper rules:

    rule!getPipelineData1(ri!data1,ri!data2):

    =if(isnull(ri!data1),ri!data2,ri!data1)

    rule!getPipelineData2(ri!data1,ri!data2,ri!data3):

    =if(isnull(ri!data1),ri!data2,ri!data3)

    Then the table would be defined as:

    =ncolumntable(
              {"text1","text2","text3"},
              apply(rule!getPipelineData1,merge(pv!cdtHighLevelEstimate1.tDeptAssigned,pv!cdtHighLevelEstimateLevel2.tDeptAssigned)),
              apply(rule!getPipelineData2,merge(pv!cdtHighLevelEstimate1.iTaskId,pv!cdtHighLevelEstimateLevel2.tStatus,pv!cdtHighLevelEstimate1.tStatus)),
              apply(fn!text,apply(fn!todate(apply(rule!getPipelineData2,merge(pv!cdtHighLevelEstimate1.iTaskId,pv!cdtHighLevelEstimateLevel2.dTaskDueDate,pv!cdtHighLevelEstimate1.dTaskDueDate))),"mmm dd, yyyy")
    )

    Try that out, let me know if it works from you - we can expand from there.
Children
No Data