Wednesday, October 20, 2010 10:57 AM
Help! I've created text fields that have IP's but they do not get sorted right.
I know this is correct sort for normal text. Do anybody have any clue of how I can use IP's in Sharepoint 2007 lists?
Wednesday, October 20, 2010 11:17 AM
Friday, October 22, 2010 12:25 PMModerator
Do you want to sort IP like this:
If so please test follow these steps:
1 Create a new column in the list and select Calculated(calculation based on other columns) type.
2 And =RIGHT(IP,3) in the Formula section.(Here IP is the Column name of your ip column)
3 Select Single line of text or Number(1,1.0,100) in the data type returned from this formular is: checkbox.
4 Click OK.
5 Go back to the list setting > Click All Item view > uncheck the Display checkbox of the new column in the Columns part > sort by the new column.
6 Click OK.
Now it would sort as above.
Here is a Formulas reference maybe could help.
Monday, October 25, 2010 1:34 PM
Liu, i get the following error in my sharepoint 2007 when pressing OK in step 6:
Formelen inneholder en syntaksfeil, eller støttes ikke. at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
Tuesday, October 26, 2010 6:12 AMModerator
Please check the calculate column whether it got correct text(step 4).
I think you are using Norwegian rather than English. If you are using a different language page layout you may need to use their punctuations. I wonder if Norwegian use something else instead of “,”?
Tuesday, October 26, 2010 7:50 AM
=HØYRE([IP-adresse];3) finally worked! :)
Well after checking out this, it did not work as expected as it did only sort at last four digits, and I had some 192.168 addresses as a separate serie there. thus I guess I need a custom field. I will look into that.
Tuesday, October 26, 2010 8:15 AMModerator
Thanks for your reply.
I think you could create another calculate column and use Left(IP-address,7) Formula.
Then sort by this calculate column(Show items in descending order) first and then sort by the previous calculate column.
Hope it would help.
Wednesday, October 27, 2010 11:12 AM
I do my sort first by Branch Office name, then by IP.
Sharepoint only supports 2 sorts, so I cannot add one more.
Wednesday, October 27, 2010 11:46 AMModerator
I think we can combine this two calculate column to one calculate column.
Please create a calculate column with this Formula:
Then sort by this calculate column.
- Marked As Answer by Aaron Han - MSFT Friday, October 29, 2010 5:35 AM