I have a relationship with a global as the primary key which I’m using to generate a value list. If I use this value list on a Combo Box, it works fine. But if I change the display type to Type Ahead, it now fails.
Why is this? Is there a workaround? I’m using Version R2 2.1-build 310.
this is a small bug yes.
You can work around it to set the sort order of the valuelist to the same thing what you display (that you should do anyway).
I will fix it that it will always sort the column that it also displays/selects
jcompagner:
this is a small bug yes.
You can work around it to set the sort order of the valuelist to the same thing what you display (that you should do anyway).
I will fix it that it will always sort the column that it also displays/selects
Perhaps I’m misunderstanding. In the small sample I set the valuelist to sort by the company_name field. Only change I made. The type ahead drop down still doesn’t appear. Did the same in my main solution, same non-result.
jcompagner:
if i order with company_name it works fine at my place
Your test sample also works here. But I can’t get either my own test or my solution in development to respond. Sorting appears to be set up identically in both your and my versions. Utterly bewildering.
jcompagner:
and that is just the test solution you send me?
That one wasn’t sorted when i got it. I only changed the sort.
Do change the sort once (remove and then add it again)
In the original test solution I posted here I’ve set the sort and it works.
In my actual solution I’ve made various attempts to shake it loose. Built two identical new value lists, set the sort, works with Combo Box, doesn’t with Type Ahead. Remove the sort, reset the sort, still doesn’t work. Sigh.
jcompagner:
what does youre .log.txt say?
Do you have there errors (sql errors)
or else start with -DSTACKTRACE=TRUE and show what happens when you type in youre TYPE_AHEAD field.
Unsure how to interpret .log.txt, therefore have ignored it thus far. Is there documentation on its use?
Unsure how to set up “-DSTACKTRACE=TRUE”
Starting Servoy from C:\Program Files\ServoyServoy R2 2.1 build-310 on Windows XP using Java 1.4.2_04Looking for servoy.properties on C:\Documents and Settings\Morley Chalmers\servoy.propertiesLoading servoy.properties from C:\Program Files\Servoy\servoy.propertiesLoading - DoneUsing RMI registry on port 1099com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -854: Function or column reference to ‘company_id’ in the ORDER BY clause is invalidcom.sybase.jdbc2.jdbc.SybSQLException: ASA Error -854: Function or column reference to ‘company_id’ in the ORDER BY clause is invalid
log.txt file is just a txt field where errors are logged. You don’t have to do anything with it besides posting the contents if you have some errors.
But from youre quote:
“Function or column reference to ‘company_id’ in the ORDER BY clause is invalid”
That is the error you get yes. And you are REALLY not sorting on the right column! Because it still generates a order by with the company_id. This can’t happend if you set the order by to the text column that you also display.
jcompagner:
you are REALLY not sorting on the right column! Because it still generates a order by with the company_id. This can’t happend if you set the order by to the text column that you also display.
Don’t think so. See attached.
By the way, that quote was just one of a variety of lines from .log.txt. That was the first time I’d ever opened that file, first time looking round it. The quote was a sample.
jcompagner:
then i don’t know currently what goes wrong with youre solution.
I have to see it myself.
Do give me the exact error you get when you are typing the first char in youre field.
Never an error. The Type Ahead drop down never appears.
I have a Combo Box that works just fine. If I change it to Type Ahead the drop down list never appears no matter what I type. I’ve actually got three such fields, each with separate value lists, each constructed identically, all working fine when set as Combo Box, all failing to work when I switch the field to Type Ahead. I have one layout with all variations on the same screen.
I’ll prep files and notes and upload them later today.
ok i have seen the problem now.
Because you use one relation for multiply valuelist the relation is already loaded and sorted for one valuelist but not for the other.
For this you do need 2.1.1 to fix it. Then it will always sort on the column you search on (and show)
This bug appears to have returned somewhere along the line. I’m using 3.1.5 and I have a valuelist based on a global relation and a second n-m relation. It works find as a combobox, radios, checkbox, but doesn’t show up at all as a typeahead. I’ve tried the ‘re-sorting’ workaround JC suggested earlier in this thread - no change.
I have submitted a case to the support system. Let me know if you need a sample solution and I can try to put one together.
007-07-07 16:43:19,680 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - select distinct patients.patientsid,patients.lastnamefirstnamecity from user_office_link where user_office_link.users_id = ? and patients.patientsid = ?
2007-07-07 16:43:19,680 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - ASA Error -142: Correlation name ‘patients’ not found
I am having this as well. It simply lacks a table in the statement. Are you using a value list that shows lastnamefirstnamecity and returns patientsid? If yes, it’d be great if you could send a sample solution to the support system. I have the same wrong SQL with one value list and am unable to reproduce this for a sample. It’d be cool if that could be fixed.
In my case it’s a value list using a N:M relation. I suppose, yours is like that?