While creating a submit data connection for a SharePoint forms library is a wizard process and allows selecting the forms library from a listing that the wizard supplies, that is not the way it works for a SharePoint list.  Instead, here’s what you need to do:

  1. From the Data tab, click on Data Connections and then on Add.
  2. In the wizard that opens, click on Create a new connection and also Submit Data.
  3. On the next page, enter a URL in this format:

    https://servername/site/lists/listname

    For SharePoint online, https://<orgname&gt;.sharepoint.com/<site>/lists/<listname>

  4. For file name, either leave it as Form or enter a field by clocking on Fx.  If you want to put some fields together (say lastname anad firstname) use the concat() fuction.
  5. If you want to be able to update data in a list item that already exists, check the overwrite box.  Otherwise leave it unchecked.

    NOTE: If you have an InfoPath form that is used to create as well as update items, you might want to create two different submit data connections, overwrite for one no overwrite for the other.  Use logic to determine which one to use.

  6.  On the next page, you can rename the submit connection or leave the default.

That’s all there is to it.  Finding this in a concise manner was just hard and required lots of trial and error.  No thanks necessary!!!

Advertisements

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.


Imagine my surprise to login after a Windows update yesterday and have no network connectivity!  Here’s what I discovered:

  • In adapter options in Network Connections, the only device that showed up was a connection from a VPN client software program that I had used earlier in the year.
  • In device manager, my network adapter devices were all  there, but in looking at the events in properties, the most current indicated additional actions were needed.
  • On another computer, I downloaded most current drivers, and then on the errant one uninstalled the adapters, installed the new drivers, re-scanned for new devices and they re-installed.

The end result was that nothing changed.  I was a bit desperate about trying to restore or rebuild this computer.  Then I tried something that was simple, and it worked.

In Programs and Features in Control Panel, I uninstalled the VPN software client (in reality I had two different ones, but chose the one that appeared in network connections).  I rebooted, and voila!  Everything was back to normal.

Subsequently I did a search and found a number of posts about upgrading from Windows 7 or 8.1 to Windows 10 and having an old Cisco VPN client installed, but nothing more recent.  These posts suggested doing what I did, so I guess I was intuitively lucky.  I hope this helps you from having any angst or requiring similar luck.


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.


I have often wanted to vary the backup schedule for Windows Backup, but the user interface only offered once a day or more than once a day.  I wanted it to happen not every day, and I finally discovered there was a way.

To get more options, you need to use Task Scheduler, which can be found under Administrative Tools in Control Panel.  When it opens, navigate to Microsoft->Windows-Backup.  You will see the schedule you set up in Windows Backup.  Highlight the schedule, right click and choose Properties.  Then click on the Trigges tab, and finally click on Edit.

When you select Weekly, you now have the option of choosing only certain days of the week instead of every day.  Or select monthly and see

Now you can choose days of the month.

There are more options on the other tabs to help you set the way the Backup task runs.  I hope this has greatly extended how you use Windows Backup


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

 


Scenario

I am in the process of migrating a SBS 2011 server to Windows 2012 R2.  It is mostly, but not entirely done, and some essential tasks have been deferred until time permits.  Both of these servers are Hyper-V VM instances.  The host server and both VM servers use iSCSI targets for a number of key disks.  The virtual machines and disks reside on such a volume.

In spite of a dedicated UPS for the host server and the iSCSI device, they both power recycled for some reason late last week.  I always takes the iSCSI much longer to reboot than the host server, and I expect a few minutes of delay until the VMs start.  However, when I checked later, the 2012 R2 server was not restarted but reporting a failure and asking to do a repair.  A few times trying that made no difference.

How I Fixed This

I selected the tools option on the failure start screen and tried starting in safe mode.  No luck, it still failed.  I also tried low video resolution, same problem.  Then to my delight selecting  directory services restore mode allowed a successful boot.  That made me realize that the NTDS database was probably corrupted.  NOTE:  you will have to logon with a local administrator account.  AD does not start and none of the credentials in it are available.

The first thing I tried was to navigate to the database folder, C:\Windows\NTDS.  I copied the folder contents to C:\Windows\NTDS\Save after creating that folder, then from an elevated command prompt, ran ntdsutil and then the following commands

  • files <enter>
  • info <enter>  This will list the files for the database and logs
  • compact to <full path>  You probably want to create a new folder and provide path to it.
  • quit twice to return to the command prompt

Ideally, you will have a new and well formed NTDS.DIT file in that directory, and you should copy it to C:\Windows\NTDS and overwrite the corrupted file.  Don’t worry about losing anything since you have a copy saved.

Now reboot your computer and it should start normally.

WELL MINE DID NOT!

I was so focused on getting my server back that I can only vaguely recall that the compact command did not work, saying there were log files that had not been applied.  Well, it thought that is what compact would do.  Or maybe it did and the server still did not restart properly.

In any case, I switched to using Esenttutl instead of ntdsutil.

Run an elevated command prompt and type

  • esentutl /g c:\windows\ntds\ntds.dit
  • esentutl /r c:\windows\ntds\ntds.dit

The first is an integrity check, and mine predictably failed.  The second is a recovery command, and that, too, failed with a JET database engine error. So I ran the repair option, /P, instead of /R on the command line.  Voila!  It completed successfully and I reboot to a normal windows server.

So What Was That All About?

In general, Windows databases do not update directly but write transaction log files.  Later, these log files are “played back” and make the actual transactions update the database itself. When an unexpected shutdown occurs, as in my case, it is possible that the database does not close properly and has a corrupted element somewhere in it.

Esentutl is also used for Exchange databases if they become corrupted, and it has saved me many times with SBS errors.  While I was hoping the /R recovery function would work, I was not particularly worried about the /P repair option, and it did work.

You might ask yourself, why didn’t I just restore the directory from the last backup?  Remember those tasks not yet done?  Er, server backup was the next item on the to-do list.  Happy to say it has now been done.