Filter the Data in a Grid Using a Line Chart. Grid not appearing when data point selected.

A Score Level 1

 Hi, 

I am trying to create a line graph  where once a data point is selected a grid appears with more information. However, with the code below, when I select a data point the grid isn't appearing. Can anyone explain why?

load(
    local!chartPagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: - 1,
      sort: a!sortInfo(
        field: "SubmittedDate",
        ascending: true
      )
    ),
    local!datasubset:rule!NSA_Inflight_Analytics_Get_Status_SubmittedDate(),
    local!Categories: index(
      local!datasubset.data,
      "SubmittedDate",
      {}
    ),
    local!uniqueCategories: union(
      local!Categories,cast(typeof(local!Categories),{})
    ),
    local!labels: index(
      local!datasubset.data,
      "Status",
      {}
    ),
    local!uniqueLabels: union(
      local!labels,
      cast(
        typeof(
          local!labels
        ),
        {}
      )
    ),
    local!series: a!forEach(
      local!uniquelabels,
      with(
       local!label: fv!item,
        a!chartSeries(
          label: local!label,
          data: a!forEach(
            local!uniqueCategories,
            with(local!intersection: intersection(
                where(local!uniqueCategories = cast(typeof(local!Categories), fv!item),0),
                where(local!uniquelabels = cast(typeof(local!labels),local!label), 0)
              ),
              if(condition: length( local!intersection) = 0,
                valueIfTrue: 0,
                valueIfFalse: index(index(local!datasubset.data,"Id",{}),local!intersection,0)
              )
            )
          ),
          links: a!dynamicLink( saveInto:a!save(ri!SubmittedDate, index(fv!item, "SubmittedDate", null))
          )
        )
      )
    ),
    a!lineChartField(
      label: "Number of Assets per Month",
      categories: {
        {
          local!uniqueCategories
        }
      },
      series: local!series,
      xAxisTitle: "Month",
      yAxisTitle: "Number of Assets",
      showDataLabels: true
    )),
  with(
    local!gridPagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: 20,
      sort: a!sortInfo(
        field: "Status",
        ascending: true
      )
    ),
    local!gridDatasubset: 
      a!queryEntity(
        entity: cons!NSARequest_Entity_Cons,
        query: a!query(
          selection: a!querySelection(
            columns: {
              a!queryColumn(
                field: "ProjectName"
              ),
              a!queryColumn(
                field: "SubmittedDate"
              ),
              a!queryColumn(
                field: "Status"
              )
            }
          ),
          filter: a!queryFilter(field: "SubmittedDate", operator: "=", value: ri!SubmittedDate),
          pagingInfo: local!gridPagingInfo

        )
      ),
    a!gridField(
      label: "List of Assets Submitted in " & ri!SubmittedDate,
      totalCount: local!gridDatasubset.totalCount,
      columns: {
        a!gridTextColumn(
          label: "Project Name",
          field: "projectName",
          data: index(
            local!gridDatasubset.data,
            "ProjectName",
            {}
          )
        ),
        a!gridTextColumn(
          label: "Submitted Date",
          field: "SubmittedDate",
          data: index(
            local!gridDatasubset.data,
            "SubmittedDate",
            {}
          )
        ),
        a!gridTextColumn(
          label: "Status",
          field: "Status",
          data: index(
            local!gridDatasubset.data,
            "Status",
            {}
          )
        )
      },
      value: local!gridPagingInfo,
      saveInto: local!gridPagingInfo,
      showWhen: not(
        isnull(
          ri!SubmittedDate
        )
      )
    )
  )

 

Thanks

  Discussion posts and replies are publicly visible