Pass the connector result to App input drop down list options

Hello,
I already created one DB connection and get the result from as an array which could display in the app. Meanwhile, i also created an dropdown list as option for input in the app.
May i know how to build the link and let the connector result to App input drop down list options…?

For example, i have below 3 department name, i need convert them into the dropdown options. Then i could choose them as input…
image

Thanks in advance!

1 Like

hello @Ruijia, welcome to the Tulip Community!! it would be great if you could introduce yourself at: Welcome to the Community, let's meet!

regarding your question, on the Dropdown Single Select, Options > Variable you can assign it to the to the Array you have returning from your Connector Function:

as a note this does need to be a Text Array:


are you seeing this as an Option on your App?? let us know!!

Hi @Ruijia,

I believe you can add one additional trigger action when you’re running that connector function to use the MAP_TO_TEXT_LIST() expression. This can help map to a text array, which is what the single select widget is looking for. Looking at your screenshot, I believe you’d set this up by saying MAP_TO_TEXT_LIST(@variable, 'DEPARTMENT_NAME') where DEPARTMENT_NAME is your key (name of the column).

Let me know if that works for you!

Thanks,
Grant

Hello Grant,

Maybe I take some grammar mistake when use the function… what I done,

Thank you Gio for your swift support!

I am new for Tulip and just get company sandbox access try to build my personal app.

I think I met the same issue which you mentioned in the https://community.tulip.co/t/tip-of-the-week-getting-started-with-arrays/2406/2. But unfortunately, all your suggestions and Ermingut’s solution not working in my end… maybe I took some mistake when use the syntax…

I put all the captures from my end when replying Grant in an separated mail. Hope you could help me to point out the syntax error point…?

Thanks.

Can you try using “Department_Name” instead of “DEPARTMENT_NAME” in the MAP_TO_TEXT_LIST and report back? It may be case sensitive.

Thanks!

Hi Grant,

Yes, I change it to same as field name ‘Department_Name’ and follows step by step as https://community.tulip.co/t/table-records-in-a-select-option/867/4?u=ruijia mention, but still no data come out…

I was assuming it’s because of the data type different…? The only different my test is the data from table, but the example is from HTTPs output.

Not sure if have debug function to see how the data transfer and where it is… Thanks.