Recalling data captured from Z.prompt


OK. I am using Z.Prompt to capture some data. Right now there is a button that the user will press to pull up that prompt. They enter their team name then the button disappears. When they enter the team name I want to pass that value over to another text item in the hierarchy.

So my flow here would be press the button, enter team name when they press the ok to close the text prompt the value they entered populates the blank text item in the hierarchy. Attached is the example file I am using at the moment to figure this out.

I’ve read through the documentation and I’m just not sure what I should use to call the entered text (retrieve maybe??) and I’m not sure where that code might go. Can anyone point me in the right direction on this or explain the process a bit more?

Many thanks in advance. PersistantData_Example.zpp (245.8 KB)


Hi @destery,

Try listening for the ‘done’ event instead of ‘confirm’.

myprompt.on("done", (name) => {

That should fix things for you :slight_smile:


Many thanks, @deimantas!