How to pass value from one interface to another interface ?

Hi,

I have imported interface-1 in interface-2, Interface-1 contains a form with one paragraph box and a submit button (already working, I can put some text in there and hit submit it gets written in the DB), I am trying to pass text from Interface-2 (where I have imported it) and expecting it to save the text in DB as it is already working independently

Please help me with it.

  Discussion posts and replies are publicly visible

Parents
  • You can save the same value in a rule input, so that one gets updated on the other interface.

    Or create a refreshVariable which queries the DB after summitting to fetch this new value. 

  • I am sorry but my ask is, I have a form on Interface-1 and it has been embedded in Interface-2, I can see the Interface-1 form on Interface-2. Now I am trying to submit data from Interface-2 in embedded form of Interface-1 and expecting when I press submit the data should be written in DB.

  • You will likely need to map the rule inputs together from the child interface to the parent. For example, suppose you have a rule input for ri!case on the child interface. You will need to create a second rule input to match that on the parent interface and map them together like this:

    rule!ChildInterface(case: ri!case)

    Then, any changes you make in the child interface will also be saved to the parent.

    If this still does not address your question, can you post samples of the two interfaces you have? That can help us understand your scenario and provide the best solution.

  • Here is Interface-2 SAIL :

    a!columnsLayout(
      columns: {
        a!columnLayout(
          contents: {
            a!paragraphField(
              label: "",
              labelPosition: if(ri!readOnly, "ADJACENT", "ABOVE"),
              value: ri!notes.notesMessage,
              saveInto: ri!notes.notesMessage,
              height: "MEDIUM",
              validations: if(
                len(ri!notes.notesMessage) > 2000,
                "Value may not be longer than 2000 characters. You have entered " & len(ri!notes.notesMessage) & " characters.",
                null
              )
            ),
            a!buttonArrayLayout(
              buttons: {
                a!buttonWidget(
                  label: "Submit",
                  icon: "check",
                  saveInto: {
                    a!save(
                      target: ri!notes,
                      value: append(
                        'type!{urn:com:appian:types}Notes'(
                          date: now(),
                          createdBy: loggedInUser(),
                          notesMessageBody: ri!notes.notesMessage
                        )
                      )
                    )
                  },
                  submit: true
                )
              },
              align: "END"
            )
          }
        )
      }
    )

    Interface-1 SAIL:

    {
      a!columnsLayout(
        columns: {
          a!columnLayout(
            contents: {
              a!textField(
                label: "INTERFACE - 1",
                labelPosition: "ABOVE",
                saveInto: {},
                refreshAfter: "UNFOCUS",
                required: false,
                readOnly: true,
                disabled: false,
                validations: {}
              ),
              a!paragraphField(
                label: "Interface-1 Content Here...",
                labelPosition: "ABOVE",
                saveInto: {},
                refreshAfter: "UNFOCUS",
                height: "MEDIUM",
                readOnly: true,
                disabled: true,
                validations: {}
              )
            }
          ),
          a!columnLayout(
            contents: {
              a!textField(
                label: "INTERFACE - 2",
                labelPosition: "ABOVE",
                saveInto: {},
                refreshAfter: "UNFOCUS",
                readOnly: true,
                disabled: false,
                validations: {}
              ),
              rule!notes(
                null,null,null
              )
            }
          )
        }
      )
    }

     

Reply
  • Here is Interface-2 SAIL :

    a!columnsLayout(
      columns: {
        a!columnLayout(
          contents: {
            a!paragraphField(
              label: "",
              labelPosition: if(ri!readOnly, "ADJACENT", "ABOVE"),
              value: ri!notes.notesMessage,
              saveInto: ri!notes.notesMessage,
              height: "MEDIUM",
              validations: if(
                len(ri!notes.notesMessage) > 2000,
                "Value may not be longer than 2000 characters. You have entered " & len(ri!notes.notesMessage) & " characters.",
                null
              )
            ),
            a!buttonArrayLayout(
              buttons: {
                a!buttonWidget(
                  label: "Submit",
                  icon: "check",
                  saveInto: {
                    a!save(
                      target: ri!notes,
                      value: append(
                        'type!{urn:com:appian:types}Notes'(
                          date: now(),
                          createdBy: loggedInUser(),
                          notesMessageBody: ri!notes.notesMessage
                        )
                      )
                    )
                  },
                  submit: true
                )
              },
              align: "END"
            )
          }
        )
      }
    )

    Interface-1 SAIL:

    {
      a!columnsLayout(
        columns: {
          a!columnLayout(
            contents: {
              a!textField(
                label: "INTERFACE - 1",
                labelPosition: "ABOVE",
                saveInto: {},
                refreshAfter: "UNFOCUS",
                required: false,
                readOnly: true,
                disabled: false,
                validations: {}
              ),
              a!paragraphField(
                label: "Interface-1 Content Here...",
                labelPosition: "ABOVE",
                saveInto: {},
                refreshAfter: "UNFOCUS",
                height: "MEDIUM",
                readOnly: true,
                disabled: true,
                validations: {}
              )
            }
          ),
          a!columnLayout(
            contents: {
              a!textField(
                label: "INTERFACE - 2",
                labelPosition: "ABOVE",
                saveInto: {},
                refreshAfter: "UNFOCUS",
                readOnly: true,
                disabled: false,
                validations: {}
              ),
              rule!notes(
                null,null,null
              )
            }
          )
        }
      )
    }

     

Children