Hello everyoneI have a table that is display some data onto the screen, i have this field ImportDate that is record the date when the import were made, there are 2 possible data for this(null and an actual date). Now i want to display on the screen the import record with the null data first, then the ImportDateExample: 1st jan 2025 i create 2 record with date, 2nd jan 2025 i create 2 record with date , 2nd jan 2025 i create 2 record without date, and in 2020 1st jan i already have 2 record without date, what i wanted is the following display1. 2 record without date created in 2nd jan 20252. 2 record without date created in 1st jan 20203. 2 record with date created in 2nd jan 2025 3. 2 record with date created in 1st jan 2025When i try using the normal way of sort like ImportDate Desc, it sort the way i want that is the newest created record go to the top,but then the record without date always to to the bottom. Asc is for those null record to go to the top(also the way i want) but now newest created record with date is at the bottomCan you guy help me?*Note: i have 2 field ImportDate and CreatedDate too, createdate data is always added even when the ImportDate is created null, but sort is sorted by ImportDate**Note: here is the code that is in the sort: List_SortColumn_GetOrderBy(ProductTable, "{product}.{ImportDate} Desc")***Small update: the record without date can display however you want, doesn't care about the create time, but the one with date is a must
You can add an extra calculated column, 'IsNull', value 1 if importdate is empty, value 0 if it is filled.
Sort on
IsNull desc
Importdate desc
Createddate desc
OMG it work, thank you very much!But sorry to bother you one more time, now when i click the header of the column to sort, it doesn't work, like every other column too(Class name, class status,...), when i click on them nothing happen anymore, i tested with my other table(The same data) but haven't apply your solution yet and the sort when click it's still workMy table using some kind of widget to sort, RichWidgets\Lists_SortColumn, and in the column i have this "{product}.[ImportDate]" (the image is i borrow from the internet for example)
Oh i figure it out the later questionsOnce again, thank you so muchRegardsJohn
Sorry for bother you once more, but i need your helpThe display is already ok, but now when ever i try to click the header to sort, it will just sort back to the old sort by ImportDate, it doesn't go to the sort that i put in the aggerateExample:Here are the record that you have help me1. 2 record without date created in 2nd jan 20252. 2 record without date created in 1st jan 20203. 2 record with date created in 2nd jan 2025 4. 2 record with date created in 1st jan 2025 AFter click the header to sort, it become like thisClick sort once2. 2 record without date created in 1st jan 2020 1. 2 record without date created in 2nd jan 202544. 2 record with date created in 1st jan 2025 3. 2 record with date created in 2nd jan 2025 Click sort again3. 2 record with date created in 2nd jan 2025 4. 2 record with date created in 1st jan 2025 2. 2 record without date created in 1st jan 2020 1. 2 record without date created in 2nd jan 2025It basically just go back to the old way*Here is my current sort in the aggerateList_SortColumn_GetOrderBy(ProductTable.Id, "[IsNull] desc")List_SortColumn_GetOrderBy(ProductTable.Id, "[ReportDateTime] desc") List_SortColumn_GetOrderBy(ProductTable.Id, "[CreateDateTime] desc") RegardsJohn
oke, wait a sec, I don't remember the exact mechanics of Traditional Web, I'll have a try
I don't have enough time to work it out, but if you want to have this special sorting and also want to allow the user to click headers for sorting, I would do something like
Let's say you want the sorting to start on this special order ascending, in your Preparation, right before the aggregate, you assign the DynamicSort like this
So now, in the Refresh is the most work : you have to set the DynamicSort value either directly as is selected in the header, OR one of the special sorts if they clicked on ImportDate
I split it up in 3 steps for easier readability
Dorine