I’m using the URL to set filtering for a sharepoint 2007 page based on an ID column. This column needs to be a string field. So, if I click on a client name, the url is built so that it brings the user to a list that is filtered by that client’s ID number. This works fine if the user has an ID of “abc”, but if the user has an ID of “123”, this will not work. I’ve tried with quotes, without quotes and with single quotes. Originally I had changed this column to a numeric field and it fixed the problem, but now I’m finding out that this needs to be a string field and so I need to make filtering working for a string field if it is a number.
I’m using the following syntax:
http://domain/clients/Lists/ListName/AllItems.aspx?FilterField1=Company_x0020_ID&FilterValue1=100
The above WON’T filter because the filter value is a number
http://domain/clients/Lists/ListName/AllItems.aspx?FilterField1=Company_x0020_ID&FilterValue1=abc
The above WILL filter because the filter value is a string.
Is there a way to get this to work, whether it be javascript or a manipulation of the field type? Thanks very much in advance.
I did a work-around:
Created another computed value field and used it to wrap the ID field with quotes. I use this to filter with instead of the ID field.