RichWidgets List_SortColumn issue

RichWidgets List_SortColumn issue

Dear users,

Could someone tell me how to use the orderby parameter (which works great when using the standard query) if i try to use an advanced query?

My query:

SELECT {EVENT}.[EventId],{EVENT}.[EventName],{EVENT}.[EventType],{EVENT}.[EventCode],{EVENT}.[DateFrom],{EVENT}.[DateEnd],
where {EVENT}.[EventType]={M_EVENT_TYPE}.[Id] and
{EVENT}.[City]={M_City}.[Id] and
{EVENT}.[Country]={M_COUNTRY}.[Id] and

(( @StartDate between {EVENT}.[DateFrom] and {EVENT}.[DateEnd]) or (@EndDate  between {EVENT}.[DateFrom] and {EVENT}.[DateEnd]))  and  @CountryCode = {M_COUNTRY}.[Country]

 order by @Orderby

Orderby i added as a parameter ( value what i assign t the parameter is  
List_SortColumn_GetOrderBy(EventTable.Id, "{EVENT}.[EventName]")
in the advanced query but with no luck; this is what i get when i try to open the page:
Error in advanced query GetEvents in Preparation in event_pla_list in MainFlow in ET (SELECT {EVENT}.[EventId],{EVENT}.[EventName],{EVENT}.[EventType],{EVENT}.[EventCode],{EVENT}.[DateFrom],{EVENT}.[DateEnd], {EVENT}.[ExhibitionCost],{EVENT}.[TravelCost],{EVENT}.[HotelCost],{EVENT}.[LogisticCost],{EVENT}.[MarketingCost],{M_EVENT_TYPE}.[Name], {M_City}.[Name],{M_COUNTRY}.[Country],{EVENT}.[Status] From {EVENT},{M_EVENT_TYPE},{M_City},{M_COUNTRY} where {EVENT}.[EventType]={M_EVENT_TYPE}.[Id] and {EVENT}.[City]={M_City}.[Id] and {EVENT}.[Country]={M_COUNTRY}.[Id] and  (( @StartDate between {EVENT}.[DateFrom] and {EVENT}.[DateEnd]) or (@EndDate  between {EVENT}.[DateFrom] and {EVENT}.[DateEnd]))  and  @CountryCode = {M_COUNTRY}.[Country]   order by @Orderby): The SELECT item identified by the ORDER BY number 1 contains a variable as part of the expression identifying a column position. Variables are only allowed when ordering by an expression referencing a column name.
(This detailed error is not shown in the public area)

Thank you in advance
Hi Frits,

Please check your @Orderby parameter... "expand inline" property must be configured with YES...

Rafael Pereira
Happy to help you!

Rafael Pereira