Working with large SharePoint list data set in PowerApps

PowerApps has a limitation of 2000 items in a data set. A PowerApps collection variable can contain more items than 2000.

Using the iteration function ‘forall’ it’s possible to collect a collection with more than 2000 items.

First initialize the variables:
UpdateContext({varFirstRecord: {}});
UpdateContext({varLastRecord: {}});
UpdateContext({varMaxIterations: 0});`

Populate the variables with the ID/Qualifier of the first and last item. Calculate the number of iterations.
UpdateContext({varFirstRecord: First(Sort('Counterparties Portfolio Roles',ID,Ascending))});
UpdateContext({varLastRecord: First(Sort('Counterparties Portfolio Roles',ID,Descending))});
UpdateContext({varMaxIterations: RoundUp((varLastRecord.ID-varFirstRecord.ID)/500,0)});

Create a collection with iterations and the start (minItt) and end (maxItt) number of that iteration.
ClearCollect(collIterations,AddColumns(AddColumns(Filter([1,2,3,4,5,6,7,8],Value<=varMaxIterations),"minItt",((Value-1)*500)+varFirstRecord.ID),"maxItt",(Value*500)+varFirstRecord.ID));` `Clear(colTarget);` Based on the iteration collection, query your original data source. `ForAll(collIterations, Collect(colTarget, Filter('Orignal DataSource', Qualifier >= minItt && Qualifier < maxItt)));

  • Ensure that the calculation of of minItt and maxItt is part of the iteration collection. SharePoint is not able to execute this calculation in the query.
  • Ensure that you have created a field on you SharePoint list with a copy of the ID field. The ID field not able to use in the collect query, due to the delegation limitation.
  • Be aware of longer load times!

SharePoint Online Authentication without SharePoint API

Accessing SharePoint Online with the SharePoint API is quite easy. You just have to create a SharePoint client context using the SharePoint Client assembly.

Suppose you cannot reference this SharePoint Client assembly. For example if you want to create a CRM Online Plug-In. These plug-ins live in a sandboxed environment where no external assemblies are allowed. How can you access SharePoint Online? There are several blog post about this topic, but the examples didn’t work for me (Luc Stakenborg and Wictor Wilén).

Based on these blog post, my dear colleagues Rene Brauwers and Wesley Bakker and logging in 1000 times at my demo tenant and analyzing the Fiddler logs I came to this solution.


Continue reading

SharePoint for the Social Enterprise

Autumn 2012 I was able to speak at a conference named Congres SharePoint organised by Entopic.

Success Factors Implementing Social Enterprise Platform. Flexibility, Ease of Use, Demand Driven, Individual Value

The conference was not a typical SharePoint conference with a lot of technical sessions, but more about how to implement and embed SharePoint in organisations.

My session was about implementing and adopting the social features of SharePoint in your organisation. What are success factors and how to deal with fears. On the basis of a simple ‘customer-to-lead’ scenario I showed some examples of social features in SharePoint 2013. At the end of the session there were some good questions asked by the attendees. If you have some questions, don’t hesitate to contact me.

The session was recorded and will be soon avaible on the internet.

I would like to thank all the attendees of the session. You can download the slides by clicking the link below.
SharePoint Congres – SharePoint voor de Social Enterprise

motion10 SharePoint Twitter Status Notes Control

The motion10 SharePoint Twitter Status Notes Control is a study project that extends the default status notes control of SharePoint. The study project tried to proof to send the status text to other social media while the default SharePoint status update functionality stays the same. The study project sends the status message to Twitter, but now it’s easy to create code that sends messages to other social media, like LinkedIn, Yammer or Facebook.

motion10 SharePoint Twitter Status Notes Control
motion10 SharePoint Twitter Status Notes Control

The project is available at CodePlex. The project contains the following elements:

  • Hammock for Rest – for communication and authentication (OAuth) with Twitter.
  • Diplo.Twitter – C# Library for easy authentication and sending the status update.
    • The Diplo.Twitter C# Library is extended to save and load Twitter Credentials from SharePoint User Profile Service Application.
  • A feature that will create two persisted objects > the Twitter Consumer Keys.
  • A feature that will register a delegate control.
  • A delegate control that loads a JavaScript file and C# methods to authenticate and route the twitter message.

When the delegate control is loaded, the OnOnit method will check if the Twitter credentials are known in the Secure Store. If not then the connect button is shown. When the user hits te connect button, the user will be redirected to authenticate at Twitter. After that the user is redirected back and the Token and TokenSecret are saved in the Secure Store. After that the user is authenticated to send tweets.

The SharePoint Traffic Light Model

The customizations of SharePoint are very extensive. Problems can be solved on multiple ways. This broad perspective leads to issues. It is not always clear why that solution is choosen. The communication about the different solutions with customers, partners or collegues is sometimes difficult. It should be better if we talk about the same solution and the impact of that solution should be clear. Therefore is the SharePoint Traffic Light Model.

Traffic Light Model
Traffic Light Model

The SharePoint Traffic Light Model divides the different type of customizations tot the colors of a the traffic light. The model is understanding for everybody. With model you can take responsiblity for the choosen solution. The model will also tell something about the impact.

There is a tension between the orange and red customizations. Its the tension between the possibilities of a standard product and the wish of the customer. With orange customizations it is most of the times possible to make an approach to the customers wish. You bounded to the limits of the standard product features (i.e. dataview of content query web part, site definitions. With red customizations you can realize the wish of the customer.With the model you can explain and take resposibility of the impact and possibilities of the solution.

If you want more information about the model please contact me.
If you have remarks on the model, don’t hesitate to make a comment!

Scope with content source rule

I’am creating a feature that setups  the search settings for a project. The feature creates some content sources and scopes. I discoverd that there is no method for adding a rule type ‘Content Source’ on the Scope.  The following create rule methods are availble:

  • CreateAllContetRyle
  • CreatePropertyQueryRule
  • CreateUrlRule

I expected a method like ‘CreateContentSourceRule’, like the user interface offers. Using reflector I dissabled the page page and found out that a new Content Source rule is created using the CreatePropertyQueryRule:

scope.Rules.CreatePropertyQueryRule(ScopeRuleFilterBehavior.Invlude, managedProperties.[“ContentSource”], “yourconcentsourcename”);