Thursday, August 2, 2018

S1E18: Cascading Drop Down using SharePoint restAPI Search Refiners

S1E18: Cascading Dropdowns using SharePoint Search Refiner
RestAPI

Taking our search drop-down to another level with cascading
drop-down logic to filter search for 100K job postings list. We walk-through
out the process of filtering search by a refiner value and explain why this
better and more accurate than a simple search filter.

The response time is pretty quick, and because we are
leveraging the power of SharePoint search and refiners, we are able to do this
against 100K items in milliseconds.

We also, walk through the process of passing data from one
angularJS component to another component housed on a separate page.

Key Code Snippets
====================
1) SharePoint Search RestAPI Scopes to a Result Source Name
(not guid)
Note: guids stinks, because they are different per
environment, thus requiring you to change the code when deployed...SMH

/_api/search/query?querytext='*'&rowlimit=1&refiners='RefinableString00,RefinableString01'&selectproperties='Title'&properties='SourceName:Job
Postings,SourceLevel:SPSite'

2) How to filter by a refiner value (URL query parm)
&refinementfilters='RefinableString00:
equals("Business Development")'

3) Here is the entire project:
http://snicdn.s3.amazonaws.com/job-portal/JobPortal-Sample-2018-08-01.zip

#spEasyDev #sharepointrefiners #ngsharepoint #spclassroom




#spclassroom #spEasyDev #bootstrapandsharepoint
#distortedspribbon #sharepointsearch #sharepointrestapi #sharepointpagelayouts
#sp2013 #sp2016 #ngsharepoint #custommasterpage #sharepoint2013 #sharepoint2016
#sharepoint #sharepointandangularjs #odata #sharepointlargelists
#sharepointdevelopertutorial




Tuesday, May 22, 2018

S1E16: How to Fix the SharePoint Ribbon after Applying Bootstrap! sharep...

S1E16: How to Fix the SharePoint Ribbon after Applying Bootstrap!



When adding a custom design that uses the bootstrap framework, there are several ribbon icons, layouts, and spacing that may get distorted due to bootstraps overarching and general CSS rules.



In this video we will walk-through the process on how to correct these mis-aligned items.



We will also look at the logic needed to determine if we are in design mode or live mode with client-side coding. This is important because with this logic, you can do some really cool things, to the angularJS web part for the content managers and hide them from the end users. In this video we will walkthrough this implementation and discuss some of the scenarios.





#spclassroom #spEasyDev #bootstrapandsharepoint #distortedspribbon #sharepointsearch #sharepointrestapi #sharepointpagelayouts #sp2013 #sp2016 #ngsharepoint #custommasterpage #sharepoint2013 #sharepoint2016 #sharepoint #sharepointandangularjs #odata #sharepointlargelists #sharepointdevelopertutorial





Tuesday, May 15, 2018

S1E15: Easy Way to Convert a Complex UI Design into SharePoint Page Layo...

S1E15: Easy Way to Convert a Complex UI Design into SharePoint Page Layout with AngularJS!



In this SharePoint Developer Tutorial, we will walk-through the process of converting a complex responsive deisgn search page into a SharePoint page layout with angularJS.



AngularJS templating really makes this process easy and SharePoint forward. We are working around the Bootstrap grid system, and a a lot fo custom css classes. We must keep all of this in tact, but at the same time, extract the various components needed for custom calls.



This process is known to be very tediuos, and requires great attention to detail, else, things will get screwed-up once we put it in SharePoint.



Check out this video, you may grab a few tips and tricks along the way.



#spclassroom #spEasyDev #sharepointsearch #sharepointrestapi #sharepointpagelayouts #sp2013 #sp2016 #ngsharepoint #custommasterpage #sharepoint2013 #sharepoint2016 #sharepoint #sharepointandangularjs #odata #sharepointlargelists #sharepointdevelopertutorial



Tuesday, April 24, 2018

S1E13: The Easy Way to code with Nasty SharePoint Search restAPI JSON

S1E13: Easy Way to code with Nasty SharePoint Search restAPI JSON



The JSON returned by the SharePoint search restAPI is just down right nasty. Because it is nasty, it will make your code nasty and unscalable.



BUT!!! With the right "data method" to encapsulate this nastiness, our existing pattern will still hold true, and we will get the power of SharePoint search...which is very powerful and widely used/needed in SharePoint Online.



Lucky for you, I've endured all of the pain for you and these 12 lines of code will save your life (i.e. heartache, head banging, cliff jumping)



   function _getSPRelevantResults(endpoint) {

            return $http.get(endpoint, _getConfig).then(function (d) {               

                var results = d.data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;

                var col = [];

                results.forEach(function (rItem) {

                    var item = {};

                    rItem.Cells.results.forEach(function (cell) {

                        item[cell.Key] = cell.Value;

                    });               

                    col.push(item);

                });           

                return col;

            });

        }





#spEasyDev #sp2013 #sp2016 #ngsharepoint #custommasterpage #sharepoint2013 #sharepoint2016 #sharepoint #sharepointandangularjs #odata #sharepointlargelists





Tuesday, April 10, 2018

S1E11: In 40 mins, SharePoint CSOM to Load JSON file into SharePoint Lis...

How easy it is to write CSOM C# code for SharePoint to load a JSON file and dump the content into a SharePoint list.



 We will do all of this in this 40 min video. This really sets the foundation for any integration with external systems that can be exposed with JSON. In this video we will load the JSON from a file, but with a few additional lines of code, you can do the same to load in JSON external service.



 This just one of the videos in the new series Building Custom Solutions in SharePoint the Easy way...which can be found here:
https://www.youtube.com/watch?v=2nhiAr9lplM&list=PLMLjnY5iPR3X2ZS-aIQ4nmYVd6f4la2Ni

#spEasyDev #sp2013 #sp2016 #ngsharepoint #custommasterpage #sharepoint2013 #sharepoint2016 #sharepoint #sharepointandangularjs #odata #sharepointlargelists

 


Monday, April 2, 2018

S1E10: How to Load Sample Data to create a SharePoint Large Lists - Shar...

Here is something every SharePoint Developer should be doing. Performance is always great during the initial development, but what happens when the list or library reaches  a 1000, 10K, or even 1M items? Does your code still perform well?



Some of us may be trying to stay away from SharePoint Large lists of 100,000+ items because of the havoc they may cause, or the fear of performance issues that may arise. As I stated before, 100,000 items is NOTHING for a SharePoint list or library. Microsoft designed lists and libraries to host over 20M items and documents respectively.



SharePoint Large Lists are only concerns if we are NOT designed and performance tuned for large SharePoint list. It is inevitable that lists and libraries will grow over time in SharePoint. Inefficient custom solutions will start to rear their ugly heads. TO avoid these issues, we MUST code for large list during the development process and not the maintenance process.



In this video, we will walk-through the process of generating large SharePoint list using a data-generator.



This just one of the videos in the new series Building Custom Solutions in SharePoint the Easy way...which can be found here:

https://www.youtube.com/watch?v=2nhiAr9lplM&list=PLMLjnY5iPR3X2ZS-aIQ4nmYVd6f4la2Ni

Monday, March 26, 2018

S1E09: RestAPI Calls against SharePoint Large Lists - 100,000 items

In this SharePoint Developer tutorial we make restAPI calls against a SharePoint large list with 100,000 items (at the time of this video there were only 23,472 items, they were still loading). We will discuss the gotchas with working with large lists, and when to create indexed columns and for which columns types.

In addition, some of the steps in this video is a review of the previous techniques we used in earlier videos, as in publishingImage src url, css tricks for responsive design, and odata filtering syntax in restAPI urls.

As mentioned in this video, it is important to work with large sample data during SharePoint development. This allows you to catch performance issues/concerns much earlier in the process, and gives you a lot of data when working with search or other features that requires paging. Make sure you subscribe, as in a future video, we will walk through the process of adding 100s of thousands list items of sample data.

#spEasyDev #sp2013 #sp2016 #ngsharepoint #custommasterpage #sharepoint2013 #sharepoint2016 #sharepoint #sharepointandangularjs #odata #sharepointlargelists