List_SortColumn in final projects Assignment 8

List_SortColumn in final projects Assignment 8

  

Hi,

I hits "Invalid syntax in 'Order By' parameter " error when click on sorting by checkInDate.


My setting is as per below.



Can anyone advise what to do?

Besides i have few questions here also,can anyone help?

1.The dynamic sort should be added to preparation step or onNotify action?Through the training material i learn that it should be added to Preparation step but then i find out that the dynamic link will be added to OnNotify action.Is that true?

2.I set a debug point at OnNotify action and debug process just stop at the aggregate and gives me the error "Invalid syntax in 'Order By' parameter ".How should i further debug actually in order to see the SQL executed with the dynamic link?Cause i believe without seeing the sql it is hard to solve the cause.

Help !!

Solution

Hi Jonhson,

Your List_SortColumn Column property value has the wrong syntax, the attribute should be surrounded by square brackets [ ] instead of curly braces { } . You have it right on the Dynamic Sort of your Aggregate.

1. You need to add it to the Aggregate, on the Preparation. While you don't actually click on one of your Table's header, the default sort order (in your case {Room}.[RoomNumber]) will be used. Every time you click on a header, the actual sorting criteria will be updated, and you should refresh your Aggregate in order to order the results according to the criteria.

2. I don't think you can get the actual runtime SQL statement... the best you can is obtain the Test/Preview SQL statement through the Aggregate's design-time, readonly Executed SQL property (visible on the bottom-right side of Service Studio when you select an Aggregate).

Hope this helps!

Solution

Thanks Jorge,you have help a lot