Welcome, Guest
  • Page:
  • 1

TOPIC: sorting on non-numeric fields

sorting on non-numeric fields 21 Apr 2010 03:26 #6203

  • jas.
  • OFFLINE
  • Platinum Boarder
  • Posts: 880
  • Karma: 4
So I have a report, and it involves an attribute for recurring deadlines for foundations. Since the attribute description is in the format MM/DD, a fuzzy date wouldn't work for them. I want to sort on the day. I already have a formula that figures out the month and compares it to the date fields from a parameter field, so that's good.

I created this formula and grouped on it:

if numerictext (right ({CnAttrCat_1.CnAttrCat_1_Description}, 2)) 
then tonumber (right ({CnAttrCat_1.CnAttrCat_1_Description}, 2))
else 0


(I have to use the numerictext function, because a few of the entries in the field are things like 'None' or 'Rolling Deadline' -- I only want to pull out the MM/DD entries)

However, this still won't sort by that field. Anyone have any ideas on what I might do to make it sort?
james andrews
director of development services
philadelphia museum of art

sorting on non-numeric fields 21 Apr 2010 03:26 #35354

  • jas.
  • OFFLINE
  • Platinum Boarder
  • Posts: 880
  • Karma: 4
So I have a report, and it involves an attribute for recurring deadlines for foundations. Since the attribute description is in the format MM/DD, a fuzzy date wouldn't work for them. I want to sort on the day. I already have a formula that figures out the month and compares it to the date fields from a parameter field, so that's good.

I created this formula and grouped on it:

if numerictext (right ({CnAttrCat_1.CnAttrCat_1_Description}, 2)) 
then tonumber (right ({CnAttrCat_1.CnAttrCat_1_Description}, 2))
else 0


(I have to use the numerictext function, because a few of the entries in the field are things like 'None' or 'Rolling Deadline' -- I only want to pull out the MM/DD entries)

However, this still won't sort by that field. Anyone have any ideas on what I might do to make it sort?
james andrews
director of development services
philadelphia museum of art

sorting on non-numeric fields 06 May 2010 09:04 #35508

  • jgsam
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Hi, I have a monthly birthday report where the same problem existed. Someone at Blackbaud gave me this formula, which extracts the day from the birthdate field:

If IsDate({CnBio.CnBio_Birth_date}) then
Day(CDate({CnBio.CnBio_Birth_date}))

I placed this in the detail section, suppressed it, and sorted on it. It works.

sorting on non-numeric fields 07 May 2010 05:17 #35509

  • jas.
  • OFFLINE
  • Platinum Boarder
  • Posts: 880
  • Karma: 4
thanks jgsam! I never followed up -- it turned out I was having a brain fart, because I was grouping by sortkey first, and THEN by my date formula. so of course it was forcing it to be alpha! swapped the groups and I was good to go.
james andrews
director of development services
philadelphia museum of art
  • Page:
  • 1
Time to create page: 0.94 seconds