RE: Selectable grid

a!localVariables(
  {
    a!gridField(
      labelPosition: "ABOVE",
      data: todatasubset(ri!cmuFinCov_ds.data, fv!pagingInfo),
      columns: {
        a!gridColumn(
          label: "CIF",
          value: if(
            ri!isSelectionEnabled_bool,
            a!richTextDisplayField(
              value: a!richTextItem(
                text: index(fv!row, "cif_int", {}),
                link: a!dynamicLink(
                  value: index(fv!row, "cif_int", {}),
                  saveInto: {
                    ri!selectedCif_int,
                    a!save(ri!buttonAction_txt, null),
                    a!save(
                      ri!selectedRequestId_int,
                      fv!row.requestId_int
                    ),
                    a!save(
                      ri!selectedcmuFinCov_cdt,
                      index(
                        ri!cmuFinCov_ds.data,
                        wherecontains(
                          fv!row.cif_int,
                          tointeger(ri!cmuFinCov_ds.data.cif_int)
                        ),
                        null
                      )
                    )
                  }
                ),
                linkStyle: "STANDALONE"
              )
            ),
            index(fv!row, "cif_int", {})
          ),
          align: "START"
        ),
        a!gridColumn(
          label: "CIF name",
          value: index(fv!row, "customerName_txt", {})
        ),
        a!gridColumn(
          label: "Covenant Name",
          value: index(fv!row, "finCovDisplayName_txt", {})
        ),
        a!gridColumn(
          label: "Covenant Wordings",
          value: if(
            rule!APN_isBlank(
              index(fv!row, "covenantWording_txt", {}),
              
            ),
            {},
            a!richTextDisplayField(
              value: a!richTextBulletedList(
                items: trim(
                  split(
                    index(fv!row, "covenantWording_txt", {}),
                    "$###$"
                  )
                )
              )
            )
          )
        ),
        a!gridColumn(
          label: cons!CR_APP_TXT_FINANCIAL_COVENANTS_GRID_FIELDS[4],
          value: index(fv!row, "proposedThreshold_txt", {})
        ),
        a!gridColumn(
          label: cons!CR_APP_TXT_FINANCIAL_COVENANTS_GRID_FIELDS[3],
          value: index(fv!row, "existingThreshold_txt", {})
        ),
        a!gridColumn(
          label: cons!CR_APP_TXT_FINANCIAL_COVENANTS_GRID_FIELDS[5],
          value: index(fv!row, "actualThreshold_txt", {})
        ),
        a!gridColumn(
          label: cons!CR_APP_TXT_FINANCIAL_COVENANTS_GRID_FIELDS[6],
          value: index(fv!row, "covenentThreshold_txt", {})
        ),
        a!gridColumn(
          label: cons!CR_APP_TXT_FINANCIAL_COVENANTS_GRID_FIELDS[7],
          value: index(fv!row, "varience_txt", {})
        ),
        a!gridColumn(
          label: cons!CR_APP_TXT_FINANCIAL_COVENANTS_GRID_FIELDS[8],
          value: index(fv!row, "financialDate_dt", {})
        ),
        a!gridColumn(
          label: cons!CR_APP_TXT_FINANCIAL_COVENANTS_GRID_FIELDS[16],
          value: cons!CR_APP_TXT_CHOICE_LABELS_COMPLAINT_BREACH[2]
        )
      },
      pagingSaveInto: {
        ri!pagingInfo,
        a!save(ri!selectedCif_int, null)
      }
    )
  }
)

Hi All, I have this above grid ,need to show as selectable grid where covenant wordings to be shown on selection of each row covenant name, cif ,cif name, proposed, existing, actual, covenant threshold, variance, fin_date, complaint as a side by side .how to do this? 

Thanks in advance. 

  Discussion posts and replies are publicly visible

Parents
  • To make the grid selectable you'll need to add the "selectable" parameter then set it to TRUE, then fill out the "selection save into" parameter.  I see maybe you're already trying to do this in your "CIF" column manually - that should also work.  I'd point out that for "ri!selectedcmuFinCov_cdt", you don't really need to index into the original data set, you can just save the value of "fv!row" straight into it.  If you are attempting to do a one-at-a-time-only selection, what you have here seems like it should be working basically.  Mirroring Stefan, what exactly is your issue?

    Also: for "fv!row" you do **not** need to use "index()", "property()", etc, it was designed to intentially not cause errors if you either index into a nonexistent property or the data set returns blank.

Reply
  • To make the grid selectable you'll need to add the "selectable" parameter then set it to TRUE, then fill out the "selection save into" parameter.  I see maybe you're already trying to do this in your "CIF" column manually - that should also work.  I'd point out that for "ri!selectedcmuFinCov_cdt", you don't really need to index into the original data set, you can just save the value of "fv!row" straight into it.  If you are attempting to do a one-at-a-time-only selection, what you have here seems like it should be working basically.  Mirroring Stefan, what exactly is your issue?

    Also: for "fv!row" you do **not** need to use "index()", "property()", etc, it was designed to intentially not cause errors if you either index into a nonexistent property or the data set returns blank.

Children
No Data