Interface Definition: Expression evaluation error at function a!textField [line 56]: Invalid index: Cannot index property 'shippingAddress' of type Text into type

I am getting below error ::

 

Interface Definition: Expression evaluation error at function a!textField [line 56]: Invalid index: Cannot index property 'shippingAddress' of type Text into type

Boolean

 

 

My code is:

 

a!localVariables(

  local!locationsList: rule!AIP_getAddress(addressId: NULL),

  local!addingAddress : false(),

  local!newAddress : 'type!{urn:com:appian:types:AIP}AIP_address'(),

  {

    a!sectionLayout(

      label: "Address",

      contents: {

        a!radioButtonField(

          label: "Radio Buttons",

          labelPosition: "COLLAPSED",

          choiceLabels:

          a!forEach(

            items: local!locationsList,

            expression: fv!item.shippingAddress & " " &

            if(isnull(fv!item.unitNumber), null, "Unit #" & fv!item.unitNumber)

            & " " & fv!item.city & ", " & fv!item.stateOrProvince & " "

            & fv!item.postalCode

          ),

          choiceValues: local!locationsList,

          value: ri!address,

          saveInto: ri!address,

          choiceLayout: "STACKED",

          validations: {}

        )

      }

    ),

    a!richTextDisplayField(

      labelPosition: "COLLAPSED",

      value: {

        a!richTextIcon(

          icon: "plus"

        ),

        " ",

        a!richTextItem(

          text: {

            "Add New Address"

          },

          link: a!dynamicLink(

            label: "Dynamic Link",

            value: true(),

            saveInto: local!addingAddress

          ),

          style: {

            "STRONG"

          }

        )

      }

    ),

    a!boxLayout(

      label: "Add New Address",

      contents: {

        a!sideBySideLayout(

          items: {

            a!sideBySideItem(

              item: a!textField(

                label: "Shipping Address",

                labelPosition: "ABOVE",

                value: local!newAddress.shippingAddress,

                saveInto: local!newAddress.shippingAddress,

                refreshAfter: "UNFOCUS",

                required: true,

                validations: {}

              )

            ),

            a!sideBySideItem(

              item: a!textField(

                label: "Unit number",

                labelPosition: "ABOVE",

                value: local!newAddress.unitNumber,

                saveInto: local!newAddress. unitNumber,

                refreshAfter: "UNFOCUS",

                validations: {}

              )

            )

          }

        ),

        a!sideBySideLayout(

          items: {

            a!sideBySideItem(

              item: a!textField(

                label: "City",

                labelPosition: "ABOVE",

                value: local!newAddress.city,

                saveInto: local!newAddress.city,

                refreshAfter: "UNFOCUS",

                required: true,

                validations: {}

              ),

              width: "2X"

            ),

            a!sideBySideItem(

              item: a!textField(

                label: "State/Province",

                labelPosition: "ABOVE",

                value: local!newAddress,

                saveInto: local!newAddress,

                refreshAfter: "UNFOCUS",

                required: true,

                validations: {}

              ),

              width: "1X"

            ),

            a!sideBySideItem(

              item: a!textField(

                label: "Postal Code",

                labelPosition: "ABOVE",

                value: local!newAddress,

                saveInto: local!newAddress,

                refreshAfter: "UNFOCUS",

                required: true,

                validations: {}

              ),

              width: "1X"

            )

          }

        ),

        a!buttonArrayLayout(

          buttons: {

            a!buttonWidget(

              label: "ADD",

              saveInto: {

                a!save(local!locationsList,append(local!locationsList,local!newAddress)),

                a!save(ri!address,local!newAddress),

                a!save(local!newAddress,{addreessId: null,shippingAddress:" ",unitNumber:null,city:" ",

  stateOrProvince: " ",postalCode : null}),

                a!save(local!addingAddress,false())

              },

              style: "PRIMARY",

              validate: true

            )

          },

          align: "END"

        )

      },

      showWhen: local!addingAddress,

      style: "ACCENT",

      marginBelow: "STANDARD"

    )

  }

  )

 

 

I have attached the screenshot for reference . Kindly guide me please.

  Discussion posts and replies are publicly visible

Parents Reply Children