Error: variable(s) not found: local!data
Hi! I created an interface with an editable grid so that the user can add invoice line information and new rows. When clicking the button of confirmation, the rows must be saved into a record ([]). The interface runs in a perfect way when I test it (all the values I write are stored in local!data) , but when I try to add it to the process model an error appears :

Image of the error related with local variables (local!data):

To create the interface I followed the steps of an Appian tutorial ("Write or Delete Records using an Editable Grid | Editable Grids, Part 2"):
https://www.youtube.com/watch?v=z0FF9aCZRBE
In the tutorial, we store the inserted values in a local variable (local!data), to end passing the information to the record. I leave here the code:
a!formLayout(
label: "Crear Nueva Factura (2/2)",
contents: {
a!localVariables(
local!data,
{
a!sectionLayout(
label: "Información de LÃ%ADnea de Factura",
contents: {
a!gridLayout(
label: "A continuación, incorpore las lÃ%ADneas de factura correspondientes y pulse el botón de creación",
headerCells: {
a!gridLayoutHeaderCell(label: "Id Factura"),
a!gridLayoutHeaderCell(label: "Id Pedido"),
a!gridLayoutHeaderCell(label: "Importe"),
a!gridLayoutHeaderCell(label: "Proveedor"),
a!gridLayoutHeaderCell()
},
columnConfigs: {
a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
a!gridLayoutColumnConfig(width:"DISTRIBUTE"),
a!gridLayoutColumnConfig(width:"ICON")
},
rows: a!forEach(
items: local!data,
expression: a!gridRowLayout(
contents: {
a!textField(value:fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{14eaacbb-19fc-41e2-aea2-3ec9b3322722}idFactura'], saveInto: fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{14eaacbb-19fc-41e2-aea2-3ec9b3322722}idFactura']),
a!textField(value:fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{0674a81d-2d41-4f90-a871-1f29f4283a6e}idPedido'], saveInto: fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{0674a81d-2d41-4f90-a871-1f29f4283a6e}idPedido']),
a!floatingPointField(value:fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{afbd0300-a83f-4cd5-8de9-740dab7d0ec8}totalPedidoFact'], saveInto: fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{afbd0300-a83f-4cd5-8de9-740dab7d0ec8}totalPedidoFact']),
a!textField(value:fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{92d3b685-0289-4393-9c7e-c63a963dfa73}proveedor'], saveInto: fv!item['recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura.fields.{92d3b685-0289-4393-9c7e-c63a963dfa73}proveedor']
),
a!richTextDisplayField(
value: {
a!richTextIcon(
icon: "times-circle",
link: a!dynamicLink(
value: remove(local!data, fv!index),
saveInto: local!data
),
linkstyle: "STANDALONE",
color: "NEGATIVE"
)
}
)
}
)
),
addrowlink: a!dynamicLink(
label: "Add new Invoice Line",
value: append(
local!data,
'recordType!{b83ae990-aa66-4847-b974-1e1e40019294}CPF Maestro LÃ%ADneas Factura'()
),
saveInto: local!data
)
)
}
)
}
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Completar Creación Factura",
saveInto: a!writeRecords(
records:local!data,
onSuccess: a!save(local!data, fv!recordsUpdated)
),
submit: true,
style: "PRIMARY",
validate:true
)
},
secondaryButtons: {
a!buttonWidget(
label: "Cancelar",
value: true,
saveInto: ri!cancel,
style: "NORMAL"
)
}
)
)
Even though I have no exact idea of the error, I searched in the community and found that the local variables cant be passed to the process model directly. How can I afford this situation in order to solve my problem! If I have to transform my local data into a rule input or something else, where can I find an step-by step guide?
Thank you so much
