Archive for the ‘Office 365’ Category


I developed an InfoPath form that, after being submitted by a user, also needed to be subsequently updated for several different approval levels.  That meant that the submit option had to allow for the form instance to be overwritten as it was approved (or rejected).  At the same time, users needed to be able to create a second submission for the same identifying fields (in this case, I concatenated displayname + date +counter, the last being a hidden field).  I had planned on doing a query on the form library to see if a record existed and if it did, bump the counter automatically  Alas, I discovered that a query on a forms library just isn’t going to work.

I felt stumped and frustrated.  If the user just submitted a new form, it would overwrite the previous one instead of creating a new instance.  I had a flash of inspiration that solved the problem.

Instead of having one data connection for a submit function (allow overwrite to get approvals to work), I added a second (don’t allow overwrites).  In the form logic, I was already detecting whether it was an initial form submission or a subsequent approval, so I changed the submit for a new form to use the no overwrite connection.  Now, if there is already a form for the user and the date, submit produces an error.  On the form, I have a checkbox that if the error occurs, the user knows to check and it ups the counter as part of the submit name.

I wish it were more sophisticated.  I would have preferred to query the form library and “know” the record exists and to increment the counter without involving the user.  I would prefer that InfoPath notify me if an error occurs and let me handle the exception.  But this is as good a compromise as I have come up with.

Perhaps you will post a comment if you have other ideas on how to solve this probelm.

Advertisements

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.


Scenario

The client machine on which this happened was Windows 10 with Office 2016 (Pro Plus from Office 365) installed.  It started happening suddenly according to the user.  When Word, for example, would launch, an error text displayed that work files couldn’t be opened.  Additionally, if Word, etc. were trying to open existing files, they never loaded and an error was displayed that the file could not be opened.

Red Herring

I first thought it might be a permissions error, so I looked at permissions on folders and saw that the user not only had them but was also a local administrator.  To trouble shoot some more, I tried to give another domain user privilege, but THAT gave me a RPC error when I tried to add one of the enumerated users.  So I concentrated on domain membership.  For a while.  In fact, I was about to remove the client from the domain and re-add it, but thankfully did not.  It would not have solved the problem.

Next I decided to look at environment variables.  In particular, TEMP and TMP.  Both were correct with %USERPROFILE%\AppData\Local\Temp.  I reset them anyway but no luck.  Same errors.

What Did Work

The problem was registry settings.  I launched REEGEDIT and navigated to

HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders

Look at Cache and Cookies.  On the client machine, these had values that began with C:\Users\<username>|Appdata\Local\Microsoft\…  I changed them to %USERPROFILE%\AppData\… and closed Regedit.

That made everything work.

I checked my own computer, which has a similar configuration, and the settings that did not work on the client machine worked fine on my own.  I am not sure why this is the case.  But never look success as your enemy, more like a virtuous being you will never understand,


OneDrive for Business and/or SharePoint Libraries Synced

If you had your OneDrive for Business library and/or other SharePoint libraries synced and then you upgraded from Office 2010/2013 to Office 2016, there is an excellent chance that syncing will stop.  It may be coincidence that this showed up along with an upgrade to Windows 10, but the primary issues seem to be with Office 2013.

Try This First

Open task manager and see if OneDrive for Business is running, or look in systray for the blue clooud icon indicating it is trying to sync.  If it is not running, go to the start menu (Windows 7 or 10) or look in Applications (Windows 8/8.1) and open OneDrive for Business.  You won’t see anything unless you look in systray again.

If it is running, either because you started it or it was already running, right-click on the systray icon and see if it brings up the context menu.  Hopefully it will, and you should choose repair. Let it run to see if that fixes your problem by then seeing if things start to sync.

I was not so lucky.  I got no context menu when I right-clicked.  More than that, I should 13,000+ files syncing (size of all my synced libraries) and it never changed.

What Worked for Me

I tried several things, none of which actually did any good towards fixing the sync problem, but for your information, and in hopes maybe they would work for you, here they are:\

  • Started OneDrive for Business, restarted the computer and tried again.  Nope.
  • Ran quick repair on Office (installed from Office 365 BTW).  Nope
  • Ran full repair on Office.  Nope.
  • Opened Office 365 and went to each library and tried sync icon.  Nope.

If you too got none of those to work what you should do next is uninstall Office 2016.  Don’t panic about settings like Outlook profiles, signatures, etc.  They won’t disappear on you.

For the next step, rename the synced folders on my local drive.  In my case, the local copies were all on Drive C:, so navigated toC:\Users\<myprofile>.  If you synced ShareSharePoint  libraries you will see a folder Named SharePoint.  DO NOT DELETE THESE FOLDERS OR FILES!!  Rename it to have an extension of .old (you can do anything you want to get rid of the original name, but I would just add some sort of extension and will explain why later).  Doing this AFTER removing Office 2016 doesn’t give you an error that the files are in use.

Now rename the OneDrive for Business folder.  It, too, in in your user profile, with a file name of One Drive – <domain> where domain is your Office 365 user domain.  Add .old to it as well, for example.

Now re-install Office 2016.  If your source is Office 365, open the portal, click on the gear wheel, and choose Office 365 Settings, then either Software (if your site has not been recently upgraded) or Installs (if it has).  Click to download and install Office 2016.  If you didn’t change your computer name, then it already knows you are authenticated on that computer.

When the install is finished, start OneDrive for Business.  You may get error messages that it can’t find the libraries to sync.  If you do, then right click on the systray icon and choose Stop Syncing a Folder, then select the folder(s) and stop synching all of them.

Now, start with the SharePoint libraries you want to sync.  Open the Office 365 portal, navigate to the sites, then to each library and choose sync.  When all have finished, you can now turn your attention to OneDrive.

Here is what I had to do to avoid getting an error on sync that the file could not be opened.

  1. Stop OneDrive for Business.  You can do this in task manager, or right-click on the icon in systray and choose Exit.
  2. Open the Office 365 portal and navigate to your OneDrive for Business.
  3. Click on the sync icon, then allow it to sync.

It took a bit for my files to come across as I had a large amount in OneDrive for Business, but it finally caught up.

But Then…

I started seeing that horrible red circle with the white X appear on the folder and file names in the local folder.  I thought that very strange since all the files were synced before and there should have been no errors.  So I looked at sync errors – right-click on the icon in systray and choose that option – and saw that file after file was asking for credentials.

This is what Microsoft support describes as a known issue.  There is an update to fix it, and if you open an Office 2016 product, click on File then select Account, you will see an update button.  Click to apply the update, then reboot your computer.

While you are there, however, make sure that your Office 2016 is connected to

  • Office 365 SharePoint
  • Office 365 OneDrive for Business
  • OneDrive if you have a personal account that you also use.

I also had to do a bit of tweaking to finally get sync going again for OneDrive for Business.  I stopped the sync, did a repair, then started it again.  It did not seem to get things moving.  So I removed OneDrive for Business from the sync sites, went back to Office 365 and synced it again.  Finally, when it started reporting “need credentials,” I went off to do something else.  When I came back several hours later everything had synced and no errors were reported.

Go figure.

Files Updated Locally but Never Synced to Office 365

You may have a  situation similar to mine in that I had opened and updated files locally as well as created new ones, but they never got synced to the cloud.  So the final step is to “sync locally” with those changes.  That is why it was important to keep the old local copies because those copies hold the updated files and folders.

To “sync” them, I used xcopy.exe from a command prompt.  Add the parameters “/e /s /i /d” to copy only newer files (/d with no additional parameters) and add any missing files and folders.  Assuming that your files are synced on Drive C:, the default location, try these steps:

  1.   Open cmd prompt window.
  2.   Navigate to C:\users\<profilename>.
  3.   Look for the folder SharePoint and the one you renamed to SharePoint.old.
  4.   Enter the command xcopy sharepoint sharepoint.old /e /s /d /i
  5.   This should copy the files that are newer to the local syced folders and then in turn up to Office 365.
  6.   Repeat the command for OneDrive for Business new folder and the old, renamed one.  Be sure and use ” around the directory name, as in xcopy “onedrive for business.old” “onedrive for business” /e /s /d /i.  Replace the directory names in this example with the actual directory names on your drive.

When everything has synced to Office 365 and you are comfortable with the files that are local and in the cloud, you can safely delete the old, renamed folders from your drive.


In my previous post, I listed the registry change to get sent email into the shared mailbox sent folder; otherwise it ends up in the sent folder of the primary email account.  Turns out the very same thing happens to deleted items, but there is also a registry key that will fix that.

  1. Close Outlook if it is running.
  2. From the search bar in Windows 10, type regedit and then click on the result to run.  In Windows 7 click Run and type regedit then click OK. Or from Windows 8 search, type regedit and run it.
  3. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Options\General.Note Office 2013 uses 15.0, Office 2010 uses 14.0, 2007 12.0 instead of 15.0
  4. In the right hand pane, right-click and choose New DWORD.
  5. Type DelegateWastebasketStyle for the name and press enter.
  6. Right-click on the newly created entry and choose Modify.
  7. Enter 4 for the value.
  8. Exit regedit.
  9. Restart Outlook.

You are done.


What Are Shared Mailboxes

Although shared mailboxes are a feature of Exchange Server, I will focus more their use in Office 365.  A shared mailbox there is one which doesn’t require a specific user license but is created with access granted to other users how do have Exchange licenses. Additionally, they can be granted permissions as well.

Why use shared mailboxes and not just use a distribution list?  When you use a distribution list, incoming mail is forwarded to each person on the distribution list, and in general it is mixed with all the email for all addresses associated with that person.  In other words, mail from one particular address is not distinguished and separated.

A bigger problem can occur when sending replies or new emails. Although  inbound mail is sent to everyone on the distribution list, there is no guarantee that any replies, or new emails, will be copied to those recipients as well.  Keeping all of the sent and received emails together is at best challenging.

Shared mailboxes solve this problem.  It has its own set of standard folders such as inbox, sent, etc., and you can create custom folders.  If you have send permissions you can send from its email address.

So What Is the Problem?

Standard behavior for Outlook is to put all sent mail into the primary mailbox Sent folder, no matter what email address or mailbox you send from.  If you have all of the email related to the shared mailbox in its container, why would you want to mix sent items with your own?

There is a Solution

First, close Outlook if it is running.  While you can make the change while it is running, it needs to be restarted before it will work, so you might as well do it now.

From the search bar in Windows 10, type regedit and then click on the result to run.  In Windows 7 click Run and type regedit then click OK. Or from Windows 8 search, type regedit and run it.

Expand HKEY_CURRENT_USER and keep expanding until you have reached

HKEY_CURRENT_USER|Software\Microsoft\Office\16.0\Outlook\Preferences

Note this is for Office 2016.  If you are using Office 2013, change the 16.0 to 15.0; Office 2010, change the 16.0 to 14.0.

In the right hand pane, right-click and choose New->DWORD.   For the value type

DelegateSentItemsStyle

and press Enter.  Then right-click on that key when it shows up and click Modify.  In the Value data box, enter 1 and click OK.

Exit the registry editor.

Start Outlook and give it a try.  You will see sent items for the shared folder in its sent folder, not in your primary email sent folder.

 

 


A Shortage of Names? Who Knew?

I would have thought that my friends, literally down the street from here, would not suffer a paucity of names so bad that they had to re-use them.  And given the name change from Sky rive to OneDrive, I would have bet they would have come to realize that naming two different things with the same name would not continue to be a good thing.  At least OneDrive for Business versus OneDrive should help define the space in which the products dwell and delineate their use and functionality.

OnDrive with Microsoft Account

Anyone can get a Microsoft account – live.com has become outlook.com – and with it, get a OneDrive account.  OneDrive, when set up on your computer, actually creates a folder called SkyDrive (it may now created OneDrive but I have a pre-name change instance) in your user profile.  So the location of the folder is something like C:\users\<userprofilename>\SkyDrive.  Installing SkyDrive also the folder instance in Favorites on Windows Explorer, although it is actually the same folder.

Save items in this folder and they are copied to your outlook.com space in the Microsoft cloud.  You can access the cloud folder, and the same data, from any other computer where you have installed OneDrive and used the same Microsoft account log on.  There is also a Windows Phone app for it, and no doubt iPhone and Android apps as well.

Make changes to what is in this folder, and those changes are synched to the cloud storage.  Even if you are not connected to the Internet when those changes are made (think being on an airplane), when you next connect they are replicated.  And then synced with all other OneDrive instances you use, like your desktop at the office, tablet, phone,….

OneDrive at Office 365 -Microsoft Organizational Account

OneDrive for Business, formerly known as SkyDrive Pro, seems to feel very similar to OneDrive.  But there are differences, and why you would want to use one over the other also drives choices.

OneDrive is free and is intended for personal information while OneDrive for Business is available to Office 365 users.  It is intended for corporate or organization information.  OneDrive for business is, in its cloud form, a SharePoint document library set up for the individual user.  As such it is controlled by the administrator for Office 365.  A less “polite” way to say this may be that if someone leaves the organization, they can take OneDrive personal with them but OneDrive for Business stays in your control and possession.