Is primary, secondary, tertiary etc. sorting possible on qooxdoo tables? - qooxdoo

I can't find any info on this in the qooxdoo documentation (currently on version 4.01 for various reasons), so I'm assuming it is not supported out of the box. Has anyone been able to implement this using qooxdoo, or should I use some other third party table control, or perhaps implement one myself (which I'd rather not)?

I've not seen any implementation of multiple column sorting in qooxdoo yet. What I've done is an implicit multi column sorting with the remote table model, where, if a user selected to sort on column A also sorted on column B, in sql terms "order by A, B"
An implementation for multi column sorting would be very welcome.
Please join us on https://github.com/qooxdoo/qooxdoo/ and https://gitter.im/qooxdoo/qooxdoo

(sorry my bad english) Hi.
This is a very old humble example (adapted) of 'my own' multiple column sorting implementation.
Use the table and lists context menus, generate a few sort formulaes, then return to table context menu to select the sort order. (Change the data table for convenience)
Maybe you can get some new idea or some perspective.
Playground example

Related

Implementing tag system with multiple tables

I am trying to implement tag system similar to one which StackOverflow has. Obviously I've read multiple articles including this answer.
However my scenario is little bit different
there will be limited amount of tags which can be only created by user with higher privilege (anybody can assign a tag there). This excludes option #1 (from SO question I linked above, each tag is inserted directly into the tables tags column and then it's queried with LIKE) I guess
there are also multiple tables in DB which can be tagged (currently five)
Especially second criteria makes it harder so these are my thoughts
I could follow option #3, have table tags and have M:N relationship with each table. However that would make searching harder (imagine that join if the table number grows) and also I need to tell which table (application module) matches the tag in a search result
I could use some kind of polymorphism but I am pretty new to this concept regarding to the databases so is this something which fits to this problem well?
I use newest version of PostgreSQL.
Since you are using PostgreSQL, you have the option of some field types which aren't available for other databases. Particularly, arrays and JSON fields. I did some performance comparisons of the various methods in a blog post. Arrays and JSONB were definitely better options than a tags table for any search which needed to combine multiple tags.
Given that, I would recommend creating a tags column for each table on which you want to have tags, either an array or a JSONB column, depending. If you need to search over multiple tables, I'd suggest a UNION query instead of having a single monolithic tags table which joins to everything.

How can I sort a table in Datastudio by multiple columns?

I have a report in Datastudio that consists of multiple columns. I'd like to sort the rows based on multiple columns. Is it possible to do this?
The sorting is limited by 2 columns. In the Table Properties-Data pane pick "Sort" and "Secondary Sort" options for primary and secondary sorting.
As noted by Elena, Tables allow editors to set a default (Primary) Sort and an optional Secondary Sort.
In addition, while in View Mode, users can also sort the Table as required, by either tapping on the respective field header, or by accessing the Sort Drop-down in the Chart Header.
Google Data Studio Report and a GIF to demonstrate:
As previous answers have stated, it looks like Data Studio only supports two sort fields.
You can create a calculated field on the secondary sort, which concatenates together the 2nd and subsequent fields on which to sort by, to approximate sorting on more than two dimensions.

How to make title sortable with two different tables whose data coming from same model in cakephp?

I have a view showing two tables which data is coming from same model but based on different column status I divided in 2 tables. Problem is, when I click on top table's column name heading for sorting, it also sort the bottom tables. I'm wanting the bottom table data won't sort when I click on top table column heading title. If any one have a good solution, would highly appreciated.
This highly depends on your setup, but you're going to have to do some custom code.
For example, don't allow Cake to sort for you. See what the links look like when created by Cake, then write your own, and include an additional variable &table=1 or something.
Based on the sort variable and the table variable, build your pagination options for each including the correct sort you want for each group separately.
Another option (depending on how large your data sets are) is to use javascript datatables.

google refine: use facet tools to infer map between two columns

I've been searching but haven't found how to do this in refine.
I've got two columns of unique IDS. For each a in A, I want to find the top 10 closest matches in B.
My backup plan is to just use Levenshtein to iterate ... but Refine has such a nice iterface and many more algorithms implemented that I was hoping to be able to do some of the work using it.
Or is there another tool for doing this?
Did you know you can use clustering algorithm like fingerprint or ngramFingerprint (source) out of the clustering interface in Refine?
Using you IDS field, create a new column based on this column with the following expression: ngramFingerprint(value)
You can now cross with your other data set on this new column. This might help to get more matches.

MS Access 07 - Q re lookup column vs many-to-many; Q re checkboxes in many-to-many forms

I'm creating a database with Access. This is just a test database, similar to my requirements, so I can get my skills up before creating one for work. I've created a database for a fictional school as this is a good playground and rich data (many students have many subjects have many teachers, etc).
Question 1
What is the difference, if any, between using a Lookup column and a many-to-many associate table?
Example: I have Tables 'Teacher' and 'Subject'. Many teachers have many subjects. I can, and have, created a table 'Teacher_Subject' and run queries with this.
I have then created a lookup column in teachers table with data from subjects. The lookup column seems to take the place of the teacher_subject table. (though the data on relationships is obviously duplicated between lookup table and teacher_subject and may vary). Which one is the 'better' option? Is there a snag with using lookup tables?
(I realize that this is a very 'general' question. Links to other resources and answers saying 'that depends...' are appreciated)
Question 2
What attracts me to lookup tables is the following: When creating a form for entering subjects for teachers, with lookup I can simply create checkboxes and click a subject for a teacher 'on' or 'off'. Each click on/off creates/removes a record in the lookup column (which replaces teacher_subject).
If I use a form from a query from teacher subject with teacher as main form and subject as subform I run into this problem: In the subform I can either select each subject that teacher has in a bombo box, i.e. click, scroll down, select, go to next row, click, scroll down, etc. (takes too long) OR I can create a list box listing all available subjects in each row but allowing me to select only one. (takes up too much space). Is it possible to have a click on/off list box for teacher_subject, creating/removing a record there with each click?
Note - I know zero SQL or VB. If the correct answer is "you need to know SQL for this" then that's cool. I just need to know.
Thanks!
Lookup columns in tables will cause you more stress than joy. Unless you need them for Sharepoint, they should be avoided. You may wish to read http://r937.com/relational.html and http://www.mvps.org/access/tencommandments.htm
I wouldn't use them. Your example is fine, but there are limitations. What do you do when you need to reference another field from the Subject table other than the name? How would you differentiate subjects that are only offered on a semester basis?
You have no way of getting a count of how many subjects each teacher is assigned without some ugly coding.
Another limitation, is when you start identifying who taught what courses during a given school year.
I'm kind of unclear on your second question, but it sounds to me like you need a subform with a dropdown list.
If you want to do the checkbox thing, it quickly becomes a lot more complicated. To me, you're starting from user interface and working backwards to structure, instead of going the other direction.
I hesitate to mention it, but in terms of full disclosure you should know that in A2007 and A2010, you have multi-value fields available, and they are presented with exactly the UI you describe. But they have many of the same problems as lookup fields, and are quite complex to work with in code. Behind the scenes, they are implemented with a standard many-to-many join table, but it's all hidden from you.
I wish MS would make the listbox with checkbox control that is used with MV fields available for all listboxes, but binding that to a many-to-many join table would be complex if the listbox control were not designed for that (with link child/link master properties, for instance).
I tried to come up with a way to offer you the UI feature you prefer from multi-value fields without actually using multi-value fields. That seems challenging to me.
The closest I could come up with is to load a disconnected recordset with your "List" choices and a check box field. Then create a form, or subform, based on that recordset which you present in datasheet view. It could look similar to a combo bound to a multi-value field. In the after update event of the checkbox field, you would need code to add or remove a record from the junction table as required.
However, I don't know if this is something you would care to tackle. Earlier you indicated a willingness to learn SQL if needed; the approach I'm suggesting would also require VBA. Maybe take a look at Danny Lesandrini's article, Create In-Memory ADO Recordsets, to see whether it is something you could use.
OTOH, maybe the most appropriate answer for you is to keep the multi-value fields and get on with the rest of your life. I'm stuck. But now that we know you are actually using multi-value fields, perhaps someone else will be able to offer you a more appropriate suggestion.

Resources