- Glenn Barber
- PowerBuilder
- Tuesday, 28 June 2022 01:30 AM UTC
We have a number of applications which present a data grid which allows the user to click on column headers to sort data (using the pfc service).
One issue is that nulls always sort to the top in datawindows - which can be really aggrevating when there is a lot of null data.
We dont want to fill all the date with dummy dates or empty strings.
Is there a way to tell a datawindow to sort nulls to the top or bottom always?
Ideally have these many decades it would be great if Appeon put a "Sort Nulls As" feature in the column definition. Maybe its there and I am unaware.
As I am using the pfc and it essentially grabs the column name from the headername (extracting the -t) creating a setSort
I did some experimenting in the debugger and it looks like the Set Sort function may accept datawindow functions - so instead of
of_setSort ("mydate a")
I can do
of_setSort ("If(IsNull(mydate, 1900-01-01, mydate)
I never so this is an example in the documentation - is this supported?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.