Monday, June 26, 2017

Notes from the field: Microsoft Forms

As you may or may not have seen over the past week or so, Microsoft Forms is now in the process of being rolled out to us all!!

read more


by via SharePoint Pro

Sunday, June 25, 2017

DFFS v4.4.3.0

After a loooong BETA period, and quite a few modification to DFFS and the plugins, I’m finally ready with a new production release.

There are a few nice additions like better backup / restore functionality with support for creating restore points, and new loader functionality that lets you load different DFFS versions side by side in the same site. This way you can do a gradual upgrade of DFFS  – one form at the time.

Please read the full change log to see all changes. You find the change log here: http://ift.tt/1AglZXU

Follow the download link here to get the new package.

Please note that the user manual hasn’t been updated yet, but I’ll do my best to update the manual within a few days.

Please post questions in the appropriate forum: http://ift.tt/14Z7XM8

Best regards,
Alexander

 


by Alexander Bautz via SharePoint JavaScripts

Wednesday, June 21, 2017

Get a Free Visa Gift Card when you sign up for Pluralsight before end of June

As most of you know, I am creating quite a few training courses around SharePoint, PowerShell and Office 365 on Pluralsight! I just received an email that they are running an awesome offer until end of month, where you can get a 10$ e-gift card if you sign up for a monthly subscription, or 30$ if you sign up for a yearly subscription! Click the banner below to learn everything about the offer:

There are currently over 5000 courses in the Pluralsight library and more than 40 hours of SharePoint 2016 content, so you definitely have a lot to learn! If your goal is to get certified, check out some of the free certification guides that I have built: http://ift.tt/2tut32N

The post Get a Free Visa Gift Card when you sign up for Pluralsight before end of June appeared first on Absolute SharePoint Blog by Vlad Catrinescu.


by Vlad Catrinescu via Absolute SharePoint Blog by Vlad Catrinescu

Monday, June 19, 2017

Automating SharePoint Administration

For all you SharePoint Administrators, how nice would it be to just automate all things you do, from permission settings, backups, issue resolution to all the 50 million things you do. Well did you know that you can really do that, just by changing the way we all work.

In reality there are a few options available to us for automation, we will discuss each one and the pros and cons.

read more


by via SharePoint Pro

Retrieving Multiple SharePoint Managed Metadata Columns via REST

I’ve used this code a few times in different project now, and I wanted to post it in case it’s useful for anyone. Most of us know that the REST APIs still have some weaknesses, and working with Managed Metadata is definitely one of them. (See: Let’s Capture Missing or Insufficient SharePoint REST Endpoints)

If you have a couple Managed Metadata columns in your list and you just retrieve the columns in REST like so…

request: {
  method: "GET",
  url: _spPageContextInfo.siteServerRelativeUrl +
      "/_api/web/lists/getbytitle('ListName')/items?" +
      "$select=ID,Title," +
      "MyLocation,MyDepartment" +
      "&$top=5000",
  headers: {
      "Accept": "application/json; odata=nometadata"
  }
}

…you’ll get back data like this:

{
    "Id": 5,
    "ID": 5,
    "Title": "Item Title",
    "MyDepartment": {
        "Label": "6",
        "TermGuid": "748ca38e-9cea-488f-9a9a-6a20f6dff80a",
        "WssId": 6
    },
    "MyLocation": {
        "Label": "5",
        "TermGuid": "c8cb412b-ed99-4034-8ca7-5019940ec354",
        "WssId": 5
    },
}

That’s not very helpful at all, since we don’t get the Term itself, just some gobbledy-gook pointers and a GUID. What we really want is the text for the term.

I found a useful thread on SharePoint StackExchange. As is so often the case, Mikael Svenson (@mikaelsvenson) had posted an answer which helped a lot. (We need more Mikael!)

You can do a workaround using the TaxCatchAll field as long as you know which terms belong to which taxonomy field – if you have multiple.

Looking into this, retrieving the TaxCatchAll column was indeed the way to go. By including it in my REST calls, and requesting both the Term and the ID, I could get the text values for the Managed Metadata (aka Taxonomy, aka Term Set-based – seriously, Microsoft???) columns in my list and make sense of them.

At the most basic level, this looks something like this:

request: {
  method: "GET",
  url: _spPageContextInfo.siteServerRelativeUrl +
      "/_api/web/lists/getbytitle('ListName')/items?" +
      "$select=ID,Title," +
      "MyLocation,MyDepartment," +
      "TaxCatchAll/ID,TaxCatchAll/Term," +
      "&$expand=TaxCatchAll" +
      "&$top=5000",
  headers: {
      "Accept": "application/json; odata=nometadata"
  }
}

This “expands” the Managed Metadata columns, returning the text for the terms. But don’t get too excited too fast! We gain the term text, but lose something else (of course!). The data you get back looks something like this:

{
    "Id": 5,
    "ID": 5,
    "Title": "Item Title",
    "TaxCatchAll": [{
        "ID": 5,
        "Term": "Lab 2B"
    }, {
        "ID": 6,
        "Term": "Histology"
    }],
    "MyDepartment": {
        "Label": "6",
        "TermGuid": "748ca38e-9cea-488f-9a9a-6a20f6dff80a",
        "WssId": 6
    },
    "MyLocation": {
        "Label": "5",
        "TermGuid": "c8cb412b-ed99-4034-8ca7-5019940ec354",
        "WssId": 5
    },
}

So we have the text for the terms, but we basically lose the ability to know which is which. Or do we?

When we request the TaxCatchAll/ID property, we get the ID property which ties everything together, though you probably won’t find much documentation on this anywhere. In my example above, the value with ID=5 matches WssId=5 and so on.

I couldn’t find a post anywhere with code that tied all this together, so here we are. I’ve written a little function you can call to get the right values easily called getTaxonomyValue. You call it like this:

getTaxonomyValue(obj, "MyLocation")

…where:

  • obj = the row of data (stored as an object in JSON),
  • fieldName = the name of the column for which you want to grab the term text

Note that I make almost all my REST calls with odata=nometadata these days to reduce the payloads as much as possible; I haven’t tested this with the other variants.

function getTaxonomyValue(obj, fieldName) {

  // Iterate over the fields in the row of data
  for (var field in obj) {
      // If it's the field we're interested in....
      if (obj.hasOwnProperty(field) && field === fieldName) {
          if (obj[field] !== null) {
              // ... get the WssId from the field ...
              var thisId = obj[field].WssId;
              // ... and loop through the TaxCatchAll data to find the matching Term
              for (var i = 0; i < obj.TaxCatchAll.length; i++) {
                  if (obj.TaxCatchAll[i].ID === thisId) {
                      // Augment the fieldName object with the Term value
                      obj[field].Term = obj.TaxCatchAll[i].Term;
                      return obj[field];
                  }
              }
          }
      }
  }
  // No luck, so return null
  return null;

}

Calling this function matches the WssID and ID values within the object and returns the value you actually want.

References


by Marc D Anderson via Marc D Anderson's Blog

Friday, June 16, 2017

Using Azure Functions within SharePoint

By now you should have heard about Azure Function and how powerful they can be, not just for SharePoint. In case you haven’t heard about them let’s review what they are and how to use them in general.

What are Azure Functions?

read more


by via SharePoint Pro

Wednesday, June 14, 2017

Using Azure Bot Services

I am sure by now you have heard about Bots, and not talking about Robots either. I am talking about the little auto chat bots that can chat with you, help you but have no actual real person behind them. I am sure you have used one whether on a shopping site, or even something like Siri or Cortana, maybe even used Alexa on an Amazon device too. This technology is fantastic and what is great is that it is available through Azure Services for us to integrate with our custom applications.

read more


by via SharePoint Pro