Updating local variables on keypress

What I want is for the input field to take in the value, and as soon as it does I want to capture it, and then clear the input. I have the following code for a barcode reader. As you can see, I'm setting the value of my local back to null at the end of all saves. I've checked the value in it and it seems it is setting the value to null. However, the value on the input field itself does not disappear unless I remove focus from it. So if I enter something new into it will append it to instead of replacing it. Is this behavior expected? if so, is there a way to accomplish what I'm trying to do?

a!barcodeField(
label: "Scan Badge",
placeholder: "Badge Number",
value: local!badgeNumber,
saveInto: {
local!badgeNumber,
a!save(ri!briefings, 
append(ri!briefings,
'type!{urn:com:appian:types:HRA}HRA_Briefings'()
)
),
a!save(local!badges, append(local!badges, local!badgeNumber)),
a!save(local!badgeNumber, null)
},
refreshAfter: "KEYPRESS",
showWhen: local!entryMode = cons!HRA_TXT_ENTRY_MODE_SCAN,

)

Parents Reply Children
No Data

 Discussion posts and replies are publicly visible