I've used two different soutions to this problem over the years...
1) Define a calculation field like this: If ( Floor = "G" ; 0 ; Floor ) and set it to return Number as its return type. Now sort on this new field instead of floor.
2) Define a custom value list as:
Sort your records by floor, but select "custom order based on .." and select this value list for your sort order.
We list ground floor first and then put floor 1, 2, 3, ....
A trick can be defining the field "floor" as number field and insert "ground (0)" unstead of "ground"
I tried the second method. I'm not sure how to do the first method. The list looks like this:
c: building c
00*: damper number.
I try using to custom list, but it still puts c1 at the top instead of cg.
You've just included details not in your original post. I assumed the floor number was entered in a separate field--not part of a text string. I don't think you can get a value list to work for this as you have too many possible values.
Try this calculation in a stored calculation field: (I'm assuming one letter for "building" and one digit for "floor". If this is not the case, the following calculation will have to be changed.)
If ( Middle ( Floor ; 2 ; 1 ) = "g" ; 0 ; Middle ( Floor ; 2 ; 1 ) ) & Right ( Floor ; 3 )
Set result type as Number.
Another alternative would be to separate building, floor and damper values into separate fields. Then sorting becomes much easier to set up. You'd use a calculation field to glue all the parts back in to a single string (concatenate them) when you need that particular item. That calculation would look like:
Building & Floor & "-" & Damper