Add value to a textfield from another entity/table

Hi,
I wish to autocomplete an textfield and datefield component with data from another table.
Where I can found an example?
Thank you!

Hi,

Could you describe in more details your needs? It’s hard to suggest something without context and details.

Regards
Gleb

Hi Gleb,
I thing for this job I need two valueCollectionDatatsource everyone with corespondent query.
I attache scree capture with this dataTermProiectDS
and
tarifProiectareDs
result from this query I need to appear, to be write in an textfield (tarifProiectare) and datefield(dtaTermProiect) from Edit page
Layout
If is need it an Service from Middleware, haw can use this?
Maybe exist another solution to take a query result into an component (textfield or datefield).
Thank you in advanced.
Regards,
Florin

What you need can be achieved with the help of the SuggestionFeild component, see the docs and demo.

Regards,
Gleb

Thanks Gleb,
but not wish SuggestionField component.
I try it with funtion scotDataTerminProiect() but I got this error
“ClassCastException: com.haulmont.cuba.core.entity.KeyValueEntity cannot be cast to com.company.gaz.entity.NotificareOsdAtr”
This is Controller file
Controller

Make sure that the type of suggestions returned by the SearchExecutor is the same as the Field value type.

Thanks Gleb,
But I found a solution.
This is may new valueCollectionDatasource for dataTermProiectDs
dataTerminProiectDs_2
and my new function
Controller_2
If exist a another elegant solution, I am here to know, because I am not a programmer guy. This is my first project in java.
Regards,
Florin