Sorting Widget Tutorial

Sorting Widget Tutorial

Hello all,

Download the solution

Attached you'll find a zip containing a tutorial video and the source eSpace for the Sorting Widget.

Zip Contents:
  • SortingWidgetTutorial.wmv - the tutorial video
  • Sort.oml - the tutorial's source eSpace


Not only this is a great widget (I hope it is browser compatible) but the video is a great idea to teach how to use it!

Now you need to teach us how to do those neat videos!



thanks for this great widget! Big two thumbs up!

Very nice and very easy to use.

I'll use it everywhere from now on.

Excellent Work!

Thank You
Hello all,

I have a situation here!

I want to call the context-menu by clicking a link instead the right click in the column name.

How to do this?

Hi Sérgio,

To do this you'll need to edit the script expression in the sorting widget webblock and add the following line:

document.onclick = contextMenu._show;

Add this just after the contextMenu.attach line.

I think this should do the trick but I didn't test it so....

I found a problem, normally at table record records, for each row i create some links to edit the record, to remove the record or some cases to take more detailed query. However with that extra column the sorting widget doesn't work, when i remove that column works.
That's a great widget, very useful, with that small problem, maybe in a future version will be possible to correct the problem.

Nelson Inácio
Hi Nelson,

The problem is your configuration of the widget. You must reserve a space for that column in the sorting widget's column string's. For instance if you have a table with Name, Email and a third column with actions you'd configure the sorting widget with:
"{Contact}.[Name],{Contact}.[Email]," <- pay attention to the trailing comma!!!
"Name,Email," <- also here! remember that the strings must match in number.
Hi André,

Thanks for You answer,

But I want to do something in my application. In this environment I cannot change Your Sort Widget script.



does Sorting widget works fine in client tabs tablerecord?
i have tried in IE and right click doesn't work...

any idea?
The problem seems to be 2 sortings in the same page. the right click stops working.

any idea how to fix it?
Hi Diogo,

Are you using the latest version of the sorting widget. I have been able to put more than one sort widget in one webscreen.

Check the Version History of the solution
Yes I'm using the last version.

I tried in IE and FF and just the sort link works. right click doesn't...

I tried with tabs, without tabs never works with right click with 2 table records with 2 sorting widgets in same page...
Hi Diogo,

Try putting the widgets at the end of the webscreen, instead of inside the tab container.
I'm affraid that this isn't completely supported though.

When I have time I will review this widget to support the upcoming version 4.2 and also this scenario.
Hello Andre,

I Tried to put widgets at the end and now just the first of then works...
Hello again André

How can I order something by two columns at same time? in oracle is SQL is ORDER BY first, second by with widget the "," is used to separate columns... so it will think that I have one more column.

thanks in advance
Hi Diogo,

I didn't fully understand your question. Nevertheless the Sorting Widget supports up to 3 column sorting at the same time. This is donw through context-menu on the table header's links.

I hope this information was helpful. Cheers,

when I click over the table header I want to sort by 2 arguments.

The sorting widget supports 3 order parameters, when you are on the screen, right click on one of columns and will appear a menu where can select the order parameters and then click sort.

Nelson Inácio

Not with right click. I want to do it with left click.
imagine when i right click over table header Name It will sort by Name, LastName

There is an action at sorting widget SetOrderBy at the query create two parameters and add both to the orderby.
On the first parameter use the function getorderby function and at the second parameter use the function setorderby to define the second criteria.
I don't know if that works, but there is another idea.

I think I got you question. I'm not really sure about its usability though....

For the example you show I guess the solution would be to have an advance query with a composite column Name + LastName and to use an alias like so:

select {User}.[Name] + ' ' + {User}.[LastName] as FullName
from {User}

For this query you set the alias in the column string "FullName" instead of "{User}.[Name]"

I hope this helps, Cheers