- Code: Select all
query.sort.add(
query.case
.when( query.columns.order_status.eq( "APPROVED") ).then( 1 )
.when( query.columns.order_status.eq( "PENDING") ).then( 2 )
.when( query.columns.order_status.eq( "WEB") ).then( 3 )
.when( query.columns.order_status.eq( "TRANSREQ") ).then( 4 )
.when( query.columns.order_status.eq( "OPEN") ).then( 5 )
.when( query.columns.order_status.eq( "POSTED") ).then( 6 )
.when( query.columns.order_status.eq( "RECEIVED") ).then( 7 )
.else( 8 )
)
When the query gets loaded into the foundset nothing happens. Am I missing something in how this should be setup?