Skip to main content
March 28, 2022
Question

Error displaying Interface

  • March 28, 2022
  • 7 replies
  • 0 views

Hi,

Working on the Advance section of the Appian Developer course and the Exercise is to build an interface using expressions to add new items to the Office Supply Inventory.

I am seeing the following error and it is not displaying the interface in the preview section.  Kindly pls help!!

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!columnLayout [line 4]: The contents field on a column layout cannot contain a column layout. Received a column layout at index 1.

The code I am using is:

a!formLayout(
label: "Add Item to Inventory",
contents: {
a!columnLayout(
contents: {
a!columnLayout(
contents: {
a!sectionLayout(
label: "Item Information",
contents: {
a!textField(
label: "Item Name",
value: ri!item.name,
saveInto: ri!item.name,
required: true
),
a!paragraphField(
label: "Description",
value: ri!item.description,
saveInto: ri!item.description,
required: true
),
a!floatingPointField(
label: "Cost",
value: ri!item.cost,
saveInto: ri!item.cost,
required: true
),
a!dropdownField(
label: "Color",
labelPosition: "ABOVE",
placeholder: "Select color from the list---",
choiceLabels: cons!ADV_color_list,
choiceValues: cons!ADV_color_list,
value: ri!item.color,
saveInto: ri!item.color,
required:true
)
}
)
}
),
a!columnLayout(contents: {
a!fileUploadField()
}
)
}
)
},
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
)

)
)

Thanks,
Suneetha.

    7 replies

    stefanhelzle0001
    Brainy
    March 28, 2022

    You try to nest a columnLayout into a columnLayout which does not work. Try to turn the first one into a columnsLayout.

    Please use the insert code way to make your code more readable.

    March 28, 2022

    Thank you Stefan for your quick reponse.. columnsLayout worked!!

    arockiaprincyv0003
    March 28, 2022

    You have to use columnslayout first then add columns 

    a!formLayout(
    label: "Add Item to Inventory",
    contents: {
           a!columnsLayout(
                 columns: {
                     a!columnLayout(
                           contents: {
                               a!sectionLayout(
                                      label: "Item Information",
                                         contents: {
                                            a!textField(
                                               label: "Item Name",
                                                  value: ri!item.name,
                                                      saveInto: ri!item.name,
                                                       required: true
                                                   )....

    a!formLayout(
    label: "Add Item to Inventory",
    contents: {
    a!columnsLayout(
    columns: {
    a!columnLayout(
    contents: {
    a!sectionLayout(
    label: "Item Information",
    contents: {
    a!textField(
    label: "Item Name",
    value: ri!item.name,
    saveInto: ri!item.name,
    required: true
    ),
    a!paragraphField(
    label: "Description",
    value: ri!item.description,
    saveInto: ri!item.description,
    required: true
    ),
    a!floatingPointField(
    label: "Cost",
    value: ri!item.cost,
    saveInto: ri!item.cost,
    required: true
    ),
    a!dropdownField(
    label: "Color",
    labelPosition: "ABOVE",
    placeholder: "Select color from the list---",

    choiceLabels: cons!ADV_color_list,
    choiceValues: cons!ADV_color_list,
    value: ri!item,
    saveInto: ri!item,
    required:true
    )
    }
    )
    }
    ),
    a!columnLayout(contents: {
    a!fileUploadField()
    }
    )
    }
    )
    },
    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
    )

    )
    )

    March 28, 2022

    Thank you..  This issue is resolved..

    gopalk2865
    Participating Frequently
    March 29, 2022

    HI suneethag0001, Could you please verify the answer once your issue is resolved to close the thread. It makes community cleaner. Thank you.