User Interface

Hi Everyone, I need to Implement one grid Structure that would be like 

the grid would be dynamic grid, the request Ids may depend on cif number, For Example (CIf-117907 have 5 requests (123456,12456,13456,134566,1244555) like that.

How Would I do that if someone can provide solution that would be more helpful, If more details required please let me know  

Thanks.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I usually implement such things with multiple entries listed in one column cell - one example is what Shubham provided already, though often I simply display each entry on its own line (and if there can potentially be many many entries, i'll only show the first few unless the user clicks an internal dynamic link to expand the selection).

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    As suggested by Mike, you can display a list:

    a!localVariables(
      local!data: {
        a!map(cif: 1, requestId: { 1000, 1001, 1002 }),
        a!map(cif: 2, requestId: { 2000 })
      },
      a!gridField(
        label: "Read-only Grid",
        labelPosition: "ABOVE",
        data: local!data,
        columns: {
          a!gridColumn(label: "CIF", value: fv!row.cif),
          a!gridColumn(
            label: "CIF",
            value: a!richTextDisplayField(
              value: a!richTextBulletedList(items: fv!row.requestId)
            )
          )
        }
      )
    )

  • a!localVariables(
      local!selectedButton,
      local!moduleStatus: a!map(
        request: rule!CR_QE_getApprovedCAsByFilters(
          requestId_int: ri!requestId_int,
          cif_int: ri!cif_int,
          status_txt: "APPROVED"
        )
      ),
      {
        a!buttonArrayLayout(
          buttons: a!forEach(
            items: local!moduleStatus.request,
            expression: a!buttonWidget(
              label: joinarray(
                {
                  fv!item.requestId_int & fv!item.actionType_txt & fv!item.approvedOn_dt
                },
                " - "
              ),
              value: joinarray(
                {
                  fv!item.requestId_int & fv!item.actionType_txt & fv!item.approvedOn_dt
                },
                " - "
              ),
              saveInto: local!selectedButton
            )
          ),
          marginAbove: "MORE"
        ),
        a!gridLayout(
          headerCells: {
            a!gridLayoutHeaderCell(label: "DropDown")
          },
          columnConfigs: a!gridLayoutColumnConfig(width: "NARROW"),
          rows: a!gridRowLayout(
            contents: a!dropdownField(
              label: "",
              placeholder: "Please Select Values",
              choiceLabels: cons!CR_APP_REQUEST_SECTION_NAMES,
              choiceValues: cons!CR_APP_REQUEST_SECTION_NAMES,
              value: "",
              saveInto: ""
            )
          )
        )
      }
    )
     

    Hi Thanks for your help and On top of that code trying to achieve dropdown on selecting each request,let me know your input on this please.

Reply
  • a!localVariables(
      local!selectedButton,
      local!moduleStatus: a!map(
        request: rule!CR_QE_getApprovedCAsByFilters(
          requestId_int: ri!requestId_int,
          cif_int: ri!cif_int,
          status_txt: "APPROVED"
        )
      ),
      {
        a!buttonArrayLayout(
          buttons: a!forEach(
            items: local!moduleStatus.request,
            expression: a!buttonWidget(
              label: joinarray(
                {
                  fv!item.requestId_int & fv!item.actionType_txt & fv!item.approvedOn_dt
                },
                " - "
              ),
              value: joinarray(
                {
                  fv!item.requestId_int & fv!item.actionType_txt & fv!item.approvedOn_dt
                },
                " - "
              ),
              saveInto: local!selectedButton
            )
          ),
          marginAbove: "MORE"
        ),
        a!gridLayout(
          headerCells: {
            a!gridLayoutHeaderCell(label: "DropDown")
          },
          columnConfigs: a!gridLayoutColumnConfig(width: "NARROW"),
          rows: a!gridRowLayout(
            contents: a!dropdownField(
              label: "",
              placeholder: "Please Select Values",
              choiceLabels: cons!CR_APP_REQUEST_SECTION_NAMES,
              choiceValues: cons!CR_APP_REQUEST_SECTION_NAMES,
              value: "",
              saveInto: ""
            )
          )
        )
      }
    )
     

    Hi Thanks for your help and On top of that code trying to achieve dropdown on selecting each request,let me know your input on this please.

Children
No Data