How to Show Integration Object result to user in Interface?

Certified Senior Developer

I am new to appian. I want to know how to refer integration object to user in interface. In my case user will give his district id and date and he will get all the vaccination center near by him and available slot and type of vaccine. I want to show this integartion object result in Interface to user in a proper way how can I do that?

  Discussion posts and replies are publicly visible

Parents
  • In a local variable, call the integration rule and pass the Ri or local variable in which you're storing the user's input. 
    Then use that variable to show the result using various Appian objects like Grid, RichText etc. 

  • 0
    Certified Senior Developer
    in reply to Harshit Bumb (Appyzie)

    As you said I have used local variable and called the integration object and passed the rule input. Now I am getting that result in local variable. Now I have used read only grid inside read-only grid selected the variable and passed local variable to it. But it is not showing the data. I want to show in a proper way that these are the vaccination centers name near by you then vaccine available in that center and availabile slot. I tried but the data is not showing in read only grid as i am new i am facing issue in this please help me 

  • 0
    Certified Lead Developer
    in reply to jignesht0001

    You have not configured configured columns in your grid. You need to understand how to configure read only grid first. Please go through the link below,

    https://docs.appian.com/suite/help/22.1/Paging_Grid_Component.html

    in data parameter , pass your integration output.

  • Hi, you need to configure the fields for the grid properly

    a!gridField(
      label: "Read Only Grid",
      labelPosition: "ABOVE",
      data: local!result.result.body, 
      columns: {
        a!gridColumn(
          label: "Center Name", 
          value: proper(fv!row.name)
          )
          }
        )
    

    You need to call the Integration body. Since integration is stored in local!result then to get the body call like local!result.result.body

    If any further issues, let us know

  • 0
    Certified Senior Developer
    in reply to vikashk739

    See I have done as you said but not getting it please help me. I am pasting the code here tell me where do i need to change

    a!localVariables(
    local!result: rule!CVMS_vaccinationCenter_INT(district_id: ri!district_id,date: ri!date),

    a!formLayout(
    label: "Form",
    contents: {
    a!textField(
    label: "Enter Your District Id",
    labelPosition: "ABOVE",
    value: ri!district_id,
    saveInto: ri!district_id,
    refreshAfter: "UNFOCUS",
    required: true,
    validations: {}
    ),
    a!textField(
    label: "Enter The Date for which want to check availability",
    labelPosition: "ABOVE",
    placeholder: "DD-MM-YYYY",
    value: ri!date,
    saveInto: ri!date,
    refreshAfter: "UNFOCUS",
    required: true,
    validations: {}
    ),
    a!gridField(
    label: "Read-only Grid",
    labelPosition: "ABOVE",
    data: local!result.result.body,
    columns: {
    a!gridColumn(
    label: "Center Name",
    value: proper(fv!row.name)
    )
    },
    pageSize: null,
    pagingSaveInto: local!result,
    validations: {}
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidget(
    label: "Submit",
    submit: true,
    style: "PRIMARY",
    loadingIndicator: true
    )
    },
    secondaryButtons: {
    a!buttonWidget(
    label: "Cancel",
    value: true,
    saveInto: {},
    submit: true,
    style: "NORMAL",
    validate: false
    )
    }
    )
    ))

  • Hi, the body of your integration call is enveloped with another parameter "sessions". To refer to any value use fv!row.sessions.fieldName

    a!localVariables(
      local!integrationCall: rule!MMP_covidData(district_id: ri!district_id, date: ri!date),
      a!formLayout(
      label: "Form",
      contents: {
        a!sectionLayout(
          contents: {
            a!textField(
              label: "District",
              labelPosition: "ABOVE",
              value: ri!district_id,
              saveInto: ri!district_id,
              refreshAfter: "UNFOCUS",
              validations: {}
            )
          }
        ),
        a!textField(
          label: "Date",
          labelPosition: "ABOVE",
          value: ri!date,
          saveInto: ri!date,
          refreshAfter: "UNFOCUS",
          validations: {}
        ),
        a!sectionLayout(
          label: "",
          contents: {
            a!gridField(
              label: "Read-only Grid",
              labelPosition: "ABOVE",
              data: local!integrationCall.result.body,
              columns: {
                a!gridColumn(
                  label: "Center Name",
                  value: fv!row.sessions.name
                ),
                a!gridColumn(
                  label: "District Name",
                  value: fv!row.sessions.district_name
                )
              },
              validations: {}
            )
          }
        )
      },
      buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidget(
            label: "Submit",
            submit: true,
            style: "PRIMARY"
          )
        },
        secondaryButtons: {
          a!buttonWidget(
            label: "Cancel",
            value: true,
            saveInto: ri!cancel,
            submit: true,
            style: "NORMAL",
            validate: false
          )
        }
      )
    )
    )

    You can refer to this code, I have used different Integration name so please don't get confused.

    Please refer the gridColumn part

Reply
  • Hi, the body of your integration call is enveloped with another parameter "sessions". To refer to any value use fv!row.sessions.fieldName

    a!localVariables(
      local!integrationCall: rule!MMP_covidData(district_id: ri!district_id, date: ri!date),
      a!formLayout(
      label: "Form",
      contents: {
        a!sectionLayout(
          contents: {
            a!textField(
              label: "District",
              labelPosition: "ABOVE",
              value: ri!district_id,
              saveInto: ri!district_id,
              refreshAfter: "UNFOCUS",
              validations: {}
            )
          }
        ),
        a!textField(
          label: "Date",
          labelPosition: "ABOVE",
          value: ri!date,
          saveInto: ri!date,
          refreshAfter: "UNFOCUS",
          validations: {}
        ),
        a!sectionLayout(
          label: "",
          contents: {
            a!gridField(
              label: "Read-only Grid",
              labelPosition: "ABOVE",
              data: local!integrationCall.result.body,
              columns: {
                a!gridColumn(
                  label: "Center Name",
                  value: fv!row.sessions.name
                ),
                a!gridColumn(
                  label: "District Name",
                  value: fv!row.sessions.district_name
                )
              },
              validations: {}
            )
          }
        )
      },
      buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidget(
            label: "Submit",
            submit: true,
            style: "PRIMARY"
          )
        },
        secondaryButtons: {
          a!buttonWidget(
            label: "Cancel",
            value: true,
            saveInto: ri!cancel,
            submit: true,
            style: "NORMAL",
            validate: false
          )
        }
      )
    )
    )

    You can refer to this code, I have used different Integration name so please don't get confused.

    Please refer the gridColumn part

Children