Posts

Showing posts from 2016

Store and retrieve attachment in Pouch DB using Angular/Ionic

Recently, I am exploring pouch db and how to cache a server document in PouchDB in ionic. The topic was addressed in bits and pieces across posts and forums. Below is the code sample which brings everything together. 

Information Architecture - Setup your term store to scale

In this post I am going to put together a list of best practices to consider when setting up a term store in Sharepoint Online. As you may already know term store is collection of term groups. And each term group consists of number term sets. Each term set contains a list/hierarchy of terms. Team group gives the flexibility in terms of access. You can assign permissions to users on their term group, rather than giving them access to the entire store.  Always maintain a corporate/general term group which contains common term sets across organization.  Every group/business unit should have a term group. Pin the terms from corporate term group as required into Business unit term groups.  For example, you plan to maintain list of document types in common term group. Thus, there is a term set created. Marketing department want to use this term set. But, they want to add a few more terms. In this case, you should create another term set in Marketing department term group and pin the te

Ionic 1.x - Custom scrollbar in ion-content

Write once and deploy everywhere. And, Ionic does a super job at it. With Cordova, Electron  you can almost deploy your HTML5 based app anywhere with 10 - 20% change to source code. That 10 to 20% is the place where you grip across multiple platforms and browsers is tested.  If you consider user experience, mobile is different from desktop. Most of the components in Ionic scale well from mobile to desktop. my struggle was always with scroll in ion-content.  The scroll ion-content provides is not desktop friendly. Its is the scroll for touch. How to make it desktop friendly? Easiest option is to let ion-content user native scrolling (overflow-scroll=true) and use CSS (overflow-y) to get the scrollbar. My thought was whether that will look sophisticated enough to mach Ionic UX. So I explored other JS based scrollbars. I searched for some angular scrollbars and I found the following interesting.  https://github.com/itsdrewmiller/angular-perfect-scrollbar https://github.com/asafda

Pulling SharePoint Online List with Managed Metadata into Power BI

Image
Recently, I started to work with Power BI for one of my projects. I am impressed and presently supersized. Product is simple and powerful keeping up to its name.  But, its not free from bugs. Like Force.com I always wondered if SharePoint Online can be used as PaaS. One of the major backdrop for me was reporting until I explored Power BI. In this post I am going to cover a bug which will fail sync between  SharePoint Online List with Managed Metadata and Power BI.  Error:  Expression.Error: We cannot convert a value of type Record to type Table. Details: Value=Record  Type=Type You may encounter this issue in another form. If you try to expand taxonomy column, it will take forever.  Work Around:  In Power BI Desktop, instead of using "Sharepoint List" under "Get Data" use "OData" and supply REST API URL instead.  https://tenantname.sharepoint.com/sites/SiteName/_api/Web/Lists(guid'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx')/Ite

How to prepare your LOB app for Intune?

Image
One of the aspects I struggled with Intune is to wrap an LOB app. In the first cut, it feels like just wrapping the app is enough. But, you need to understand some subtle architectural aspects to get your wrapping right.  App features To get started, let's start with app features.  App uses Azure AD authentication App is a hybrid and uses Cordova (Supports iOS and Android) App communicates with Sharpoint online (via REST) and set up as a Azure AD native application. Thus, conditional access is involved here.  "Send logs via email" - this feature is important as wrapping the application will restrict the email/data sharing capabilities based on the policy  Intune Way You can wrap the application in two ways Using Intune Wrapping Tool Use the Cordova plugin Please visit the link for more details  https://docs.microsoft.com/en-us/intune/deploy-use/decide-how-to-prepare-apps-for-mobile-application-management-with-microsoft-intune Intune wrappi

Embedding Gist in Blogger

I tried to embed Gist into my blogger post. Everything looked fine except the overflow:scroll is not working. Interestingly, without setting fixed height (eg. height:100px) both x and y scrolls are not working.  I tried the following override in blogger template and it somehow broke the overall scroll.  .gist .blob-wrapper {     height: 100vh !important;     height:500px !important;     overflow-y: auto !important; } Finally I settled down to the following, which wrapped the text decently.  .gist .blob-code-inner { white-space:pre-wrap !important; }

SPOnline Search REST API POST request

There is one thing about Sharepoint. It doesn't let you pass even if there is a slight formatting error in your request. And, most of the time error is not so appropriate or no error.  I faced the same situation when i tried to compose a POST request for SPOnline Search REST API. The query text was quite complex as I was trying to retrieve search results based on a managed property which is in turn is generated from managed metadata column. The key here is not introduce  + symbol in place of space as we would generally do in GET request.  Code Snippet

ng-click doesn't work with ion-slides

Issue:   Clicks doesn't work for elements inside ion-slides. Or you may experience slow clicks in the initial load, but eventually click event doesn't work. I tried to place ion-checkbox inside ion-slides. It used to work fine when the chrome is lightly loaded. Once the browser gets heavier, ion-checkbox doesn't respond.  Resolution: This relates to a bug in Swiper component which is used to build ion-slides. It relates to the bug file in their git repo.  https://github.com/nolimits4web/Swiper/issues/1152 The resolutions is as follows: I've found the issue... This two options:  preventClicks  and  preventClicksPropagation , are by default set to  true . Setting them to  false  will solve the issue.