9.2 Sort Columns in a List

9.2 Sort Columns in a List

  
Hi! How can I make in aggregate, something like create an input parameter in simple queries ? I got stuck in this part of the lesson.
Danilo Santos wrote:
Hi! How can I make in aggregate, something like create an input parameter in simple queries ? I got stuck in this part of the lesson.
 
Hi Danilo,

You don't have to. Aggregates have access to the scope where they are defined. So for instance if you have an input on your screen bound to a variable you can create a filter on the aggregate that uses that variable. And, as you see in this video, if what you want is to create a dynamic sort than just choose the dynamic sort option on the sort panell and add the List_SortColumn_GetOrderBy function there. 
André Vieira wrote:
Danilo Santos wrote:
Hi! How can I make in aggregate, something like create an input parameter in simple queries ? I got stuck in this part of the lesson.
 
Hi Danilo,

You don't have to. Aggregates have access to the scope where they are defined. So for instance if you have an input on your screen bound to a variable you can create a filter on the aggregate that uses that variable. And, as you see in this video, if what you want is to create a dynamic sort than just choose the dynamic sort option on the sort panell and add the List_SortColumn_GetOrderBy function there. 
 Thanks, Andre! Got it!
 

Hi, I have also had some trouble on this lesson - is this due to the version I am using. When I followed the screen actions, at the end I had an error that led me to the High, Low and unclassified pages. Was it correct to then Create new actions in those web screens and apply the link? My program is not applying the sort - can you suggest I check anything else?
Hi kim,

I'm sorry but I don't follow you... :(
Can you share your module so that I can have a look? We currently have an issue that doesn't allow you to add an attachment when you post a question but you can edit your post right after you create it and add the attachment. To export your module for uploading here use Ctrl+S.
Kim, you can also try adding a breakpoint at the beginning of the action.
Try using the debugger to follow along the code execution, and understand what's causing the error.

At the point 4:13 min - when adding a new parameter. I am using version 9 and therefore do not have the same pop GetIssuesByPriorityId screen. I have double clicked and actually gone into the view and at the top the options that I have to edit are: Sources, Filters, Sorting, Test Values. I do not have parameters - how would I do the same task? Ill try and attach a screen shot now.
So I have managed to cerate an input parameter, however am unsuare as to where I need to type the function List_SortColumn_GetOrderBy() - can you please help with this?
Kim,

check here.
Most of the out-dated videos that use simple queries are still pretty easy to follow.  The difference in how they work isn't that big a deal.  The little notificaton is enough for most folks to not panic and realize that teir version is a little different and that's okay.

This lesson is the first one where I really felt lost trying to follow what was going on.  I made it work.  But the only thing the video did was teach me the syntax for the table and column.

Fantastic job over all in getting new folks up to speed quickly with this video series.  But if you're going to spend effort on new videos, this would be where I'd start.  It was confusing even knowing I was dealing with a different tool.
Hi Wiliam,

Thanks a lot for your candid feedback! We do recognize that this video and the following one are the tought nuts to crack. We have collected this feedback from different sources and we have delivered it to our R&D team. I'm sure this will become easier in the future. One thing you'll see up ahead in training is that there's actually an accelerator for you to get sort and pagination on a list in no time at all (here). This is usually what developers use to start implementing their list screens but you really need to know how the dots connect under the hood in order to implement or customize your own patterns.

Again it's great to receive awesome feedback like yours. Thank you very much!

Cheers
hi
while dragging sorting widget iam facing the following issue.
Error: 'Issues' found in 'Order By' parameter is an invalid Entity An internal error occurred and was logged. Please try again later or contact the administration team. Sorry for any inconvenience. outsystems
Hi sandeep,

I can foresee two potential situations that lead to this error:
  1. Check the Aggregate and make sure on the dynamic sort you are using the List_SortColumn_GetOrderBy function and that the syntax for the default order, the second parameter, is using curly and square brackets as explained on the video, e.g. {Issue}.[Id].
  2. Check the value of the Column parameter of each the List_SortColumn WebBlock and make sure you are also respecting this syntax.
Finally publish your application, close the browser and test again. Why close the browser? The value for of the order by is actually stored in a session variable so that it is kept between page navigations. If you have stored there an invalid value even if you have fixed it in the code you will still have an error in the application. Closing the browser and opening it again ensures that you have a new session and therefore the invalid value is not stored anymore.

Cheers