User Interface

Hello, I am getting this error

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error [evaluation ID = EO1CO] : An error occurred while executing a save: Expression evaluation error: Cannot update Map; invalid index provided of type: Record Field (must be String or List of String)

What does it mean?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    It's possible that you're trying to save to a record field of a variable, and instead of the record Type variable you're intending to save to, you're saving to another variable of type a!map.  Either that or you're simply using the recordField syntax to try to save to a map.

    It makes sense that maps don't have record fields.  If we knew the variables you had, and their types, and the save you were using, that could definitely help us help you further.

  • Hi! I´m facing the same problem of the discussion. 

    the error shows up at the moment I replace the a!text field with the record fields

                  a!textField(value:fv!item.idOrden, saveInto: fv!item.idOrden), --->  a!textField(value:fv!item[record], saveInto: fv!item[record])

    Could this error happen because in my record I have different types of data? (text, decimal number and dates).

     I include captures of my code

    a!localVariables(
      local!data,
      {
      a!gridLayout(
        label: "Invoice Details",
        headerCells: {
          a!gridLayoutHeaderCell(label: "Purchase Order"),
          a!gridLayoutHeaderCell(label: "Date"),
          a!gridLayoutHeaderCell(label: "Total Value"),
          a!gridLayoutHeaderCell(label: "Material"),
          a!gridLayoutHeaderCell(label: "Supplier"),
          a!gridLayoutHeaderCell(),
          a!gridLayoutHeaderCell()
    
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
          a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
          a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
          a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
          a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
          a!gridLayoutColumnConfig(width:"ICON"),
          a!gridLayoutColumnConfig(width:"ICON")
          
        },
        rows: a!forEach(
          items: local!data,
          expression: a!gridRowLayout(
            contents: {
              a!textField(
                value:fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{ab97d392-b365-425a-a0e5-116da756c87a}id_orden'], 
                saveInto: fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{ab97d392-b365-425a-a0e5-116da756c87a}id_orden'],
                required: true                    
              ),
              a!textField(
                value:fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{25003162-d3d0-4466-86f8-471cb1e37589}fecha_orden'], 
                saveInto: fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{25003162-d3d0-4466-86f8-471cb1e37589}fecha_orden'],
                required: true                    
              ),
              a!textField(
                value:fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{c228ed4c-21cb-4af4-a313-88f26e7874da}total_orden'], 
                saveInto: fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{c228ed4c-21cb-4af4-a313-88f26e7874da}total_orden'],
                required: true                    
              ),
              a!textField(
                value:fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{5f4060f6-827d-41b5-88e7-0328ec1309bc}Material'], 
                saveInto: fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{5f4060f6-827d-41b5-88e7-0328ec1309bc}Material'],
                required: true                    
              ),
              a!textField(
                value:fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{d9317466-7426-47af-bd64-22a998c636e6}id_proveedor'], 
                saveInto: fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{d9317466-7426-47af-bd64-22a998c636e6}id_proveedor'],
                required: true                 
    
              ),
              a!richTextDisplayField(
                value: {
                  a!richTextIcon(
                  icon: "times-circle",
                  link: a!dynamicLink(
                    saveInto: local!data,
                    value: remove(local!data, fv!index)
                  ),
                  linkstyle: "STANDALONE",
                  color: "NEGATIVE",
                  showwhen: a!isNullOrEmpty(fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{ab97d392-b365-425a-a0e5-116da756c87a}id_orden'])
                  )
                , 
                  a!richTextIcon(
                   icon: "trash",
                   color: "NEGATIVE",
                   showWhen: a!isNotNullOrEmpty(
                     fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{ab97d392-b365-425a-a0e5-116da756c87a}id_orden']),
                     
                   link: a!dynamicLink(
                     saveInto: local!data,
                     value: remove(local!data, fv!index)
                   )
                   
                )
                }
              ),
              a!richTextDisplayField(
                value: a!richTextIcon(
                  showWhen: a!isNotNullOrEmpty(
                    fv!item['recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines.fields.{ab97d392-b365-425a-a0e5-116da756c87a}id_orden']),
                  icon: "floppy-o",
                  color: "POSITIVE"
                )
              )
            }
          )
        ),
        addrowlink: a!dynamicLink(
          saveInto: local!data,
          value: append(
            local!data, 
           'recordType!{d269796e-dcd7-46b6-8ecf-55ed16bf54a1}PTPP Invoice Lines'()
          ),
          label: "Add new Invoice Line"
        )
        ),
      a!buttonArrayLayout(
        align: "END",
        buttons: {
          a!buttonWidget(
            label: "Write to the Database",
            style: "PRIMARY",
            saveInto: a!writeRecords(
              records:local!data,
              onSuccess: a!save(local!data, fv!recordsUpdated)
            ),
            validate:true
          )
        }
      )
    }  
    )     
    
    
    
    

  • 0
    Certified Lead Developer
    in reply to carlosp5114

    Please do not double-post.

Reply Children
No Data