Setting the value of a custom state in a Reusable Element, to the value of another RE

Hello community.

So I am having issues trying to set the value of a custom state of my Reusable element, to the value of another RE.
Let me try to explain:

We have a RE for the user to choose a workshift, which we use across our app.
We’ve created a CustomState, so that when the element loads, it will automatically set the CustomState of the RE to the first item in our SQL dbo (which is “Day” in this case). This makes the shift preselected to Day when the page loads.

Now, thats all OK, but the issue is when we want to edit this after a registration has been made. We are using a selectquery to fetch all the information for the registration based on UUID from our dbo, which works. However, we’re unable to make the workshift RE preselect to the workshift being fetched by the selectquery. This works if we do not use a reusable element, but as we’re trying to set the custom state of the workshift RE to the value (UUID’s Workshift)from another RE(the table/row with the registration), we’re unable to make it accept the value.
We have also tried using a selectquery directly in the workflow for the Workshift RE, using the UUID from the Row, but we’re unable to make it accept that one, also.
Screenies for reference:
The Row:

The Workflow:


Just to show that “Row” is not an option. Best case would be to be able to set the value to Row’s dbo_produced’s Workshift…

Any help appreciated here.
I think we might’ve gotten stuck in a corner and have become blind to the obvious approach. We have also thought about URL parametering, but afaik that wont work unless we actually change page, which we dont in this case. The edit is a pop-up…

Best regards.

This topic was automatically closed after 70 days. New replies are no longer allowed.