I'm trying to create a entity with a property of more than 500 characters by setting the indexed value to false.
How would I go about doing this with the gcloud-node library with the save function?
Thanks
As you probably noticed, the indexed value is true by default. I've opened a PR which would add support for overriding. If you have any thoughts and/or want to try it out, please post them over there :) https://github.com/GoogleCloudPlatform/gcloud-node/pull/218
Related
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.
Following on from this question: Referencing parent field on document creation I'm using the formula for the default value for a name field.
IfError(#IfError(#GetDocField($ref;"ProductFamilyManager");
#GetDocField(ParentUNID;"ProductFamilyManager"));
"")
This works when it's a computed field, but not when i change it to be editable with a default value formula.
Any ideas how I can get the field populating with the default value?
The best way of doing this is to use #InheritedDocumentUniqueId. You need to enable inheritance to make that function available, but you don't actually have to inherit any of the parent values.
You should definitely not have to be using two different techniques and #IfError to get this done. And btw: did you know that #IfError is obsolete as of Domino 7?
It may not be supported but just to be sure, has the parent doc been saved before you create the response doc?
Assuming that's not the problem, the alternative is to use the "inherit field values from parent doc " option, which will pass a value from the parent doc to the response doc on creation. I may have the wording wrong but the option is on the form properties dialog in Designer.
I'm trying to make a field read only when a given value is selected from a PickList.
I'm using a flag that is set to Y when the list has that value, and N otherwise.
I created a Business Component User Prop with the name Field Read Only Field: MyField set to the flag.
Thing is, this works with the vanilla component but it wont work on my custom component.
I can't figure out what is going on, the properties of the fields and flag are exactly the same. It should work...
Thanks for any help you can give me.
That user property is only supported on the business component class CSSBCBase and its subclasses. My guess is that you probably used CSSBusComp as the class of your business component. CSSBusComp is actually a superclass of CSSBCBase, and is very minimal and does not support Field Read Only Field. If that's the case, change it to CSSBCBase and you should be good to go.
Other option is that- if the record become read-only when the picklist value is being selected- that you'll need to make the picklist field Immediate Post Changes to be sure the user property is triggered.
I am doing a workflow for a document library. I put a OnWorkflowItemChanged, and I want to get the value of the column which is changed. I use the workflowProperties.Item["name"] and use the afterProperties. But when I use the workflowProperties.Item["column name"], I still got the original value. When I use the afterProperties, it's NULL.
Then I make another workflow that is the same as above for a list. I can use the workflowProperties.Item["column name"] to get the new value in OnWorkflowItemChanged.
Has anyone come across this problem before? Can you give me some help?
The question seems to mix up Item with ExtendedProperties. As to why a difference is seen on a List/Document Lib, it might have something to do with versionining or perhaps the internal serialization is different. Anyway, some of my experience is outline below. I hope it may be of use:
Use the GUID (as a Guid object, not a string) to access the Before / After ExtendedProperties field. Using the Display Name in the ExtendedProperties will not work. The documentation on it is wrong. You can use SPList.Fields to go from Display Name to Column ID (Guid).
I bind all "Before" to MyWhatever_PreviousProperties and all "After" to MyWhatever_Properties, only accessing MyWhatever_[Previous]Properties after the appropriate event(s)).
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