Value List Possible Bug

Hi, I do not know if this is a bug.

I have a table where one of it´s fields is a PK to another table and I want to show a calculated field from that table.

What I have done is create a field element whose dataProvider is the PK field in the related table (customer_id) and assignedd to the valuelist property vlCustomerType.

That value list is based on Table Values: gscrmdepor.customers and the definition returns the customer_id in dataprovider and a calculations in Show in field / list.

The calculations check the field customer_type in the customers table and depending on the value returns an image.

What I get is the customer_id not the calculation result. If I change the Show in field/list to a real field in the customer table, for example customer_name, it shows the name.

Is this a bug or am I doing anything wrong?

Thanks.

what kind of field is being used there? A TextField?
is the calculation stored? or unstored?

why don’t you use a relation for this?

Hi Johan.

It a TEXT-FIELD and the calculation is unstored. It´s just a function that checks the value of a field and returns an image depending on the result of the checking.

Te reason not to use a relation was given by the Servoy Begginers Hand Book, where it says that it´s better to use a value list than a relation, just a performance issue.

Any way I will try with a relation, but would be great that the value list way could work.

But you said that the calculation returns a image?
So does it really return binary data? how should that be displayed?

but the probem is that typeahead fields (what you have in this scenario, textfield with valuelist) doesn’t really support unstored calculations and it really doensn’t support none textual columns.

OK. I got the point. I will use the relation.