I just figured out how to filter against a sharepoint list choice type column. Myself being a beginner of sharepoint surfed web a lot to find how to filter for choice type column in a sharepoint list with no success. May be for experienced sharepoint developer this would be a piece of cake. But for me it took some 30 minutes of thinking. So I decided to post this for sharepoint beginners like me.
I have created a sharepoint list called "Customers" in my sample site called "contoso" and I tried to read the list as a feed using my browser. This list has four columns and Region and Size columns are Choice columns.
When I typed
http://spsrv/sites/Contoso/_vti_bin/ListData.svc/Customers
in my browser I got my customer list as a feed. Then I tried filtering for Name and it was easy and success.
http://spsrv/sites/Contoso/_vti_bin/ListData.svc/Customers?$filter=Name eq 'Fabrikam'
But when I tried to filter for Region column using
http://spsrv/sites/Contoso/_vti_bin/ListData.svc/Customers?$filter=Region eq 'East'
it did not give me the feed but gave "HTTP 400 The webpage cannot be found". I googled around but was not successful.
Then I thought a bit and and just opened the feed page viewsource. Aha! there I found the solution and what I was doing wrong. The choice columns had a suffix added as "Value". So my Region was RegionValue.
I then tried with following in my browser and successfully got the filter working against choice column.
http://spsrv/sites/Contoso/_vti_bin/ListData.svc/Customers?$filter=RegionValue eq 'East'
Saturday, 14 January 2012
Friday, 6 January 2012
Application Pool Identity for WCF to Work with IIS 7
If you host your WCF services in IIS7 there is small trick you have to do to make it work. You have to change your application pool identity to Network Service.
You can do this by expanding your IIS Server --> Application Pools --> Right Click and Select the Application Pool Advance Settings
In the popup window click the Identity under Process Model
Change the Identity to Network service.
Give NetworkService access to the physical folder of the wcf site. and you are good to go.
You can do this by expanding your IIS Server --> Application Pools --> Right Click and Select the Application Pool Advance Settings
In the popup window click the Identity under Process Model
Change the Identity to Network service.
Give NetworkService access to the physical folder of the wcf site. and you are good to go.
Subscribe to:
Posts (Atom)
Popular Posts
-
Dynamic block allows to create nested multi level block structures in terraform code. Conditional usage of such blocks are really useful in...
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...