This project has moved and is read-only. For the latest updates, please go here.

SPServices Filter Dropdown

Apr 9, 2013 at 4:32 PM

I'm having a wee issue with the Filter Dropdown.

I've managed to get the filter working by using a choice field "Project Status" and having my CAML Query as:
  "<Eq><FieldRef Name='Projectstatus'/><Value Type='Text'>active</Value></Eq>";
I then tried to filter by "Created By" and getting the current user like:
var userName = $().SPServices.SPGetCurrentUser({ fieldName: "Title" });
        var query = "<Eq><FieldRef Name='Created By'/><Value Type='User'>" +userName +"</Value></Eq>";
But when I try that I get the error:

Error in function
relationshipListColumn: ProjectNumber
Not found in relationshipList My Projects

Click to continue

I guess it's a problem with using the Created By field, as that's the only thing I changed. But if anyone can give me a kick in the right direction as to where I've gone wrong that would be wonderful.


Big John
Apr 9, 2013 at 5:53 PM
I believe the static name of the "Created By" field is actually "Author." Try that and see what you get.

Apr 9, 2013 at 9:59 PM
Worked a treat!

Thanks Geoff, great stuff!

Big John