How to define a local variable to be a list?

I defined local!valuelist from a!localVariables, however, it is not a list so i can't saveinto form such as local!valuelist.username,local!valuelist.password, how can i transfer the format of this local value?

  Discussion posts and replies are publicly visible

Parents
  • In addition, all you need to do to define your local variable as a list is utilize {} in it's definition.  Here's an example of saving into index 2 of an empty local!valuelist variable:

    a!localVariables(
      local!valuelist: {},
      {
        a!richTextDisplayField(
          label: "List:",
          value: a!forEach(
            items: local!valuelist,
            expression: {
              a!richTextItem(
                text: concat("Item ",fv!index,": ",fv!item)
              ),
              char(13)
            }
          )
        ),
        a!buttonArrayLayout(
          align: "START",
          buttons: {
            a!buttonWidget(
              label: "Save",
              value: "B",
              saveInto: a!save(local!valuelist[2],{username: save!value})
            )
          }
        )
      }
    )

Reply
  • In addition, all you need to do to define your local variable as a list is utilize {} in it's definition.  Here's an example of saving into index 2 of an empty local!valuelist variable:

    a!localVariables(
      local!valuelist: {},
      {
        a!richTextDisplayField(
          label: "List:",
          value: a!forEach(
            items: local!valuelist,
            expression: {
              a!richTextItem(
                text: concat("Item ",fv!index,": ",fv!item)
              ),
              char(13)
            }
          )
        ),
        a!buttonArrayLayout(
          align: "START",
          buttons: {
            a!buttonWidget(
              label: "Save",
              value: "B",
              saveInto: a!save(local!valuelist[2],{username: save!value})
            )
          }
        )
      }
    )

Children
No Data