Want to set control value to multistate button

I am using multistate button on screen and I want to set the control value to the multistate button from different screen.
According to control value I need to set embedded view path.

In above image there is search button, from that search button I am passing controlvalue through message handler but it is not receiving on main screen.
also I have tried by passing parameter from popup to main screen,still it is not working.
Whats wrong here?
Please help.

any idea or suggestion for this?

a messagehandler should work, can you show me how you use it?

From Serarch button click, like below I am passing selected value parameter

And on message Handler I am passing payload value to the controlValue of multisate button. Here 1st line print also not working, means it is not calling this handler.
This Handler is on root of main screen.

So I presume “calling Handler” and “calling Handler complte” are printing but not the prints inside the message handler?


Oh, I see the issue. You’re closing the popup before the script finishes. You need to close it at the very end. The thread terminates (I believe) when the View terminates

initially it was at the end still it is not working,so I moved it up, I thought after closing the popup, back screen will be in focus and handler will get the call.
again will try by closing at end.

Still not working.

I think you need to import sys in your handler. I can see it referenced in the very bottom of your screenshot. Probably not your issue though…

No, still not working.

:man_shrugging: This works for me MessageHandlerTest.zip (6.2 KB)