I have 3 lists on a web page and each have Dynamic sorts on the columns which all work if I click on them both several times both ascending and descending.

However if I click onto another page and then back onto that page I get an Internal error.

If I log out of that System and back in the page again works.

It seems I just have to click on any column sort for the error to occur on returning to the page.

In order to troubleshoot, it would be helpful at the very least if you provided the full error from the error logs. Just saying "internal error" doesn't really help. It would be even better if you could upload a sample that reproduces your issues.


The whole error message is

Error Detail
Back to Log
Time of Log:
05/03/2019 12:30:40
Session Id:


Invalid syntax in 'Order By' parameter.

Environment InformationeSpaceVer: 508 (Id=52855, PubId=52241, CompiledWith=10.0.828.0)
RequestUrl: https://vallourec-dev.outsystemsenterprise.com/ItemDescription/ItemDescriptions.aspx?(Not.Licensed.For.Production)= (Method: GET)
AppDomain: /LM/W3SVC/1/ROOT/ItemDescription-470-131962691253276806
FilePath: d:\OutSystems\Platform Server\running\ItemDescription.247839044\ItemDescriptions.aspx
Locale: en-US
DateFormat: dd/MM/yyyy
PID: 5464 ('w3wp', Started='2/28/2019 12:15:22 PM', Priv=2285Mb, Virt=12179Mb)
TID: 825
Thread Name:
.NET: 4.0.30319.42000
Invalid syntax in 'Order By' parameter.
   at OutSystems.HubEdition.RuntimePlatform.BaseAppUtils.ReplaceEntityReferencesAndAttributesInOrderBy(IDMLIdentifiers dmlIdentifiers, String paramValue, String[] entityNames, String[] entityAliases, IDictionary`2[] entityNamesToAttributes)
   at ssItemDescription.Flows.FlowMainFlow.ScrnItemDescriptions.FuncssPreparation.datasetGetItemDescriptions_Approved(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, String qpstList_SortColumn_GetOrderBy, String qpstItemDescriptions_SearchApp)
   at ssItemDescription.Flows.FlowMainFlow.ScrnItemDescriptions.Preparation(HeContext heContext)
   at ssItemDescription.Flows.FlowMainFlow.ScrnItemDescriptions.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

It works when I go into the Screen initially and also if I logout and in after an error but if I click to sort.., leave the screen the try and comeback it errors

I gave you a zip of the entire project which I presumed would be enough. The screen in question is Manufactured Items The first item in the menu and indeed the Home screen after login

Im guessing you are using a local variable to hold your sort. If you leave the screen the variable goes away. If you want to keep things around when you leave the screen, try storing it in a session variable instead.

Not entirely sure I understand as it didn't seem clear that that was necessary.

I presumed the Default Sort set up with the initial recordset would remain.

From what you say it would appear this is not the case? 

 I set up a dynamic sort on each of the three recordsets

The clicking on the header changes this in the web page to whatever but when you leave the page this is now this does not then get reset during Preparation on re entry?

The error shows that there is an error in the Order By statement. Whatever you are using in the order by statement is getting lost or set to an invalid value when it changes screens. 

Also, you say there is a zip of the entire project, I don't see anything attached to any of the posts. The typical way to post a project to the forum is to attach either an OML or an OAP file.

I though I had attached documents.rar..

I will try in the Preparation to use the List_SortColumn_SetOrderBy  logic item

Stacey Levine wrote:

Also, you say there is a zip of the entire project, I don't see anything attached to any of the posts. The typical way to post a project to the forum is to attach either an OML or an OAP file.

Actually was a rar which is forbidden apparently