Overwrite existing variable by appending a string to it

It is possible that at present it is not possible to do something like the following?

Essentially I want to keep adding to a text variable… This step is triggered through an event of a custom widget. When I add a message action before or after the store command, the messages are firing as expected. When I just write a single string to the target variable that text is shown…

Only if I want to keep adding to the same variable (i.e. overwrite its old state) in a single step via an expression nothing happens. The resulting variable will just stay empty.

Use-case: I want to give the operator a better visual indication that something is still happening which the custom widget loops through several records. Each loop is triggering table actions which cause a processing delay. If I update the state variable directly from within the custom widget it is immediately filled with the entire loop as the custom widget event firing mechanism at present will not wait for the last event to be processed. Instead, it just fires all event in succession and the processing is then queued as part of the event queue - so it seems… To work around this behavior, I reverted to the presented alternative route.

In theory this should allow me to update the state in sync with what is actually happening in the background with the table triggers… but, well… it doesn’t unfortunately as explained.

I thought I could be smart about it… well… no… also does not work.

So… this works…

:roll_eyes:

Actually, I am missing a matching smiley for it.

It made me think of this, Ongoing Comment Log but I think you want something different

Hi @mellerbeck , you might be onto something here… could it be that the problem is the initial null value of the text which is not playing well with a concatenation? Checking this out…

:crazy_face: :rofl: … ok… so this actually works :smiley:

Thank you @mellerbeck ! That ref helped find a better but still somewhat awkward solution.

Yeah I think concat to null could have a problem, need to force it to a string (or start with an empty string)

Thats exactly what I came up with :sweat_smile:
I was just a bit slower…

The issue is, that TULIP cant handle a null value correctly (as @mellerbeck guessed).

empty strings need to be initialized. Alternatively you could set it to ‘’ (empty string) on step enter (if this does not corrupt the use of the variable.