Posts Tagged ‘SharePoint’


I was creating an InfoPath 2013 form that used a people picker to select a user.  I then wanted to get user data like title, first and last name, department, and so on.  I was stumped at how to get the data connection query to work with the people picker user rather than defaulting to the logged on user who was completing the form.  I could not find a single article that properly and easily explained how to do this.

Now you have one.

  1. Create the form with a people picker field.
  2. Add other fields for first and last name, department, title, manager, whatever you want. They can be hidden fields if you need them but don’t want to display them.
  3. Add a field for display name as well.
  4. Create a data connection from SOAP web service (data tab)  as follows:
    1. Enter URL for SharePoint. For Office 365, it is https://<office365name&gt;.sharepoint.com/_vti_bin/UserProfileService.asmx?WSDL.
    2. Choose GetUserProfileByName on the next wizard page.
    3. Click next twice to accept next two pages of default (make sure store copy unchecked on second page of those two).
    4. On the next wizard page, accept the default name or enter a new one, uncheck automatically retrieve data box, click Finish.
  5. On the display name field you created, right click on i and click on text box properties.
  6. In the default value field, click on the fx tab to the right, and follow these steps:
    1. Click on Insert Field or Group.
    2. In the list of fields from the SharePoint list, click on Show Advanced view to see a complete list.
    3. Now you will see the fields from Main, and you should see To as a field you can expand by clicking on the + next to it.  Then do the same to expand Person.  Now you should see DisplayName, AccountID, and AccountType fields.
    4. Chose DisplayName and click OK on all of the boxes that are open to save the default value.
  7. Now right click on that display name field for your form (Not the one you just selected as the default value!!!) and add a rule as an action rule, set a field’s value.
  8. For the field, you want to click on the field chooser to the right of the field value, then making sure the advanced view of fields is showing, click on the drop down box at the top of the list and change from Main to the connection name you created in step 4.
  9. Expand queryFields and then GetUserProfileByName to see Accountname.  Select it and click OK.
  10. Now you want to click on the fx button next to the value field.  Then click on Insert Field or Group, change to advanced view, expand the To field and the Person field, then select AccountId and click OK to close all of the boxes.
  11. Now add another rule to Query using the data connection, no choices necessary.
  12. Now you can set other fields to get the user data (title, department, etc.).  Use the same procedure as you would in specifying those fields as for the logged on user.:
    1. Add action to set field’s value.
    2. Chose the field you want the result in, and I use title for this illustration.
    3. For value, click insert field or group, change to advanced view.
    4. Change from Main to data connection list of fields.
    5. Expand all of the datafields until you see value, click on it to highlight.
    6. Now click on the Filter data button at the bottom left.
    7. Value should appear in the left hand field.  click on the drop down and and choose Select a Field or Group.  In the list that appears, click on Name and then OK to go back to filter settings.
    8. Now click on the drop down on the right hand side where the value is blank, select Type Text… from the list.  Now enter Title and click OK, then continue to close all the open wizard boxes.  You have completed the rule to set a field to the value of the title field for the people picker user selected.
  13. Use step 12 instructions for any other user fields you need.  Instead of Title enter FirstName, Department, Manager, etc. for the type of data you want.

Maybe it will help if I repeat this all as a verbal summary:

Set up to create an InfoPath form for a SharePoint list.  On that form, add a people picker box.  Add a text field to the form that can be hidden or displayed, as you wish.  Create a data connection to get user profile data by name.  Set the default value of the text field to be the DisplayName of the people picker fields.  Add action rules to the text field that will first set the AccountName of the data connection query to be the AccountID of the people picker.  Query the data as a next action item, then set field’s value(s) to be the AD information you require.

Hope this helps, and hope it opens up some new ideas for how to effectively use SharePoint for you.

Advertisements

Scenario

I had quite a few Windows 10 client machines running Office 2016 and also using Office 365 online.  Email was fine and synchronized readily, but as soon as I connected either a SharePoint calendar or contact list, Outlook reported send and receive errors, gave an error window that said server authentication protocol not supported, or both.  Outlook might disconnect from Exchange Server or just not sync.

You might see the following:

outlook1

outlool

This was a frustrating error and reported quite often, but none of the proposed solutions actually worked for my bevvy of machines.  I owe a debt of gratitude to one of the IT staff members at Bellevue School District who snooped around and came up with a fix that does work.

Updates at Fault

A lot of online postings suggest, correctly, that one or more updates has produced this error, and removing them solves the problem.  However, a subsequent and replacement error just returns the error.  And Windows 10 just wants to install those updates for you.

The Fix

Delete the connected contact and/or calendar from Outlook.  Then close Outlook.

Run regedit.  Navigate to the following area and add this key as a 32-bit double word with a value of 0:

HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Identity\EnableADAL

 

Once that is done, open Outlook and see if the same error occurs.  If not, go to Office 365/SharePoint/<calendar>or<contact> and re-connect to Outlook.

If the error persists, you will need to create a new Outlook profile.  If the existing profile has other connections and/or data files, be sure and keep that profile so you can add them properly to the new profile.  Once the new profile has been loaded and is syncing properly, you can go back and remove the original profile.

To make this even easier for you, create a text file but rename it to <something<.reg on your desktop or other convenient location.  Right click on it and choose edit, then paste in the following lines.  Save it, then click to open and it will add the key to your registry.

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\Identity]
“Version”=dword:00000001
“EnableADAL”=dword:00000000

 


What is SkyDrive Pro vs. SkyDrive?

SkyDrive Pro is not to be confused with the free SkyDrive you can get at live.com.  What may be confusing to you is that they have similar names, and you might even use the same login name and passwords to access each of them.  But that is just co-incidence, much in the same way that the user name and password you might use to log onto your bank account and a news web site might be the same but those sites have no real relationship to one another.

So what is SkyDrive Pro?  It is a 25GB storage space that you get to via Office 365, but unlike he “Team Site”, this is a personal site just for you and based on your user logon to Office 365.  All the things, or at least most of them, that can be done on the team site – like creating libraries, lists, etc. – can be done on the SkyDrive Pro site.  But the data you store there is visible and accessible only by your logon.  (There is a way to store data so that all other Office 365 users in your organization can see it, but will discuss that shortly).

 SkyDrive Pro 2013 in the Office 2013 Suite of Programs

There is an important difference about SkyDrive Pro from the Team Site besides exclusively belonging to you.  There is an Office 2013 program, SkyDrive Pro interestingly enough, that does two things:

SkyDrive Pro 2013 makes a local copy of your Office 365 SkyDrive data so you can access it even when you are not online. SkyDrive Pro 2013 automatically synchronizes the data between your local copy and Office 365.  Update it in either place and the changes are replicated.

And yes, if you were wondering, you can use SkyDrive Pro 2013 on multiple computers.  Let’s say you are using it on your office and home office computers.  You update the local copy on your home office computer, and that replicates to Office 365 in the cloud.  That in turn replicates from Office 365 to the local copy on your office computer.

 Setting Up SkyDrive Pro 2013

If you already have Office 2013 Professional Plus installed (from Office 365, e.g.) then SkyDrive Pro 2013 is already installed on your computer.  You might want to pin this program to your task bar for easy access.  In Windows 7, click on the Start menu, then All Programs, scroll down to Microsoft Office 2013 and expand it, right click on SkyDrive Pro and click on Pin to Task Bar.  In Windows 8, swipe to the lower right hand corner of the screen to bring up Charms, choose the Search Charm, and start typing “SkyDrive Pro 2013.”  As soon as it appears, right click on it and at the bottom of the screen, choose Pin to Taskbar.  Return to the desktop.

On the taskbar, click on the SkyDrive Pro 2013 icon to launch it.  The first time it runs, it will prompt you to synch files for the first time.  You may be prompted for a URL of the library to synch to, or that may already be filled out for you.  If it is filled out already, just click on Sync Now.

If you are prompted for a URL, then close the window and perform the following steps instead:

  1. Open Internet Explorer or FireFox or Chrome.
  2. Go to http://portal.microsoftonline.com, 
  3. Log onto your Office 365 account.
  4. On the horizontal navigation bar at the top of the next page, click on SkyDrive.
  5. When the SkyDrive site opens, click on Sync at the upper right just below the user name.

SkyDrive

You should see a small window open asking to Sync Now.  Select that.  Subsequently, a second small window may open asking you to choose an application in which Microsoft SkyDrive Pro appears.  Click on it and then click OK.  Briefly another small window may appear informing you that your computer is contacting the server, and finally another window that sync is preparing, then finally that it is ready and you can view your files.  Click Show my files to do so.

Subsequently when you click on the SkyDrive Pro icon, it will open the folder from your local hard disk.  You will note the location of this folder is C:\Users\<profilename<>\SkyDrive Pro where <profilename> is the name of the user profile you are logged on as.  Generally it will be your log on name and sometimes with the domain name added.

o365-2

Please note on the screen shot above both SkyDrive and SkyDrive Pro appear.  That is because I set up a personal SkyDrive account in addition to having an Office 365 account.  They are not the same thing even though the names are similar.  It is as though Drop Box had one account for personal and another named Drop the Box for something else.  Jeez.

Sharing Data with Others in Your Organization

Notice in the screenshot above “Shared with Everyone” folder.  Open that and place a file or folder there, and anyone can access it.  Otherwise, the files are private to your log on.  Pretty simple, eh?

 What is the SkyDrive Pro Folder?

What SkyDrive Pro 2013 does is create a local folder in the path specified above, and it also sets up an automatic synchronization between that folder and the SkyDrive SharePoint site in Office 365.  Recall that the SkyDrive site in Office 365 that you see when you log on to the portal is private!  It belongs to your Office 365 log on exclusively.  Coupled with SkyDrive Pro 2013, it does a bi-directional synchronization to SkyDrive Pro folder on your computer.  In other words, if you add, change or delete anything in the SkyDrive Pro folder on your computer, those changes are automatically replicated in the SkyDrive SharePoint site in Office 365.  Likewise, if you add, change or delete anything in that site, it is automatically replicated to your computer.

Note that you do not have to be connected to the Internet to access files, or add files, to the local SkyDrive Pro folder.  Once you are connected, replication in both directions takes place without you having to do anything.

This feature makes it perfect when you are using more than one computer: say your office computer, your home computer, and your laptop computer.  Set up SkyDrive Pro on each.  If you make changes on your laptop while traveling, for example, once you connect to the Internet, those changes are replicated to Office 365.  And Office 365 in turn will replicate them to the home and office computers.

 The SkyDrive Pro 2013 Folder

When you click on the SkyDrive Pro icon on the taskbar, or from File Explorer under Favorites, or by browsing to the folder location.  The contents of the folder will appear as in any other folder on your computer.  However, SkyDrive Pro adds a crucial piece of information.  An icon will appear just before the file or folder name.  The icon will be one of the three following ones:

  1. A green check mark.  This indicates the file has been successfully synchronized to Office 365.
  2. A circle with two curved arrows inside.  This indicates that the file is awaiting synchronization to Office 365.
  3. A red circle with a white “X” inside it.   This indicates there is an error synchronizing to Office 365. It is either a file type that cannot be uploaded to SharePoint, in which case you should not put it in SkyDrive Pro folder, or the file name is invalid.  Invalid file names contain characters like “%” or “&” and several others that are invalid in SharePoint.  Or the file name has consecutive “.”  Myfile..ppt, for example, is valid in Windows but not in SharePoint.  Change the file name to allow synchronization.

You can see the icons next to the file names on the screen shot I posted above.

 Using SkyDrive Pro

The first thing you should do is move all of your files in My Documents to SkyDrive Pro, then abandon completely storing or accessing anything from My Documents.  If you save documents on your desktop, do the same thing: move them to SkyDrive Pro and cease using your desktop for storage.  If you save your documents to another location, well you get the idea.  You can open My Documents, any other folder, and also SkyDrive Pro folder and simply drag things from one place to the other.

When you are saving a document, say from an email attachment or from an application like Word or Excel, simply browse to the SkyDrive Pro folder and save it there (or to a subfolder there).

 Why Go Through All that Trouble?

Just to state the obvious, it is NOT more trouble to save or access things from SkyDrive Pro than from any other location.  There is a modest, but simple, effort required to move everything from other locations to it though.

Consider these benefits:

  •  If something catastrophic happens to your computer – lost, stolen, hard disk crash, accidental erasure, etc. – you don’t lose any of your files.  A copy is at Office 365 and readily restored to any computer.
  • You can keep your files current and accessible on multiple computers you use.
  • You can access your files while traveling with no Internet connection.
  • You can rest assured that Office 365 is backed up, redundant and robust to protect your data.
  • SkyDrive at Office 365 supports version control, so if you screw up a file, you can readily restore the previous version and save the day.
  • If you don’t have any of your computers with you but have access to one, you can still get to all of your files by accessing them through the Office 365 portal.  And if that computer doesn’t have Office 2013 on it, you can use the Office Web Apps or Office on Demand at any time.

A Few More Things

You have an icon in the systray for SkyDrive Pro and another for Microsoft Office Upload Center (the latter is an orange circle with a large up-pointing arrow).  When files are synching, the SkyDrive Pro icon will have a green moving bar underneath it.  Hover your mouse over it and a popup will show how many remaining files are waiting for synch.  Open Upload Center to see any errors in uploading, such as unsupported file types or invalid file names.  File names must conform to SharePoint file name rules, so certain characters valid in Windows file names will not work in SharePoint.

Saving files, or opening existing files, from Office and other applications is quite simple and easy.  To open a file, for example, click on the SkyDrive Pro (or similarly named) icon under Favorites or open the SkyDrive Pro folder from SkyDrive 2013.  Browse to the file you want and click to open it.  To save a file, follow a similar strategy

Files are synched to Office 365 only when a file is closed after updating or adding.  Don’t depend on synching a file that remains open for days at a time.  A good example might be a QuickBooks file.  As long as you close it after daily use, it will synch to Office 365.  A better strategy might be to set up QuickBooks to backup the file on an automated schedule to your SkyDrive Pro site.  Once the backup is complete, it is synched to Office 365, giving you a local and a cloud-based backup.

You may recall that if you go offline, say taking your laptop or table while traveling, or because your Internet connection is down, you can make changes to your files on the local SkyDrive Pro folder and once connected to the Internet again, those changes will be replicated onto Office 365.  But here is a caution if you are using Office 2013 SkyDrive Pro (Office APP) on more than one computer:  If you make changes on one of those computers to the folder and don’t go online to synch them but instead make changes to the same files or folders on another computer, you will create a synch error or worse cause an overwrite to the changes on at least one of those computers.  In normal operation, I consider this unlikely, but sure as I write this someone will do it.

If you are using a Windows tablet device, such as a Surface Pro, remember that your local copy of your folder is going to be as large as the online store.  Since these table devices are solid state disks (SSD) and generally 32GB or 64GB for all your storage, including the OS and program files, you might run out of room.  In that case, consider moving older or seldom-used files to your Office 365 team site libraries.

Summary

SkyDrive Pro is a personal SharePoint site for each Office 365 user.  Coupled with Office 2013 SkyDrive Pro, a local folder under your user profile is used to store data which is automatically synched to the SharePoint site.  Used in place of My Documents, or some network share, it is an excellent and vastly superior way IMHO to have online or offline access to your files, to have automatic cloud backup, and access to them on multiple computers or simply through an Internet connection and browser when your own computer devices are not available.