How do I set value to an input field based on the selection of dropdown widget?

Here when I choose client name I want fill out the client id from database.

I tried using this code but client id not assigned to input field :

(function () { storeValue(“cust_id”,cust_id.selectedOptionValue);;
intID.text =;

@Ginjo I’ve posted a sample app package for you to download and import to check out how to do this. Also, here is the working example to play with: Appsmith
Let me know if you have any questions.

Yes it worked , but error showing for client id’s evaluated value as : This value does not evaluate to type “string or number”.

@Ginjo please export and post your sample app so I can troubleshoot the error. Thanks.