Dropdown Population

Good Day all,

Just want to ask if I am missing something obvious, as always your help would be appreciated

I am trying to populate a dropdown with items that are specific to the user. (Truck Registration)

In the image below the table contains a property called customer, we have vehicles related to customers.

Here is the logic I have used on page entry


with a custom function to get Customer

with the data binding to the option logic.

not sure what I have missed.

But thank you in advance.

Kind Regards,
Raymond

Hello @Raymond_Woodley

Does the logic you have constructed work for you?

Regards,
Inna

Hi @Inna_Shkolnaya,

Thank you for your response, no it’s not retrieving anything at the moment.

from the pics there are two vehicles available but neither are reflected by any users.

Regards,
Raymond

Yes, I can see the problem. Unfortunately, your whereClause for the table is wrong. Your whereClause should pass the following data owner.objectId='objectId'

I think the following should help you. In the get Customer function, you need to return objectId. Monosnap
Monosnap

Regards,
Inna

Hi @Inna_Shkolnaya,

No Joy yet


As always your help is appreciated.

Regards,
Raymond

I recommend that you read the following article.

Also, you have Label and Value capitalized and should be in small letters.

Regards,
Inna

Hi @Inna_Shkolnaya

My problem was not related to anything related in the article, the problem I have discovered is due to the values I require in the Owner column are a relation to another table, thus not a string. How can I structure the where clause to convert the relation data to a string, because I am certain then my problem will be resolved.

Kind Regards,
Raymond

Hi @Raymond_Woodley,

is there any chance that there is no value in the Company variable? Have you tried to print it in logs (using the print block)?
Also, you can check what data you retrieve from the table by putting the result in the variable first and then printing it too.
Could you please let us know your results?

Regards,
Stanislaw

Hi @stanislaw.grin

I have simplified things for now to try find the issue. I am not retrieving anything from the owner column in the vehicles table, but can receive string from any other column for instance make.


image

is there a syntax that i must use to reference the relation(which is a link) converting it to string.

Kind Regards,
Raymond

Yeah, in the Load Table object block you can see the relations input. Put there a create list with Owner (just like you did it for the sort by field, but with the Owner value inside).

Keep in mind that full user object in the Owner property will be returned

Thank you will give it a go