Sorry this will seem very basic but could someone point me in the correct direction.
In FoxPro you can setup a number of indexes that can also have functions within them and then elect to order the table by that order, I’m unsure how to achieve the same within a Servoy Form.
At it’s most basic level all I’m trying to achieve is a form with a table view of some descriptions but for the order to ignore the texts case (ie order in Lower Case)
Currently:
This is a description
another description
What I want:
another description
This is a description
I think that’s a database thing. Servoy will sort the table in the way the collation is defined in the database. You need to define the collation type in the database.
When you create a table, you can tell the database to ignore the texts case (define the collation). In MySQL you can do this:
CREATE TABLE test.test (
tablename_id INT,
tablecolumn VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci
) ENGINE = InnoDB ROW_FORMAT = DEFAULT;
Note the _ci in the COLLATE statement. This does the trick. _ci (is case insensitive), _cs (is case sensitive), or _bin (is binary).
I put your example string in a solution I’m building, and this how it looks:
[attachment=1]Capture.GIF[/attachment]
[attachment=0]Capture2.GIF[/attachment]
Hope this help.
You should be able to change the collation of a table. In MySQL is something like this:
ALTER TABLE database.table CHARACTER SET latin1 COLLATE latin1_general_ci;
Or
ALTER TABLE database.M-to-M_table CHARACTER SET utf8 COLLATE utf8_general_ci,
DROP FOREIGN KEY M-to-M_table_ref01,
DROP FOREIGN KEY M-to-M_table_ref02;
ALTER TABLE database.M-to-M_table
ADD CONSTRAINT M-to-M_table_ref01 FOREIGN KEY (table1_id) REFERENCES database.table1 (table1_id) ON UPDATE RESTRICT ON DELETE RESTRICT,
ADD CONSTRAINT M-to-M_table_ref02 FOREIGN KEY (table2_id) REFERENCES database.table2 (table2_id) ON UPDATE RESTRICT ON DELETE RESTRICT;
If you have problems changing the table collation because of indexes’ or keys’ constraints (but you should not), you always can change the collation of the column that you need to sort.