Fill the demo data in SAIL on click of a Button.

Certified Senior Developer

Hi,

we have requirement like on Button Click entire SAIL form(many fields) has to fill with some demo data. this will save a lot of time while giving the demo to client.

will it be possible to fill the data on click of a button?

Can you provide some thoughts on this, if possible some sample form.

We don't want to send the data from Process because we don't want to fill the form with default data.

Thanks in advance.

-Ram

  Discussion posts and replies are publicly visible

Parents
  • Just a thought, You may be able to use Fitnesse for Appian to fill the form for you. This will be outside Appian and satisfies your requirement of not using default data.
  • Hi Ram,

    I do something similar for demos. There are a few different methods I've used:

    load(
      local!demoData,
      a!formLayout(
        label: "Demo",
        contents: {
          a!sectionLayout(
            contents: {
              /*Populate from a button anywhere in the content*/
              a!buttonLayout(
                primaryButtons: {
                  a!buttonWidget(
                    label: "From Content Button",
                    style: "PRIMARY",
                    submit: false,
                    saveInto: {
                      a!save(
                        local!demoData,
                        {
                          field1: "field1FromContentButton",
                          field2: "field2FromContentButton",
                          field3: "field3FromContentButton"
                        }
                      )
                    }
                  )
                }
              ),
              /*Populate from dynamic link*/
              a!linkField(
                label: "Link Field",
                links: a!dynamicLink(
                  label: "From Dynamic Link",
                  saveInto: {
                    a!save(
                      local!demoData,
                      {
                        field1: "field1FromDynamicLink",
                        field2: "field2FromDynamicLink",
                        field3: "field3FromDynamicLink"
                      }
                    )
                  }
                )
              ),
              a!textField(
                label: "Field 1",
                value: local!demoData.field1,
                saveInto: local!demoData.field1
              ),
              a!textField(
                label: "Field 2",
                value: local!demoData.field2,
                saveInto: local!demoData.field2
              ),
              a!textField(
                label: "Field 3",
                value: local!demoData.field3,
                saveInto: local!demoData.field3
              )
            }
          )
        },
        /*Populate demo data from form button*/
        buttons: a!buttonLayout(
          primaryButtons: {
            a!buttonWidget(
              label: "From Form Button",
              style: "PRIMARY",
              submit: false,
              saveInto: {
                a!save(
                  local!demoData,
                  {
                    field1: "field1FromFormButton",
                    field2: "field2FromFormButton",
                    field3: "field3FromFormButton"
                  }
                )
              }
            )
          }
        )
      )
    )

Reply
  • Hi Ram,

    I do something similar for demos. There are a few different methods I've used:

    load(
      local!demoData,
      a!formLayout(
        label: "Demo",
        contents: {
          a!sectionLayout(
            contents: {
              /*Populate from a button anywhere in the content*/
              a!buttonLayout(
                primaryButtons: {
                  a!buttonWidget(
                    label: "From Content Button",
                    style: "PRIMARY",
                    submit: false,
                    saveInto: {
                      a!save(
                        local!demoData,
                        {
                          field1: "field1FromContentButton",
                          field2: "field2FromContentButton",
                          field3: "field3FromContentButton"
                        }
                      )
                    }
                  )
                }
              ),
              /*Populate from dynamic link*/
              a!linkField(
                label: "Link Field",
                links: a!dynamicLink(
                  label: "From Dynamic Link",
                  saveInto: {
                    a!save(
                      local!demoData,
                      {
                        field1: "field1FromDynamicLink",
                        field2: "field2FromDynamicLink",
                        field3: "field3FromDynamicLink"
                      }
                    )
                  }
                )
              ),
              a!textField(
                label: "Field 1",
                value: local!demoData.field1,
                saveInto: local!demoData.field1
              ),
              a!textField(
                label: "Field 2",
                value: local!demoData.field2,
                saveInto: local!demoData.field2
              ),
              a!textField(
                label: "Field 3",
                value: local!demoData.field3,
                saveInto: local!demoData.field3
              )
            }
          )
        },
        /*Populate demo data from form button*/
        buttons: a!buttonLayout(
          primaryButtons: {
            a!buttonWidget(
              label: "From Form Button",
              style: "PRIMARY",
              submit: false,
              saveInto: {
                a!save(
                  local!demoData,
                  {
                    field1: "field1FromFormButton",
                    field2: "field2FromFormButton",
                    field3: "field3FromFormButton"
                  }
                )
              }
            )
          }
        )
      )
    )

Children
No Data