Sorted Valuelist no longer Distinct in Servoy 6.1

I have a sorted Servoy 3 Valuelist now upgraded to Servoy 6.1, that uses Table Values and a single text column, returned using a Combobox

but it now shows all rows. If I remove the sort, it is distinct again ( but not sorted )

very odd, since the sorted Valuelist worked in Servoy 3. What changed ?

there are less than 500 distinct items

Note: if I turn on query logging in Sybase for the source table, I see no query to populate the Valuelist. How does it stay updated ?

greg

can you make a case for this so that we can look into this
I think it is weird that we are distinct when not sorted and not distinct when sorted, we should be at least be one of the 2 on both

ok, case created

Just for info, how does Servoy generate a Valuelist ?

I was hoping to see the underlying SQL query in the Sybase Log

greg

that completely depends on what kind of valuelist it is, if it is just plain table with nothing else it is loaded through a foundset so you should see a foundset query on the performance tab in the admin pages

Just for info,

My case was never resolved. I don’t think they understood this was a problem specific to Sybase

greg

I reported something similar back in March 2013:

https://www.servoy.com/forum/viewtopic.php?f=3&t=19474

In the thread, Ken Keen has a suggestion that may work for you.

You and Ken report the DISTINCT problem in 6.1, but I came across the problem in 7.1. Perhaps, the problems are related. I never did get resolution to the problem. Please post back if you find a workaround.

Thanks. My valuelists are now all custom, and generated by queries, so no longer a problem

However, when we upgraded to Sybase 9, I did change all my “Distinct” queries to “Group By”. It just worked better

It seems Sybase did change with Version 8

http://sqlanywhere-forum.sybase.com/que … s-group-by

greg

In the servoy.properties file, I added the line “servoy.server.setFetchSize=false”, and it does work now

However, “Return in Dataprovider” is still broken. The Valuelist returns ALL columns ( if more than one is selected )

greg

We have a setting that can be set in servoy.properties: servoy.server.setFetchSize=false this will prevent the setFetchSize() call.
Since setFetchSize() is just an optimization hint to the driver this does not have any other effects.

Greg,

If skipping setfetchsize helps it is a bug in the driver/database.
Try updating to a newer version, sybase 9 is already very old.

The return-in-dataprovider issue does not seem to be db-vendor related.
Are all columns (concatenated) assigned to the dataprovider?

Rob

yes, all columns shown in the Valuelist are returned in the dataprovider, concatenated

whether “return in dataprovider” is checked, or not

and we are now on Sybase SQL Anywhere 10.0.1

greg

The return-in-dataprovider issue does not seem to be db-vendor related.
Are all columns (concatenated) assigned to the dataprovider?

Greg,

Please file a case with a small sample solution attached.

Rob

Correction: all columns shown in the Valuelist are DISPLAYED in the text field

If I “show” two columns, and return one in dataprovider, it does work … but, the field then DISPLAYS both columns

I would like to “show” two columns in the Valuelist, return one in dataprovider, and have the text field display it’s contents normally ( like FileMaker )

greg

that is not possible, the text field (or combobox) shows what is in the valuelist (so a concatenation) if you want more sophisticated popup you can use the plugins.window.showFormPopup() method where you can show anything you want in a listview/tableview. (then make a textfield and a button just besides it where the button onclick shows the formpopup)