Populate select box initial value

i’ve got a datatable, bound to an entity selection. when i select an element from the table, i’d like a select box’s initial value to be a value from the row i selected in the datatable.
i can do that with a text component that is not in a select box (toggling the datasource), but once that text component is inside of a select box, no bueno. we would still need to have the text component take something like $This.name from the select box’s datasource.

Hello Mikey,

The first step, you should give an initial value for the entity that represents the selected element of the datatable of all the users (in the screenshot below, the entity is “user” and has the first value by default):


The second step, when onloading the page, you need to copy that entity to another entity which represents the selected element of the selectbox (in the screenshot below, the entity “selUser” is the selected element of the selectbox that also contains all the users):

And the last step, do an “OnSelect” event on the datatable in order to copy the selected element from the datatable to the selected element of the selectbox once you select a row:

I hope that this opinion answers your question.

Best regards.

the entity isn’t being pre-selected. the user has a list in the datatable, and then they select an entity from the list. it’s a value from that row that i want to populate the select box with.
i can do that with a normal text component, but not with a text component that is in a select box.


For the step 2, we had a bug. The selected element was not reflected after the copy action.

It has just been fixed.

@Marie-Sophie is there a new released version of QC?
i’m not sure how that answers the question

any more suggestions on this?


I am not sure to understand what you are trying to do.

Would you have screen shots ?

Thank you.

i also talked to @ayoub about this, on our call, yesterday. he thinks there is a bug in the framework.

in this second screenshot, i have a text component that is bound to the entity, for the purposes of demonstrating this issue. when i select the row in the data table, the entity’s “to” attribute populates the text component. i have a similar text component inside of the select box component. i would like it to display that same value (but it does not). FWIW, the datasource for the select box is a list of ship-to locations. if i select one, it displays in the text of the select box, as i would expect.

this has not been addressed, yet, right?