New answers tagged

0

Use SP.SOD.executeFunc('clientpeoplepicker.js', 'SPClientPeoplePicker', function () { var neededPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[GiveTheIndexHere]; var usrObj = { 'Key': 'i:0#.w|domain\user' }; neededPeoplePicker.AddUnresolvedUser(usrObj, true); }) Adding my complete code below. The requirement was to auto-populate ...


0

I have done a test in my SharePoint online, when create a lookup column, it is by designer that there will be "None" option in modern experience, it cannot be removed in modern experience. If we set the lookup column as a required column, there is no "None" option in classic experience.


0

The column validation will not take effect unless you try to save a new item or save the changes made to an existing item. I’ve run tests with “Require that this column contains information” set to “Yes” or “No”, in both classic and modern experience and I cannot reproduce this issue in my environment. Maybe you can switch to another list and see if you ...


1

This is really more of a general JavaScript question than SharePoint-specific, but the easiest way is just to use an array variable: var itemprices = []; and then push the values as you find them itemprices.push(oListItem.get_item('Price'));, and then you can loop through your array when you want to do something with each Price. Alternatively, you could use ...


0

Yes, you can use JSON Column Formatting to set a custom format. See the example on formatting users, is probably pretty close to what you want to do, though it also includes thumbnail of the user's profile photo.


1

<View><Query><Where><Eq><FieldRef Name='ID' /><Value Type='Number'>{PUT YOUR LOOKUP ITEM ID HERE WITHOUT THESE CURLY BRACES}</Value></Eq></Where></Query></View>


0

You can use the below code to set validation for a list field using JSOM, $(document) .ready(function() { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', SetValidation); }); varoList, clientContext; function SetValidation() { //Get client context ,web and list object clientContext = new SP.ClientContext.get_current(); ...


0

Go to your 'source column' that contains your values. Then filter on the blanks; add values to the blank items. Then in your 'other column' that re-uses these values you will find that the option (none) has disappeared. In your source column, you can change the column settings to make it a Required field - this way users will not leave it blank.


1

Try using below code: //Display name of your field var fAssignedTo = "Assigned To"; $(document).ready(function(){ BindPeoplePickerWithLoggedinUser(fAssignedTo); }); function BindPeoplePickerWithLoggedinUser(ppTitle){ setTimeout(function(){ var _PeoplePicker = $("div[title='" + ppTitle + "']"); var peoplePickerEditor = ...


1

Users who are granted with Contribute, Read or lower permissions will not be able to “Add column”. The button will still be visible to the users, but they can only show or hide columns. If they try to save the modified view as a public view, they will get “Access Denied” error. You can check user permissions via https://{siteURL}/_layouts/15/user.aspx and ...


1

You could try below nth:child to apply the CSS. My test demo: <style type="text/css"> table.ms-listviewtable tr th:nth-child(4) { display: block; width: 160px !important; white-space: pre-wrap; word-wrap: break-word; } table.ms-listviewtable tr td:nth-child(4) { ...


1

The problem is that the "Members" group by default is granted the "Edit" permission level, and "Edit" is not what you think it is. The "Edit" permission level specifically grants users the rights to "Add, edit, and delete lists; view, add, update, and delete list items and documents. By default, this permission level is assigned to the Members group." ...


0

Instead of "Edit", you can assign the "Submit" permission level, which excludes the "Manage Lists" permission. With this permission level people cannot change the structure of a list or the public views. Or create a new, custom permission level and select the permissions you want to include.


1

Try this, it works for me .ms-vh-div[displayname='Title'] { width: 450px; }


1

Use the below lines of code: dateT =new Date(date.getFullYear(),month, day) ; var posDeliveryDate = dateT; oListItem.set_item('DeliveryDate', posDeliveryDate); Now the dateT will be in the correct format to be inserted into SharePoint list. For more information, refer below link: Updating a list item using date() function.


0

I suggest you create an HTML form in another page, and let that form submit to the list (but you also need to consider the permission levels you would give to the users in order for them to be able to create/update an item) Since 2010 environment is in classic, you can easily create a form via content editor webpart, use jquery/plain javascript to submit ...


0

What are the contents you want to hide from end users? If you do not want to show items created by other users, you can enable item-level permission If you do not want the user be able to edit list page, break the inheritance on the site pages library and only give them read permission. Or a bit more complex way, you can create a dummy list with the ...


0

As the SharePoint 2016 farm is built in the VM, you cannot use your O365 flow service in a different on-premise farm. Microsoft Flow is a cloud service. You can use it against SharePoint 2016 however you must deploy the Data Management Gateway and use that gateway when making connections from Flow. There are limitations when using the Data ...


1

You will find that pretty much all bugs are logical mistakes. :) You say you have the following lines of code in your onFormLoad() function, which runs when the the page loads: // this line attaches your onChangeEquipment function // as the change handler for the radio buttons control NWF$("#" + varCataloguePicker).change(onChangeEquipment); // this line ...


0

You can do as the followings: Create a column named "custom ID" in your list Create a SharePoint workflow with SharePoint Designer 2010 Insert "Set Field in CurrentItem" and set it like the below: set the workflow automatically start when an item is created: Publish the workflow


0

Ok, so there are two parts to this: Get the data from the SharePoint list Put that data where you want it to go in your table For retrieving the data from the list, I would recommend looking into using the REST API from Javascript code you put on the page where your table is, because then you will have the data in a place where you can easily then turn ...


0

<script src="https://site name/jquery.min.js"></script> <script src="https://sitename/jquery.SPServices.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $().SPServices.SPCascadeDropdowns( { relationshipList: "Employee", relationshipListParentColumn: "...


0

"Save as" function is disabled by default because SharePoint forms cannot be saved as new apps and used as template. This feature is currently not available. See the UserVoice post below: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Save-powerapps-form-for-Sharepoint-list-as-a-template/idi-p/93694 What we can do is create an app from a SharePoint ...


2

The problem is the value you have in this variable accResponsible. User field in SharePoint list cannot be update using a var value, we need a SP.FieldUserValue to put it into the list. I find answer here using the person name instead the id is more easy than find user id if you don't have it. How to set any SP.Field Value with JSOM (Javascript) in ...


2

While using JSOM we need to use the internal name (and not the display name of column which you see in the list) of the SharePoint column in code. By looking at an error you are getting I suspect that you are using the wrong name of your PosType field. Check the internal name of your column by using the method given in below article and then use that name ...


0

SharePoint Online Modern List View Web Part doesn't provide function to auto refresh, currently, this is only available for classic view list view Web Part. For this requirement, I would suggest you can submit a User Voice to Microsoft for your convenience. It is a place for customers provide feedback about Microsoft SharePoint products.


0

And to give this really old post another perspective, I just saved a list as template from a SharePoint 2016 onPrem. Afterwards, I tried to apply that .stp file on another server. This ended with a Sorry, something went wrong exception. After searching through the ULS Log, to find the cause for that I encountered this entry: The number of views have ...


1

OOTB SharePoint doesn't give us an option to change the order to descending. You have to try with JavaScript added to the view (either jslink, scripteditor, contentwebpart, customaction). For more information using JavaScript refer this link.


0

In SharePoint REST APIs we need to use the internal name of the columns. And the internal name of your column is OData__x0032_020. I can see an error you made in internal name of column in $select query. Try using it like below: https://server/sites/Estimation/_api/lists/getbytitle('list')/items?$select=ID,OData__x0032_020&$filter=Title eq `CQ`


1

Try using below query in ViewXml (Use internal name of Processed field): <View> <Query> <Where> <Contains> <FieldRef Name='Processed'/><Value Type='Text'>Not Processed</Value> </Contains> </Where> </Query> </View> You can also ...


0

If this is just for reporting purpose we can go with out of the box Storage Metrics report: Navigation: Site Actions >> Site Settings >> Storage Metrics Storage metrics report Note: We can get SharePoint library size, ONLY when you have Quotas applied to the site collection. otherwise, you get "The storage space allocation page cannot be used for sites ...


Top 50 recent answers are included