Assigning Data to TextInput Component From Query

Greetings,

I have a drop down where it gets prepopulated with the getProjectName query upon a trigger it executes the getProjectEmailDetails query that is filtered on the project name selected and returns an email address. I want the email value from the database for the project selected to be assigned to textInput8. I've done this through "Default Value" for textInput8 by referencing {{(getProjectEmailDetails.data.client_email)}}. No value shows up on trigger from the drop down in the text input component unless I enter some random string character before and after the Default Value as shown in the attached pictures. How else can I repopulate the textInput8 component without having to enter a random string character that is visible...

Thanks ahead of time.


Hi @Keyvan - welcome to the forums. You can handle this in two ways. One is to create an event handler that changes the value of textInput8 when the value of the drop down changes:
image

The other option is to add textInput8.setValue(getProjectEmailDetails.data.client_email) to one of the scripts that you are using in your chain of events.

I'd recommend you try the first approach which should work fine for what it sounds like you are doing.

Good luck!

Thanks John, so I'm able to update the textinput through the dropdown's trigger. but the issue still persists. I have to include some sort of string before or after like so

{{ getProjecDetails.data.client_email }}.

to have the values show up.