Some IBM P8 ChoiceLists are incorrect when being returned via CMIS - cmis

Facing with strange behavior of the FileNet Choice Lists when they are being returned through CMIS.
There are
IntList in FEM:
and IntList_Test
first one is bound to both MultiInteger and MultiSelectedInteger property templates
There is a Document Class called "Multi" that contains those property templates with correct choice list (IntList):
Despite this fact CMIS Workbench shows incorrect choices for MultiSelectedInteger:
and correct ones for MultiInteger:
So, i can't understand why. It seems that there's some invisible connection between MultiSelectedInteger and IntList_Test. Moreover, working via WSI\EJB connection there's no such problems.
Probably there's some bug at CMIS navigator "Proxy" (.war deployment) side.
Also it's ok when i put values from IntList and it argues when i try to put value from offered choice list (IntList_Test):
Any help is appreciated.

Related

SPServices GetListItems returning field values as "undefined"

I ran across a problem for which I found no documented solution, but inadvertently found the solution myself. So I wanted to document this here for others who may encounter the same problem.
I was using a CAML query within SPServices to retrieve list items, then referencing "ows_{fieldname}" as usual to retrieve the field value for each list item. The field value was reported as "undefined" for all items. I quintuple-checked that I was specifying the proper name of the field and that my query was properly constructed.
I eventually discovered that the fields I was trying to reference were not displayed in the default view of the list. As soon as I changed the list properties to include the fields in the default view, the proper field values were returned within my javascript.
I don't know how much of Sharepoint's underpinnings work, but I was very surprised at my finding because it implies that the SPServices GetListItems method gets its data from the list's default view, not the actual underlying list. I realize I could be wrong in this interpretation, but I imagine others could run into this same problem.
The default, although unreliable, way GetListItems works is that it's suppose to returns all fields displayed on the default list view if you don't specify ViewFields on input. This is unreliable. Although you got it working - now - someone could come along later and change the default view thus breaking your sweet customization. Bummer. :)
I suggest always listing the ViewFields you are interested in on the GetListItems method. This ensures that your will get them if they are set. That's right. You could still get rows with an undefined field. This happens mostly on fields of type Lookup that are not set on a row.
Hope this helps you understand what is going on. Over the years I have created my own wrappers around SPServices to ensure I get back a reference to all fields requested, even if they are not in the response by Sharepoint.
When using SPServices' GetListItems method, be sure that any fields that you reference from the list are included in the list's default view, otherwise an undefined value will be returned.

How do I get the guids of taxonomy/metadata terms for updating lists?

I'm integrating a legacy system with SP2010 using a literal SOAP calls. I can do a call such as CopyIntoItems or UpdateListItems and doing so, set metadata fields by providing a Fields node such as:
<Fields>
<FieldInformation Type="Note" DisplayName="Country_0"
Id="de1e6424-7a8a-42a5-8d21-73402fe2e609"
Value="UK|91c89925-16e6-4d41-9e71-ec45e8f2a113" />
...
</Fields>
In the Value attribute, I have to give the guid of the taxonomy or metadata term. That works fine in the above example since I happen to know the guid of the term UK. However, how can I dynamically figure out what the guid of some other value, say France for example, would be? I was thinking of making a utility to get them all and cache them on my system somehow so I can look them up easily, but where are they defined?
Possibly a stupid question, I get the feeling I've missed something...
The GetList call should allow you to get all the ID's.
But the UpdateListItems (and) call should work using just the internal names.
From the MSDN Sharepoint 2010 forum:
http://social.msdn.microsoft.com/Forums/eu/sharepoint2010general/thread/63553372-b87f-4d69-8d4c-63fb8a7b3c6d
Not sure if this is the best way but it's the answer I'm going with for the time being.

Query and/or Search for SharePoint Document ID

We have the sharepoint 2010 environment with Document ID's enabled.
Given (part of) a Doc ID, we want to programmatically retrieve the document(s) matching that ID. The problem seems to be that this column is rather special, in that it might need special handling.
Using an SPSiteDataQuery, fetching the _dlc_DocId field as part of the viewfields works fine. However, including it as part of the where query never results in any documents being fetched.
Using the Search API has gotten us nowhere at all.
Has anyone pulled this off, or any suggestions on how to tackle this problem?
[Update] Turns out we were fooled by subtle errors in the XML and bad debugging misinterpretations. This stuff just works fine.
I don't normally contribute to these sorts of things because cleverer people than I always get there before me, but as this is an old one with no proper answer I think I'll add my thoughts for those who find this page.
I was struggling with this but after a little digging around and learning a bit of Caml I got this working.
I am using the SharePoint Client Object Model against SharePoint 2010 and Office365 beta.
Start off your query by looking at the all list items query:
Microsoft.SharePoint.Client.CamlQuery.CreateAllItemsQuery().ViewXml
"<View Scope=\"RecursiveAll\">\r\n <Query>\r\n </Query>\r\n</View>"
Stick a where child inside the query
Then add in
<Eq><FieldRef Name="_dlc_DocId" /><Value Type="Text">MDXC2KE55ASN-3-80</Value></Eq>
replacing MDXC2KE55ASN-3-80 with the doc ID you are looking for inside the where.
Also don't forget you might want to make use of these too:
<ViewFields><FieldRef Name="_dlc_DocId" /></ViewFields>
<RowLimit>1</RowLimit>
Then use List.GetItems() method to bring back the ListItemCollection.
Just in case nobody comes with a slick solutions from the depths of the Sharepoint infrastructure:
What would Google Do?
Slice is, Dice it and dump it in a reverse index.
Solr and Lucene offer supreme tools for this. The idea is to cut the DocId's in small pieces and add the location of the document to the bucket for that piece.
Say We have "A real nice document" with Id ABCD123. You would add it to the buckets
ABCD, BCD1, CD12, D123
When searching for a partial ID (+ other data like dates, types, ...) you (well the search engine) creates the union of the buckets + applies additonal constraints.
To make this happen you need to write a spider for the sharepoint server and a routine which makes a record of data elements to be indexed.
Put a nice REST interface in frnt of it (actually SOLR already has that), integrate it in the main sharepoint server, and nobody needs to know there is something else running behind it.
These products can also incrementally update the indexes, so they can be kept up to date.
you could use the following to get the Document ID.
SPFile file = MethodToUploadFileToServer(web, filepath);
SPListItem item = file.Item;
string DocID = item.Properties["_dlc_DocId"].ToString();

bind subsonic object collection to Microsoft report (rdlc)

Has anyone been able to use a SubSonic generated collection as a "business object datasource" with Microsoft report (rdlc)? I have generated the SubSonic class code but for some reason the report datasource window is not seeing the class as a potential object collection datasource.
Is there something I need to do for this to work?
Thanks in advance...vsdotnetguy
I have loaded Reporting Service reports from business objects before (loaded via NHibernate -- which isn't exact but close enough for argument sake).
Couple of key points:
1. return your objects in List, even if you are only returning one object.
2. You want FLAT business objects. You might have to go thru a DTO transformation to get that. By flat, I mean the most complex property you can have in a business object is a string and a number (int, decimal, double). If you are expecting to grab a value like this:
myObject.Customer.Name, forget it. Create a CustomerName property.
3. If you need data from multiple places try to break up your reports into subreports. You key off of the datasource key to figure out what data to return to the report.
I'll add more as I remember, it has been a few months since I've done this.
Yes I've done it, you should only need to make sure the project containing your reports references your SubSonic project (obviously :).
Sometimes I've also found that Visual Studio can get a little borked and require a restart before repopulating the datasource window with SubSonic generated objects.
Thx Chris and Adam,
Here is the answer I found.
In my case I wanted to dynamically set the main and subreport datasources at run time using the SubSonic object collections. However, I also wanted to design the report layout using drag and drop of the datasource columns.
But I was unable to design the report using drag&drop because none of my SubSonic collections were showing up in the Website Data Sources.
However, later while I was doing some control binding using the ObjectDataSource control, I noticed that NOW my SubSonic collections were showing up in the Website DataSources window and I could drag and drop the report layout.
So if you are dynamically setting the report datasources at run time and ARE NOT using the ObjectDataSource control already in your project, you MUST add a dummy ObjectDataSource control to one of your aspx pages. This will then make the business object datasources show up in the report designer.

How can I automatically enable content approval on a SharePoint list?

I'm trying to create a feature that both creates a list template and an instance of that list (using the <ListTemplate> and <ListInstance> elements. I would like for content approval to be turned on by default. According to the docs on ListTemplate, setting the EnableModeration attribute to TRUE should do it. However, when I try to install the solution, I get the following error:
The 'EnableModeration' attribute is
invalid - The value 'TRUE' is invalid
according to its datatype
'http://schemas.microsoft.com/sharepoint/:TrueFalseMixed'
- The Enumeration constraint failed.
A bit more searching reveals that the value accepted is actually "True", not "TRUE". That installs fine, but it seems to have no effect when the list is created - it still doesn't require content approval. Any idea what I'm doing wrong?
Edit: If anyone could even confirm for me if they've seen "True" or "TRUE" work before, that would at least narrow down my search.
Update: I've found that I can enable content approval using code in a feature receiver:
list.EnableModeration = true;
list.Update();
That's a bit of a hack, so it'd still be nice to be able to do this through the XML instead.
I ended up just using the feature receiver approach, since I just needed to move on. However, I later found that the List element used for defining your list schema also has ModeratedList and ModerationType properties that look like they probably have something to do with this. So if anyone else is having the same problem, I would recommend giving those a shot.
Does your custom list have a field of type 'ModStat' on it?
ModStat Specifies Content Approval
status. Corresponds to the
SPFieldModStat class and to the
ModStat field type that is specified
on the Field element. Value = 23.
from the SPFieldType Enumeration docs
I set ModeratedList="TRUE" ModerationType="TRUE" for List element and EnableModerate="True" for ListTemplate element . It works for me. Well it does not matter to use TRUE or True both are same.
You only have to set ModeratedList="TRUE" for List element and EnableModerate="True" for ListTemplate element. I just checked that and work fine for me. But this only will be affected for new list instances.
I had similar question - where to enable versioning and moderation from code.
In ListInstance, go to <ListTemplate> and set following attributes:
VersioningEnabled="TRUE" for versioning and EnableModeration="True" for automatic moderation.
Link: http://msdn.microsoft.com/en-us/library/ms462947.aspx

Resources