how to handle process report when there are no active processes

Hi,
We have a process report which is supposed to show us any open tasks for a process model. It works fine when there are tasks for that process model.

However, I noticed it shows the following error when there are no active processes.

Error Evaluating UI Expression
Expression evaluation error in rule 'rct_report_gaalltaskreport' at function 'toUniformstring' parameter 1 [line 16]: Invalid index: Cannot index property 'c15' of type Text into type List of Variant

What would be the best way to handle this so that users don't see the pink error message?

Thanks,
Gary

OriginalPostID-243721

  Discussion posts and replies are publicly visible

Parents
  • In the 'data' part of the gridTextColumn or gridImageColumn

    When you are trying to surface the data whatever is present, you may do as follows:

    fn!index(local!filteredTaskReport.data,"c5",{})

    fn!property(local!filteredTaskReport.data,"c5",{})

    fn!if(local!filteredTaskReport.totalCount = 0,{},local!filteredTaskReport.data.c5)


    When you are applying the formatting over the resultant data, it might be worth doing in one of the following ways: (So that we don't end up in applying a rule when there aren't any records)

    fn!if(local!filteredTaskReport.totalCount = 0,{},fn!apply(rule!RCT_getAcceptedStatusIcon, index(local!filteredTaskReport.data,"c5",{}))

    fn!if(local!filteredTaskReport.totalCount = 0,{},fn!apply(rule!RCT_getAcceptedStatusIcon, local!filteredTaskReport.data.c5)
Reply
  • In the 'data' part of the gridTextColumn or gridImageColumn

    When you are trying to surface the data whatever is present, you may do as follows:

    fn!index(local!filteredTaskReport.data,"c5",{})

    fn!property(local!filteredTaskReport.data,"c5",{})

    fn!if(local!filteredTaskReport.totalCount = 0,{},local!filteredTaskReport.data.c5)


    When you are applying the formatting over the resultant data, it might be worth doing in one of the following ways: (So that we don't end up in applying a rule when there aren't any records)

    fn!if(local!filteredTaskReport.totalCount = 0,{},fn!apply(rule!RCT_getAcceptedStatusIcon, index(local!filteredTaskReport.data,"c5",{}))

    fn!if(local!filteredTaskReport.totalCount = 0,{},fn!apply(rule!RCT_getAcceptedStatusIcon, local!filteredTaskReport.data.c5)
Children
No Data