Save values to a!map() local variable

Certified Associate Developer

Hello,

On my UI, I have two text fields that I need to store temporarily until the user confirms their input with a button.

I wanted to store these values in a local variable using a!map() function, like so:

local!data: a!map(
    firstName: "",
    lastName: ""
)

I wanted to initialize the variable to be a map with two keys containing empty text strings. On the text fields, I wanted to access and save this data like so:

a!textField(
    label: "First Name",
    value: property(local!data, "firstName", null),
    saveInto: a!save(
        property(local!data, "firstName", null),
        save!value
    )
)

And it does not work. It just does not save the value - goes back to null, as If I could not save into the variable and initial empty strings were returned.

I tried using index(), but it failed as well.

May I ask for some help on this one?

  Discussion posts and replies are publicly visible

Parents Reply Children