Share via


Handling null values in a list - moving them to the bottom of a sort in Ascending view

Question

Monday, February 18, 2013 11:28 AM

When I sort a column by Ascending (e.g. 1,2,3 etc) it places all the blank fields at the top (e.g. , , , , 1,2,3,4). Is there any way I can get sharepoint to ignore the the blank fields or move them to the end of the list (e.g. 1,2,3, , , , )

I cannot use Designer or Infopath.

All replies (7)

Wednesday, February 20, 2013 11:37 AM âś…Answered

Hi there,

Thanks, guys, for your help on this. In the end Ive gone for a choice field with values 12 to 20. The default value is 'Assign Value' meaning there is an alphanumeric in the field whenever the record is created.

This has solved the blank fields issue and seems to have satisfied the client so good on both counts. 

I guess we can close this one out :)

Thanks again for your help and prompt responses.


Monday, February 18, 2013 11:41 AM

Hi,

A workaround might be to create a view to show only items that have a value(1, 2, 3, 4, 5, ...) and not display the blank items and then sort descending like you are doing at the moment.

The problem is that those items will not show up at all.

Else you can create a workflow to assign a value like 999999999999999 to items where that field is blank. Then sort like you are doing.

But SharePoint will always show items with blank values at the top of the sort.

Regards
Pieter


Monday, February 18, 2013 1:34 PM

Hi Pieter,

Thanks for the prompt reply.

Regarding the workflow solution: how would I do this without designer?

Best regards

Bob


Monday, February 18, 2013 1:40 PM

Hi:

Maybe you can open the list on excel view, then replace all empty fields by a default value (-1 or 999.999.999) o that view that is very easy to edit data.

I hope this helps


Monday, February 18, 2013 1:42 PM

Hi Bob,

Unfortunately you would need designer for the workflow solution. Is designer not an option for you or just not an ideal solution?

Regards
Pieter


Monday, February 18, 2013 3:32 PM

Yes unfortunately my client will only use out of the box Sharepoint 2010 - no deisgner and no infopath. I can still code to a certain extent but my skills in this field are pretty rudimentary.

My client wishes to input an order of preference in this field so i am experimenting with a Choice field (1 - 10) wiht the default value being 10. It seems to be a sort of fix but Ill have to wait and see what my client thinks.

I will also experiment with default values for numberic and text fields

Ill Let you know what happens. Thanks for your input guys.


Wednesday, February 20, 2013 9:26 AM

Hi Bob,

Any progress on this?

Regards
Pieter