Hey i want to create a list instance with a definition that defines the following columns.
-Notice StartDate (DateTime)
-Notice EndDate (DateTime)
-Notice Message (Text)
-Notice Colleges (???)
I created the dates and message inside my list def i just have no idea what type should the Colleges column be. I just know it should be a list that represents multiple users.
Also i would like to be able to call a Javascript function to Populate new item inside the list and delete them. Also if i retract the solution how will sharepoint deal with this ? Will items added to the list while the solution is deployed still be there when i redeploy ???
In response to your questions:
You can make Colleagues a 'Person or Group' column which allows for multiple values. Presumably, you want to render a list of all users from which the user can select? If you're doing this server-side, you could bind against SPWeb.AllUsers or SPWeb.Users depending on your needs. Note that neither of those will return all users in your NT domain if that's what you're after (that is a little more complicated).
If you want to manipulate SP lists using Javascript, you should look into using the Client Object Model.
If you retract your solution, the list items will remain there.
Related
I have a very newbie question on AWS. Let's say that I am running a store that offers 1.000.000 different products. Each of the products have their own row in dynamoDB in a table named products. Now I would like to attach a list of tags to each product for example ['football', 'outdoor', 'sport' ... ], so that when the customer searches for sport products with that tag shows up in the results.
I am thinking of the best way to approach this in order to offer fast but also cost-efficient searches, I have so far thought of 2 viable options:
Option 1: Include a tags field for each product that takes a list of tags.
'product_3' -> ['football', 'outdoor', 'sport']
Option 2: Create a new table where the key is each tag and includes a field that takes a list of products instead.
'sport' -> ['product_1', product_3, ... ]
I am inclined to go with option 2 since it feels like it will render the faster search, but I want to double check that I haven't made any wrong assumptions of missed any other superior option.
Would also be great to have an infrastructure that worked with word2vec so that products related to the search word also shows up, even if they are not identical string values.
DynamoDB is a powerful and very useful database, but it is not designed for search. My suggestion would be to use the correct tool for the job.
The pattern that I've used successfully multiple times is to use DynamoDB Streams and Lambda to replicate a table to an Elasticsearch index.
You can then have that string set of tags on each item in DynamoDB and manage them their. Your nominal read when you know the item hash key can be done against DynamoDB. When you want to search you hit Elasticsearch and get all of the benefit and flexibility it provides for searching. One of those benefits being really good pagination compared to DynamoDB's API as well as the ability to sort based on other attributes.
I have a simple SharePoint list which consists of 2 columns, username and a Boolean Yes/No expression. It is used for users to acknowledge that they have read a document. I would like to create a button that would set all users Boolean expression back to ‘No’ when the document is amended/updated. Is there a way to do this?
I am very new to SharePoint and have not had a lot of experience with JavaScript. Thanks in advance for any help!
SharePoint does not provide a way to confirm that the user whether has read the document.
As a workaround, you could add a workflow to update the list value ,Users can start the workflow after reading the document.
Can you please explain two columns that you have added are part of the same document library , Or document & two columns in separate list.
If you have idea of JavaScript, then you can write CSOM Javascript code to implement the above scenario. you can also make use of SharePoint REST Calls.
If you have idea of C#, then you can write even receivers to clear off the boolean values based on Document State Changes.
I am wondering if anyone could clarify my confusion on how to use JavaScript to read/filter SharePoint List items, please?
As a code example from MSDN:
https://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
In the CAML query XML, what is the FieldRef field in SharePoint List? Is it defined column names/list properties?
When ClientContext object load collListItem, it has a (Include) parameter which includes a bunch of field/property names, what are they? Are they defined column names/list properties as well?
Is there anyway I can know what field names are, so I can use/filter the List?
Thank you.
The FieldRef is the internal field name of the column. Sometimes it's the same as the display name but as the display name can be changed you can't be certain of this. When creating new columns, I find it best to create them WithoutSpacesLikeThis and then replace the spaces once created. This makes it much easier to see what's happening when you're referencing them in code or in a URL etc. The same with Sites,Lists, Libraries etc.
The quickest way to find the internal name is to open the column as if you were going to edit it and then look in the URL and you will find the internal name there.
For example, the internal name of ApprovalStatus is at the end of the below URL after Field=. If the field has been created with a space in the name the space will be replaced by %20. E.g. Approval%20Status.
_layouts/15/FldEdit.aspx?List=%7BE07BFB18-BBED-4A57-8988-6CAEB47FAA02%7D&Field=ApprovalStatus
Another way to see the field names would be to use the REST api. You can do this by adding _api/web/lits/getbytitle('NameOfList')/items to the end of the site collection URL. However, depending on the number of items you have in the list, it might return a lot of data.
https://tenant.sharepoint.com/sites/app/_api/web/lists/getbytitle('NameOfList)/items
When ClientContext object load collListItem, it has a (Include)
parameter which includes a bunch of field/property names, what are
they? Are they defined column names/list properties as well?
As far as this part of your question is concerned, can you provide some of the properties to give a better idea of what it is you're talking about, please?
I'm trying to build a custom UI control in alfresco to display the associations of an object type that I have.
Basically I have two object types; Code, which is a key value pair, and CodeScheme which contains multiple child associations to codes, it's essentially a mirror of a map structure I have in a different system.
The problem I have is that the codes are automatically generated, so they get the UID names, whereas really I'd like to present them as 'key=value', 'key=value', etc (ideally I'd like to present it as a table).
I've already created a custom control and added it to share-config-custom, and confirmed that the configuration is working correctly. What I'm not really clear on now is:
a) How to attach a javascript to the control so that I can process the association data.
b) How to get hold of the codes in javascript, and read their properties.
I'm just looking for a push in the right direction.
Thanks :)
One idea would be to use a form filter. Your form filter could iterate over the child references, fetch each child node, grab the data you want to display and then add one or more new properties with that data.
Then, your form control is hooked to the fields your form filter dynamically added to the form data. It can then read and display the data as needed.
Without a form filter I think you'd have to use JavaScript to parse the child association refs and use AJAX calls to fetch each child's node data, then format that as needed. The form filter idea would be less traffic from the browser.
Hi peeps on stackoverflow,
Product: CRM2011, should be latest roll-up
I'm currently trying to get the following to Work:
- A custom CRM form has been made. This form contain the 'Notes' tab. I would like to dynamically 'expand' this IF and only IF the 'Notes' tab contains notes data. I'm trying to do this through JavaScript loaded into 'Form Libraries'. I can easily 'expand' the notes field but I'm having serious trouble determining if the 'Notes' tab contains notes data.
I can understand that accessing the 'notes' data through the DOM is not a good idea so I've tried through XRM. Looked through https://msdn.microsoft.com/en-us/library/gg334351(v=crm.5).aspx to see my options. But I can't seem to get to one where I can access 'notes' and base the expansion of the notes field on if there is data or not in 'notes'.
Is this possible? I'm looking forward to hear from you and thank you very much.
Notes are their own entity type, entity logical name is Annotation, that is why you won't find the notes data within Xrm.Page. I'm making some assumptions here, but if you've set up this custom entity to follow standard conventions, any notes on that record will be separate Annotation records with a reference to the custom entity record. using the sdk.jquery.js script provided with the SDK you can do a query on Annotation records that reference the record you are currently on. That would be a supported way to determine if the record has notes. Using the OrganizationData.svc endpoint you would have an OData query that looks something like this
AnnotationSet?$filter=ObjectId/Id eq guid'34d19133-c0ec-e311-b39c-6c3be5bd2b14'
The guid value there would be the guid of the record you are currently on, which if you haven't already acquired within your script, you can get it pretty easily with something like this
window.parent.Xrm.Page.data.entity.getId().substring(1, 37)
or without the window.parent prefixing it