Text disappear from field in created Interface

I've created process model by using appian designer and now work on interfaces which contains for example: form layout, user picker, department, description, city, date and other details.
It's kind of pop-up window where we are able to fill some text fields and after that we can send it/submit.
The issue is when one field is filled and i try to fill next one - when i do this the previous field dissapear.
Do you have any idea what can be wrong?


The goal for my work is to create process model to monitor some processes in company and to test some actions how they goes, in where part of process we can improve according to loosing time etc.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • =a!formLayout(
      label: "New Article Request",
      contents: {
        a!sectionLayout(
          contents: {
            a!columnsLayout(
              columns: {
                a!columnLayout(
                  contents: {
                    a!pickerFieldUsers(
                      label: "Requested By",
                      labelPosition: "ABOVE",
                      value: loggedInUser(),
                      /* The saveInto parameter must be configured in order to save a value */
                      saveInto: {},
                      required: true,
                      validations: {}
                    ),
                    a!sideBySideLayout(
                      items: {
                        a!sideBySideItem(
                          item: a!dropdownField(
                            label: "Department",
                            labelPosition: "ABOVE",
                            placeholderLabel: "--- Select Department ---",
                            choiceLabels: {"Finance", "Human Resources", "Marketing", "Sales", "IT"},
                            choiceValues: {"Finance", "Human Resources", "Marketing", "Sales", "IT"},
                            saveInto: {},
                            required: true,
                            validations: {}
                          )
                        ),
                        a!sideBySideItem(
                          item: a!dateField(
                            label: "Due Date",
                            labelPosition: "ABOVE",
                            value: today(),
                            saveInto: {},
                            required: true,
                            validations: {}
                          ),
                          width: "MINIMIZE"
                        )
                      }
                    ),
                    a!textField(
                      label: "Special Instructions",
                      labelPosition: "ABOVE",
                      /* The value parameter must be configured to display a value in the component */
                      saveInto: {},
                      refreshAfter: "UNFOCUS",
                      required: true,
                      validations: {}
                    )
                  }
                ),
                a!columnLayout(
                  contents: {
                    a!sideBySideLayout(
                      items: {
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Business Unit",
                            labelPosition: "ABOVE",
                            saveInto: {},
                            refreshAfter: "UNFOCUS",
                            required: true,
                            validations: {}
                          ),
                          width: "2X"
                        ),
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Unit #",
                            labelPosition: "ABOVE",
                            saveInto: {},
                            refreshAfter: "UNFOCUS",
                            validations: {}
                          )
                        )
                      }
                    ),
                    a!textField(
                      label: "City",
                      labelPosition: "ABOVE",
                      saveInto: {},
                      refreshAfter: "UNFOCUS",
                      required: true,
                      validations: {}
                    ),
                    a!sideBySideLayout(
                      items: {
                        a!sideBySideItem(
                          item: a!textField(
                            label: "State/Province",
                            labelPosition: "ABOVE",
                            saveInto: {},
                            refreshAfter: "UNFOCUS",
                            required: true,
                            validations: {}
                          )
                        ),
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Zip/Postal Code",
                            labelPosition: "ABOVE",
                            saveInto: {},
                            refreshAfter: "UNFOCUS",
                            required: true,
                            validations: {}
                          )
                        ),
                        a!sideBySideItem()
                      }
                    )
                  }
                )
              }
            )
          }
        ),
        a!gridLayout(
          label: "Items",
          instructions: "",
          totalcount: null,
          headerCells: {
            a!gridLayoutHeaderCell(label: "Description"),
            a!gridLayoutHeaderCell(label: "Category"),
            a!gridLayoutHeaderCell(label: "Qty", align: "RIGHT"),
            a!gridLayoutHeaderCell(label: "Unit Price", align: "RIGHT"),
            a!gridLayoutHeaderCell(label: "Amount", align: "RIGHT"),
            a!gridLayoutHeaderCell(label: "Delete",
              showwhen: true)
          },
          columnConfigs: {
            a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3),
            a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3),
            a!gridLayoutColumnConfig(width: "DISTRIBUTE"),
            a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 2),
            a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 2),
            a!gridLayoutColumnConfig(width: "ICON")
          },
          rows: {
            a!gridRowLayout(
              contents: {
                a!textField(saveInto: {}, refreshAfter: "UNFOCUS", validations: {}),
                a!dropdownField(placeholderLabel: "--- Select a Category ---", choiceLabels: {"Hardware", "Software", "Travel", "Recruiting", "Miscellaneous"}, choiceValues: {"Hardware", "Software", "Travel", "Recruiting", "Miscellaneous"}, saveInto: {}, validations: {}),
                a!integerField(saveInto: {}, validations: {}, align: "RIGHT"),
                a!floatingPointField(saveInto: {}, validations: {}, align: "RIGHT"),
                a!textField(value: dollar(0), saveInto: {}, refreshAfter: "UNFOCUS", readOnly: true, validations: {}, align: "RIGHT"),
                a!imageField(images: {a!documentImage(document: a!iconIndicator("REMOVE"), link: a!dynamicLink(saveInto: {}))}, size: "ICON")
              }
            ),
            a!gridRowLayout(
              contents: {
                a!textField(readOnly: true),
                a!textField(readOnly: true),
                a!textField(readOnly: true),
                a!textField(value: "Total", readOnly: true, align: "RIGHT"),
                a!textField(value: dollar(0), readOnly: true, align: "RIGHT"),
                a!textField(readOnly: true)
              }
            )
          },
          addRowLink: a!dynamicLink(label: "Add Item", saveInto: {})
        )
      },
      buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidgetSubmit(
            label: "Submit",
            confirmheader: "Confirmation",
            confirmmessage: "Are you sure?",
            confirmbuttonlabel: "Yes",
            cancelbuttonlabel: "No",
            saveInto: {},
            style: "DESTRUCTIVE"
          )
        },
        secondaryButtons: {
          a!buttonWidgetSubmit(
            label: "Cancel",
            value: true,
            saveInto: ri!cancel,
            style: "NORMAL",
            skipValidation: true
          )
        }
      ),
      validations: {},
      skipautofocus: false
    )
     Expression 

  • +1
    Certified Lead Developer
    in reply to piotrb0002
    Your code is,

    a!textField(
    label: "Special Instructions",
    labelPosition: "ABOVE",
    /* The value parameter must be configured to display a value in the component */
    saveInto: {},
    refreshAfter: "UNFOCUS",
    required: true,
    validations: {}
    )
    Replace your code with:

    a!textField(
    label: "Special Instructions",
    labelPosition: "ABOVE",
    /* The value parameter must be configured to display a value in the component */
    value:ri!input,
    saveInto: ri!input,
    refreshAfter: "UNFOCUS",
    required: true,
    validations: {}
    )
    create a rule input with the name "input" and type "text".
    All your textFields should have a value and saveInto parameter. You can either save them in a same variable of array type or use different rule inputs for different textFields.
  • ok, i've done it with special instructions label and it's work so it is necessary to correct code in relation to other fields?
  • 0
    Certified Lead Developer
    in reply to piotrb0002

    yes, you need to correct the code for all the text fields that you have in your code.

    Generally whenever there is a user input field like textField or integerField etc, where the user is giving some input, it is recommended to save the input in a rule input so that it can be used further in your process. And also, for all such field you have to specify the value parameter so that the value given by the user in those fields stay even after you move to a next field.

  • 0
    Certified Associate Developer
    in reply to piotrb0002
    You haven't used saveInto variables in any of the controls your are displaying this the reason your input vanishes when you changed the focus from one UI control to another. Make necessary local or ri variables for each of the controls to hold the values and use that variables inside saveInto field of each and every controls. This will resolve your issue.