Error displaying Interface

Certified Associate Developer

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.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    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.

  • 0
    Certified Senior Developer

    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
    )

    )
    )

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

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

  • 0
    Certified Associate Developer
    in reply to Prin18

    Thank you..  This issue is resolved..

  • 0
    Certified Senior Developer
    in reply to suneethagarla

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

  • 0
    Certified Associate Developer
    in reply to GopalK

    Hi Gopal,

    The issue is resolved.  Is there an action/status to close the thread?  Pls lmk.

    Thanks,
    Suneetha.

  • 0
    Certified Lead Developer
    in reply to suneethagarla
    Is there an action/status to close the thread?  Pls lmk.

    Whichever comment(s) helped you (even if a little bit), please click "Verify Answer" if such a button appears, and/or click the "Vote Up" button at the very least. 

    (It's a little unclear what causes the "Verify Answer" option to show up - sometimes it seems as if a comment must be marked with "suggest an answer" first, and other times it seems to work differently.  But in any case, doing so gives the person / people who helped you some "brownie points" in the Community.)