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 Reply
  • 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

Children
  • 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

  • 0
    Certified Senior Developer
    in reply to vikashk739

    Thank You So Much Brother. It worked now these names are coming together can how to show them in row. So I can give proper information in row this is the vaccination center, vaccine type, available slot and fee. So user get proper idea. Can you please help me in that