Skip to main content
June 15, 2023
Question

User Interface

  • June 15, 2023
  • 6 replies
  • 0 views

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?

    6 replies

    sunilc6392
    June 15, 2023

    Hii there,

    can you please share some code snippets for better understanding?

    harshitb6843
    June 15, 2023

    As the error says, you are trying to update a field that doesn't exist. Re-check the field you have added and try again. If you still face the issue, paste the code snippet as Sunil said. 

    June 15, 2023

    It is pretty clear from the error message that you are trying to update a value of some key in a Map and the key that you have provided is of type: Record field instead of String or List of String. Please share the code so that we can assist.

    davel001150
    June 15, 2023

    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.

    June 29, 2023

    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
          )
        }
      )
    }  
    )     
    
    
    
    

    stefanhelzle0001
    Brainy
    June 29, 2023

    Please do not double-post.