Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

How to display check box

Hi,

How to show a checkbox like below

Thanks a lots

  Discussion posts and replies are publicly visible

Parents Reply Children
  •  

    a!localVariables(
      local!value1,
      local!value2,
      /*to save DB*/
      local!value,
    
    {
      a!columnsLayout(
        columns: {
          a!columnLayout(
            contents: {
              a!checkboxField(
                label: "Checkboxes",
                labelPosition: "COLLAPSED",
                choiceLabels: {"Option 1", "Option 2"},
                choiceValues: {1, 2},
                value: local!value1,
                saveInto: {local!value1, if(a!isNotNullOrEmpty(local!value2) ,a!save(local!value, joinarray(local!value1,local!value2)), a!save(local!value,local!value1))},
                validations: {}
              )
            }
          ),
          a!columnLayout(
            contents: {
              a!checkboxField(
                label: "",
                labelPosition: "COLLAPSED",
                choiceLabels: {"Option 3", "Option 4"},
                choiceValues: {3, 4},
                value: local!value2,
                saveInto: {local!value2, if( a!isNotNullOrEmpty(local!value1) ,a!save(local!value, joinarray(local!value1,local!value2)), local!value2)},
                validations: {}
              )
            }
          ),
          a!columnLayout(
            contents: {}
          )
        }
      )
    }
    )

    I also think that, but when dose it save value into DB after chose checkbox field?

  • 0
    Certified Lead Developer
    in reply to ojask2243

    Appian does not store any data to your database automatically. I recommend to check the Appian Academy and Tutorials to understand how Appian works.

  • 0
    Certified Lead Developer
    in reply to ojask2243

    Something like the below:

    a!localVariables(
      local!value1,
      local!value2,
      {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!checkboxField(
                  label: "Checkboxes",
                  labelPosition: "COLLAPSED",
                  choiceLabels: {"Option 1", "Option 2"},
                  choiceValues: {1, 2},
                  value: local!value1,
                  saveInto: local!value1,
                  validations: {}
                )
              }
            ),
            a!columnLayout(
              contents: {
                a!checkboxField(
                  label: "",
                  labelPosition: "COLLAPSED",
                  choiceLabels: {"Option 3", "Option 4"},
                  choiceValues: {3, 4},
                  value: local!value2,
                  saveInto:local!value2,
                  validations: {}
                )
              }
            ),
            a!columnLayout(
              contents: {
                a!buttonLayout(
                  a!buttonWidget(
                    label:"Submit",
                    saveInto: {
                      a!writeToDataStoreEntity(
                        dataStoreEntity: {your_entity_constant},
                        valueToStore: updatedictionary(
                          your_local_varible_which_you_have_to_Insert,
                          {
                            fieldName_in_Which_you_want_to_store:joinarray({local!value1,local!value2},";") 
                          }
                        )
                      )
                    }
                  )
                )
              }
            )
          }
        )
      }
    )

  • Now you can replace updatedictionary() with a!update()