RichWidgets List_SortColumn instructions

RichWidgets List_SortColumn instructions

  

I hate to admit it, but I'm getting a little lost trying to implement the List_SortColumn function from the RichWidgets extension.  Does anyone have an example or a set of instructions on what is needed to make the system allow user's to sort the table by column?  I tried adding the widget to the table column like it says to do, but when I run the project, the column header isn't selectable so I can't check to see if I've gotten the rest of the coding correct.

I don't believe that I missed any steps in implementing the List_SortColumn widget, but I could be wrong since I don't really know a lot about how Ajax works.  Any help would be greatly appreciated.

Thanks

Josh
Hi Joshua!

Thanks for your question - and don't feel lost by any means, we are here to help!

Regarding thet issue, we have recently updated the Developer Course 1 with a module specifically about Ajax, Paging and Sorting - which you can access here:

http://www.outsystems.com/Training/Module.aspx?CourseId=1&RoleId=178&MaterialId=0&SkillLevelVersionId=156&ShowTest=False

See if this helps. In case the materials don't cover what you need, I encourage you to let the Academy Team know about it as well, at training@outsystems.com , because they are always trying to provide the most clear and complete resources about OutSystems training. If you do follow that module, and still have problems, we appreciate your feedback so we can improve it!

Let me know if this helps.

Best regards,

Paulo Tavares
Hi Joshua,

don't get lost, the community is here to help :)

have you check the example @ template espace in Style Guide solution? http://www.outsystems.com/NetworkSolutions/ProjectDetail.aspx?ProjectId=6

If so, can you attach the espace so anyone can take a look to see what's missing?

RNA

Paulo,

I went through those hands-on guides again (I completed that section before they changed the classes) and I am now able to use the SortColumn function.  Thank you.

RNA,

I attempted to run that samle, but I wasn't able to publish it (it kept throwing errors saying it couldn't access the file).  Luckily though, I was able to get the option running.

That being said, I was wondering if there was any documentation on how to use the SetOrberBy function (I can't find it in the hands-on files and it isn't in the referenced actions list where I normally find the parameters of the functions).

Thanks

Josh
Hi Joshua.

Glad to hear it worked out ok!

About the SetOrderBy function, what is it specifically that you want to do? Could you attach your eSpace, letting us know what the screen is, and what exactly do you want to do so that we can better help you?

Regards,

Paulo Tavares
Hi Joshua,
 
What do you mean by SetOrberBy function? 
 
Note: You should be able to publish the template espace, if you getting an error you should check what's happening in your service center.

I'm trying to set the page to sort the table in reverse chronological order by the created by date.  Then from there the users can choose which column to sort by by clicking on the column header.  I can set the system to programatically set which column to sort by, but I can't get the system to default to one specific orderby function.

The hands-on example said to add the SetOrderBy function to the system and that you could use that function to programmatically set the order by function.  I just can't find that function in the referenced functions section of the expression editor so I don't know how to use the function.

I can't seem to get a version of the system available for posting due to the intellectual property violation because I published it to our server instead of building it locally.

Thanks

Josh

Hi Joshua.

Terribly sorry for the confusion. You are absolutely right -- the materials do mention such a function. I was checking and it exists in the latest version of the RichWidgets extension, in the StyleGuide component, here:

http://www.outsystems.com/NetworkSolutions/ProjectDetail.aspx?ProjectId=6

Are you referencing the action in your eSpace, in order to use it?

Best regards,

Paulo Tavares
Hi Joshua,
 
To set a default Order By you need first to create an input parameter in your querie, and next fill this parameter with List_SortColumn_GetOrderBy function. 
 
See this example from the Style Guide template:


Regards

Thanks for all of your help.

I was able to set the system to automatically start with the CreatedDateTime sorted in descending order by using the following process:

I created a variable called DefaultOrder with a default value of "CreatedDateTime" then on the refresh table process, I ran a check on the Column field to see if it was empty.  If it was empty, I set it to the DefaultOrder variable.  I then changed the List_SortColumn command to read this way: List_SortColumn_GetOrderBy(TableRecords1.Id,DefaultOrder:"{SurveyInstance}.[" + Column + "] Desc").  It is now sorting columns correctly and automatically starting out with the CreatedDateTime set in Descending order.

Thank you everyone for all your help once again.

Josh
We have a video covering this