Custom states and button

I want to make a connection between a button and an input. The button must create a series of random characters and insert them into the input next to it. Can you tell me how to do it?
I created a custom states for my input and created the creation of the random character string in the workflow but I don’t understand how to make that appear. Can you help me ?

When the button is clicked, set states to a series of random characters.
Set initial content of the input to the state.

This is what I created, but it doesn’t work…

Try removing the empty spaces in your initial content

I can’t delete them, they are automatically installed if I add dynamic data

Then try removing the input and creating a new one. I don’t know if the empty space has an influence, but there shouldn’t be any empty space. When I test the function for myself, it works.

Damn, I’m going to try another manipulation, it’s very strange, thank you for your help