SPGetDisplayFromStatic when list name has a number in it

Sep 29, 2010 at 9:57 PM

When I am running this code:

var dRequestTypeColumn = $().SPServices.SPGetDisplayFromStatic({
	listName: "requestlog1",	
	columnStaticName: "Title"
});

I am getting a GUID exception from the sharepoint web service.  After messing with it noticed that if I create a list without the "1" at the end of the name, it works fine.  (easy work around)

Here is the exception from firebug:

soap:ServerException of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Any ideas about this besides my work around?

Thanks!

Nathan

Coordinator
Sep 30, 2010 at 3:51 AM
Nathan: This seems odd to me. When you have the trailing '1', there's not a space, is there? Just for kicks, try a '2' and let me know if you have the same issue. M.
Sep 30, 2010 at 3:14 PM

Hi Marc,

Yeah, something seems odd to me as well.  Basically I had a list named "RequestLog" and was somehow able to create a second "requestlog" (lowercase) list, which sharepoint magically gave it a "1" at the end of the list name.

I was not able to repro this one by creating a "testlist" and "testlist1", everything worked as advertised in that situation.

I moved the list names around to be sane and everything is working fine now.  Thanks for your help, sorry for the red herring.

Nathan

Coordinator
Sep 30, 2010 at 3:25 PM

Ah. Yes, SharePoint will add a '1' at the end if you try to create a list by the same name in some cases. The best trick on this is to open the site in SharePoint Designer and see what the real list name is. Sometimes it'll look like 'list1 (list 1)'. It's sort of like the DisplayName vs. StaticName thing. I usually rename the list in SPD (doing it through the UI won't work), and then all is good.

M.