Skip to main content
August 3, 2022
Solved

Checkbox required in front of Record

  • August 3, 2022
  • 6 replies
  • 0 views

Hi team,

I am trying to show a checkbox in front of every record in the grid. I have used the following code given below:

 a!gridField(
   label: "Test Cases",
   labelPosition: "ABOVE",
   data: 'recordType!{e805a109-fc8e-434b-a28c-4c7b62baa8d4}BTUA_Suites_RecordType',
   columns: {
     a!gridColumn(
       label: "Test Cases",
       sortField: 'recordType!{e805a109-fc8e-434b-a28c-4c7b62baa8d4}BTUA_Suites_RecordType.fields.{b36e5404-7689-44f8-bcb3-efc90764cd0e}suitefilename',
       /*value: a!linkField(*/
         /*links: {*/
           /*a!recordLink(*/
             /*label: fv!row['recordType!{e805a109-fc8e-434b-a28c-4c7b62baa8d4}BTUA_Suites_RecordType.fields.{b36e5404-7689-44f8-bcb3-efc90764cd0e}suitefilename'],*/
             /*recordType: 'recordType!{e805a109-fc8e-434b-a28c-4c7b62baa8d4}BTUA_Suites_RecordType',*/
             /*identifier: fv!identifier*/
           /*)*/
/*           */
/*           */
/*           */
         /*}*/
       /*)*/
       
       value: a!checkboxField(
         choiceLabels: {fv!row['recordType!{e805a109-fc8e-434b-a28c-4c7b62baa8d4}BTUA_Suites_RecordType.fields.{b36e5404-7689-44f8-bcb3-efc90764cd0e}suitefilename']},
         choiceValues: {fv!row['recordType!{e805a109-fc8e-434b-a28c-4c7b62baa8d4}BTUA_Suites_RecordType.fields.{b36e5404-7689-44f8-bcb3-efc90764cd0e}suitefilename']},
       )
     )
   },
   validations: {},
   refreshAfter: "RECORD_ACTION",
   showSearchBox: true,
   showRefreshButton: false,
   recordActions: {
     a!recordActionItem(
       action: /**/ null
     )
   },
   actionsDisplay: "ICON"
 )

Please see the line no. 22 where I am trying to achieve the same but I am getting the following screen below.

How to fix the same ?

I want to achieve the functionality as depicted by below. Yellow boxes are usually checkbox that I want. Please help.

    Best answer by harshitb6843

    You can directly use the "selectable" property in the grid that will enable checkboxes for every row, allowing you to select them.

    6 replies

    harshitb6843
    August 3, 2022

    You can directly use the "selectable" property in the grid that will enable checkboxes for every row, allowing you to select them.

    August 3, 2022

    Thanks Harshit for replying. Actually I am new in Appian. I have used selectable but when I am selecting the checkbox, the page loads and again it get unselected automatically. Can u pls help ?

    stefanhelzle0001
    Brainy
    August 3, 2022
    richardm900458
    August 3, 2022

    Selectable

    selectable

    Boolean

    Determines if grid rows are selectable. When selection style is "CHECKBOX" (default), the selection column is displayed. Default: false.

    Selection Style

    selectionStyle

    Text

    Determines the style when a row is selected. Valid values: "CHECKBOX" (default), "ROW_HIGHLIGHT".

    Selection Value

    selectionValue

    Text Array or Integer Array

    Identifiers of the rows that should appear as selected. Can be set to have rows be pre-selected for the user. Supported types: Text Array and Integer Array.

    Save Selection To

    selectionSaveInto

    List of Save

    One or more variables that are updated with the selected identifiers when the user changes selections. Use a!save() to save a modified or alternative value to a variable. You can reference the rows selected and deselected in the most recent user interaction (not all selected or deselected rows) using fv!selectedRows and fv!deselectedRows respectively.


    https://docs.appian.com/suite/help/22.2/Paging_Grid_Component.html