Skip to main content
Known Participant
October 13, 2026
Question

Medium to Beginner Interface Doubt

This code does not allow to save input just because I initiate the locals as nulls ( I need them like that for it to be clean and tidy as an interface).

 

a!localVariables(
local!words_en:null,
local!words_de:null,
{
a!boxLayout(
label: "Add Words",
contents: {
a!sideBySideLayout(
items: {
a!sideBySideItem(
a!tagField(
tags: a!tagItem(
text: "English",
backgroundColor: "SECONDARY"
)
)
),
a!sideBySideItem(
a!tagField(
tags: a!tagItem(
text: "German",
backgroundColor: "SECONDARY"
)
)
),
a!sideBySideItem(
item: a!richTextDisplayField(
value: a!richTextIcon(
icon: "window-close",
color: "SECONDARY",
size: "MEDIUM",
),
marginAbove: "LESS"
),
width: "MINIMIZE"
)
}
),
a!forEach(
items: enumerate(count(local!words_en)),
expression: {
a!sideBySideLayout(
items: {
a!sideBySideItem(
item: a!textField(
value: index(local!words_en,fv!index,null),
saveInto: a!save(local!words_en[fv!index],save!value)
)
),
a!sideBySideItem(
item: a!textField(
value: index(local!words_de,fv!index,null),
saveInto: a!save(local!words_de[fv!index],save!value)
)
),
a!sideBySideItem(
item: a!richTextDisplayField(
value: a!richTextIcon(
icon: "window-close",
color: "NEGATIVE",
size: "MEDIUM",
link: a!dynamicLink(
saveInto: {
a!save(local!words_en,remove(local!words_en,fv!index)),
a!save(local!words_de,remove(local!words_de,fv!index)),
}
),
linkStyle: "STANDALONE"
),
marginAbove: "LESS"
),
width: "MINIMIZE"
)
}
)
}
),
a!richTextDisplayField(
value: a!richTextItem(
text: {
a!richTextIcon(icon: "PLUS"),
" ADD MORE"
},
link: a!dynamicLink(value: null, saveInto: {
a!save(local!words_en,append(local!words_en,save!value)),
a!save(local!words_de,append(local!words_de,save!value))
}
),
linkStyle: "STANDALONE"
)
)
},
marginBelow: "STANDARD",
style: "ACCENT"
)
}
)

 

2 replies

Inspiring
October 13, 2026

Hi try this code. 
 

a!localVariables(
local!words_en: {""},
local!words_de: {""},

a!boxLayout(
label: "Add Words",
style: "ACCENT",
contents: {
a!sideBySideLayout(
items: {
a!sideBySideItem(
item: a!tagField(
tags: {
a!tagItem(
text: "English",
backgroundColor: "SECONDARY"
)
}
)
),
a!sideBySideItem(
item: a!tagField(
tags: {
a!tagItem(
text: "German",
backgroundColor: "SECONDARY"
)
}
)
)
}
),

a!forEach(
items: local!words_de,
expression: a!sideBySideLayout(
items: {
a!sideBySideItem(
item: a!textField(
value: local!words_en[fv!index],
saveInto: a!save(
local!words_en[fv!index],
save!value
)
)
),

a!sideBySideItem(
item: a!textField(
value: local!words_de[fv!index],
saveInto: a!save(
local!words_de[fv!index],
save!value
)
)
),

a!sideBySideItem(
width: "MINIMIZE",
item: a!richTextDisplayField(
value: {
a!richTextIcon(
icon: "window-close",
color: "NEGATIVE",
link: a!dynamicLink(
saveInto: {
a!save(
local!words_en,
remove(local!words_en, fv!index)
),
a!save(
local!words_de,
remove(local!words_de, fv!index)
)
}
),
linkStyle: "STANDALONE"
)
}
)
)
}
)
),

a!richTextDisplayField(
value: {
a!richTextItem(
text: {
a!richTextIcon(icon: "PLUS"),
" ADD MORE"
},
link: a!dynamicLink(
saveInto: {
a!save(
local!words_en,
append(local!words_en, "")
),
a!save(
local!words_de,
append(local!words_de, "")
)
}
),
linkStyle: "STANDALONE"
)
}
)
}
)
)

 

mathieud0001
Genius
October 14, 2026

Seems like if you initialize your locals with a type of list of string (instead of untyped nulls), it fixes the issue. 

  local!words_en: { "" },
local!words_de: { "" },