Advanced Query and List_SortColumn

Advanced Query and List_SortColumn

  
Hi all,

I'm having some problems with combining list_sort with an advanced query list.

I did find some other posts and answers about this, but the existing information does not offer the information I need.

First of all; my advanced query with "order by @orderby" and "expand inline" set to "yes" works fine when entering a test input.

My problem is that I can't seem to figure out how to pass an orderby parameter to the "refresh query". The refresh query uses the default orderby value.


When I debug the input parameter of Refresh AdvQuery2 is always the default input parameter.

It is my understanding that by clicking the column_name (which is transformed in a link because the list_sortcolumn widget is dragged into the same cell), somehow the ColumnName and the Column Order should be passed to the refresh action. The column_name to determine which column is to be sorted, and the order to determine asc or desc.

Unfortunately, I can't figure out how this is accomplished. When I click the Column_Name the refresh action is called. I just can't figure out how to pass the column_name as an orderby parameter to the refresh action.

Any pointers?

Thanks in advance,

Cheers, Rienk Eisma
Hello Rienk Eisma,

Are you using the List_SortColumn_GetOrderBy(TableRecord_Id,DefaultOrderBy) function to set the order by on the refresh query?

Regards,
Hugo Pinheiro 
Hi Hugo,

I fixed it thanks to your pointer.

At first I got the '<StructereName>' found in 'Expand Inline' parameter is an unknown Entity 

The way I solved it is as follows: 

In the list_SortColumn widget property the "column" value cannot be {STRUCTURENAME}.[COLUMNNAME]. It must be set as plain  "ColumName".

Second, I changed the orderby parameter for the refresh advancedquery from: List_SortColumn_GetOrderBy(TableRecords1.Id, "{StructureName}.[AttributeName]")

to: List_SortColumn_GetOrderBy(TableRecords1.Id, "ENCONTACT.[NAME]")

I pushed submit too soon :)

It seems the sort_by must be called by the name you use in the select statement, not the structure name.

Hope this is helpful for someone.

Cheers, Rienk Eisma