"instructions" parameters is not applicable when using a textfield/datefield in an editable grid cell.

Certified Associate Developer

Hi,

Working in an editable grid, when adding an "instructions" parameter, it is not working and not giving any error as well. I mean, we can add "instructions" parameter value but it is not visible just below of that textfield or datefield. Is it like editable grid do not support 'instructions'? please help.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Instructions on an editable grid cell also don't really make sense.  What is it that you hope to accomplish?  I've personally made a lot of use of Placeholder Text (in applicable fields) when dealing with editable grid inputs, and it's a lot more friendly-looking.  Also note that you can add per-column Help Tooltips in any type of grid.

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    from that editable grid, I have a date field and when user select date, I want to show that date format as dd MMM yyyy into that instruction text so that user should understand that what date he has selected or when someone open that editable grid, anyone can understand date because of format.

    Hence, I want to use 'instructions' parameter. if anyone has any round about to achieve this then please help/suggest. Thanks in advance.

  • 0
    Certified Senior Developer
    in reply to kiranjorwekar

    Sorry, but it is not possible to provide the similar experience of "instructions" parameter. As far as I can tell, you can either show the formatted date in another column next to it (which is ofc not good looking) or can try this code that I have written for you which displays the formatted date in rich text after user selects in the dateField and shows an edit icon to select the date again.

    a!localVariables(
      local!date,
      local!showDate: a!isNullOrEmpty(local!date),
      {
        a!gridLayout(
          label: "Editable Grid",
          labelPosition: "ABOVE",
          headerCells: { a!gridLayoutHeaderCell(label: "Date") },
          columnConfigs: {},
          rows: {
            a!gridRowLayout(
              contents: {
                if(
                  local!showDate,
                  a!dateField(
                    value: local!date,
                    saveInto: {
                      local!date,
                      a!save(local!showDate, false)
                    }
                  ),
                  a!richTextDisplayField(
                    value: {
                      text(local!date, "dd MMM yyyy"),
                      "  ",
                      a!richTextIcon(
                        icon: "pencil",
                        caption: "Edit",
                        link: a!dynamicLink(saveInto: a!save(local!showDate, true)),
                        linkStyle: "STANDALONE"
                      )
                    }
                  )
                )
              }
            )
          },
          selectionSaveInto: {},
          validations: {},
          shadeAlternateRows: true
        )
      }
    )

    Hope it helps!

Reply
  • 0
    Certified Senior Developer
    in reply to kiranjorwekar

    Sorry, but it is not possible to provide the similar experience of "instructions" parameter. As far as I can tell, you can either show the formatted date in another column next to it (which is ofc not good looking) or can try this code that I have written for you which displays the formatted date in rich text after user selects in the dateField and shows an edit icon to select the date again.

    a!localVariables(
      local!date,
      local!showDate: a!isNullOrEmpty(local!date),
      {
        a!gridLayout(
          label: "Editable Grid",
          labelPosition: "ABOVE",
          headerCells: { a!gridLayoutHeaderCell(label: "Date") },
          columnConfigs: {},
          rows: {
            a!gridRowLayout(
              contents: {
                if(
                  local!showDate,
                  a!dateField(
                    value: local!date,
                    saveInto: {
                      local!date,
                      a!save(local!showDate, false)
                    }
                  ),
                  a!richTextDisplayField(
                    value: {
                      text(local!date, "dd MMM yyyy"),
                      "  ",
                      a!richTextIcon(
                        icon: "pencil",
                        caption: "Edit",
                        link: a!dynamicLink(saveInto: a!save(local!showDate, true)),
                        linkStyle: "STANDALONE"
                      )
                    }
                  )
                )
              }
            )
          },
          selectionSaveInto: {},
          validations: {},
          shadeAlternateRows: true
        )
      }
    )

    Hope it helps!

Children
No Data