Microsoft Collaboration, CTO viewpoint, and New York

The blog for Office 365, Power Apps, Flow, SharePoint, cloud, ….. plus a little NYC

You are currently browsing the Lists category.

Changing the URL in a Links list: How To

Problem:

You’ve just copied a link list template to another site collection, or performed a 2007 to 2010 migration and have realized that the all the urls in the list point to an old site and a mega cut and paste is required

So you think the data sheet can do the trick…. No

And MS Access can help….. Well no

I was surprised at this as well.

This post explains how to dump the list into Excel and run a macro to change the URL and then paste the new links into the list. This is easier than you think by using Excel a tool that you already have.

I’m not an Excel expert and there could be more elegant ways of doing this in Excel

Much of what is explained is in this Excel file: Example file

Steps:

Dump the list into Excel.

  1. Click on the Export to Excel from the Ribbon in Excel.

 

  1. Create a macro in Excel.

See short video. To see how to create a macro. This could be anything. What is key is to create a macro that you can edit. See figure below:

 

 

 

  1. Edit the macro. Click the edit button on the dialog.

And paste in the following, macro code.

Sub ReplaceText()

‘ ReplaceText Macro

‘ Keyboard Shortcut: Ctrl+r

 

Call ReplaceHyperlinkURL(“co.uk”, “com”)

End Sub

The code above when run will replace the “co.uk” part of a URL with “com”. This could be anything really.

  1. Run the macro from the dialog box

 

All the cells will be searched and if there’s a match, it will replace the text.

Now that the URL’s have been changed.

 

  1. Copy and paste the URL’s in Excel back into SharePoint, using the datasheet view.

You just need to paste the URL column.

Displaying a rich text field in a view

There’s a couple of 3rd party products out there..

But the simplest way to do this is to use a DVWP and convert the field to a label

A bizarre error I encountered yesterday: End users cannot see web parts on the top-level site.

After a roll out, admittedly this feature was not tested….The ability for users to add web parts to a page.

Cause:   Users don’t have read permissions on the Web Parts list. 

Add permissions to the Web Parts list.

 1.       On the top-level web site go to Site Settings in Site Actions

2.       Click the link Web Parts in Galleries. 

3.       Go to Gallery Settings 

4.       Set Permissions for this gallery

This environment for this roll out required restrictive permissions.

What is SOAP?

Microsoft’s IIS has a feature called (Simple Object Access Protocol) SOAP.  Which allows a user to connect to a web service over https/https with an authenticated AD User/group.  This connection transfers XML data between computers such as your SharePoint server. If the web service allows it, you can control what data is selected and displayed on your page.

In SharePoint this can be done in SharePoint Designer in data sources.  all without a .net developer!!!!!

SharePoint web services Link

Working With Large SharePoint Lists

“…the recommendation is that a single list should not have more than 2,000 items per list container. A container in this case means the root of the list, as well as any folders in the list — a folder is a container because other list items are stored within it. A folder can contain items from the list as well as other folders, and each subfolder can contain more of each, and so on. For example, that means that you could have a list with 1,990 items in the root of the site, 10 folders that each contain 2,000 items, and so on. The maximum number of items supported in a list with recursive folders is 5 million items.”
Link

Record Management – thinking about the total amount of documents that may accumulate over a few years. Planning

Click column

In the previous post I explained how to open an InfoPath form in the iframes of SharePoint.  This post will explain how to open an InfoPath form in an iframe of SharePoint.

Steps

Firstly there needs to be code in the column that will target a saved form

Create a column in a view:

=CONCATENATE(“<DIV><a href=’http://<servername>/<Site>/pages/EditInfopath.aspx?formname=/<Site>/Library/”,Title,”‘>”,Title,”</a></DIV>”)

EditinfoPage– To open up the infopath form with the query string:

<iframe src=”” width=99% scrolling=no frameborder=0 marginwidth=0 marginheight=0 height=1000></iframe>

Add this in a content editor web part

<script>

<!–

function getArgs() {

var args = new Object();

var query = location.search.substring(1);

var pairs = query.split(“&”);

for(var i = 0; i < pairs.length; i++) {

var pos = pairs[i].indexOf(‘=’);

if (pos == -1) continue;

var argname = pairs[i].substring(0,pos);

var value = pairs[i].substring(pos+1);

args[argname] = unescape(value);

}

return args;

}

var args = getArgs();

if (args.formname) formname = args.formname;

 

var sourceURL = “http://<servername>/<Site>/default.aspx“;

 

var iframe = document.getElementById(“MyFrame”);

iframe.src = “‘http://<servername>/<Site>/_layouts/FormServer.aspx?XmlLocation=” + formname + “&Source=” + sourceURL + “&DefaultItemOpen=1”;

 

–>

</script>

Limiting a multi value field in a view

 Often you want a view to be nicely formatted and be a set height amount.

 This is how to do it.

 =IF(LEN(Description)>140,CONCATENATE(“<DIV>”,LEFT(Description,140),”<a href=’http://SPSite.com/Site/ListName/_layouts/FormServer.aspx?XmlLocation=/ SPSite.com/Site/ListName/”,Title,”&Source=’http://SPSite.com/Site/ListName/Item&DefaultItemOpen=1′>… (click here for more)</a></DIV>”),Description)

 Pretty easy code to put in a view.

Dealing with large SharePoint Lists and documents Libraries

Best Practices for large SharePoint Lists and documents Libraries
SharePoint lists and document libraries are not designed to handle large numbers of items, in fact as soon as you add more than a few thousand you will see a warning within the List Settings Page that says:

This list or library contains a large number of items. Learn about managing a large list or library and ensuring that items display quickly.
As part of my product suite I consistently have lists with hundreds of thousands of items in them and have learned many valuable lessons in making large numbers of items workable.

1. First off do not use the DataView webpart (from the SharePoint designer) or any xml based rendering webpart as they first grab all the items in the list and then apply the XLST to render and you will face both memory and huge performance problems. The regular list webpart works fine even for large datasets, but you will not be able to get total list counts regardless.
2. If you are planning on sorting or filtering by any columns be sure to add them to the list’s indexed fields in the list settings page.