Skip to main content
kiranj0004
June 14, 2023
Question

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

  • June 14, 2023
  • 8 replies
  • 0 views

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.

    8 replies

    June 14, 2023

    Yes, this is the expected behaviour and it is also documented in Appian Docs

    mathieud0001
    Brainy
    June 14, 2023

    Yes, this is normal - same goes for the label.

    If you need labels/instructions and detailed error messages for a field, I would suggest you use a master detail type pattern.

    docs.appian.com/.../recipe-use-links-in-a-grid-to-show-more-details-and-edit-data.html

    stefanhelzle0001
    Brainy
    June 14, 2023

    You can add help tooltips on the column level.

    mikes0011
    Brainy
    June 14, 2023

    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.

    The Expression Guru
    kiranj0004
    June 15, 2023

    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.

    June 15, 2023

    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!