When using PowerApps, you may often want to do what I have done: set the people picker field’s default value to the logged on user.  There are a handful of posts out there about what to do, but I didn’t find one that easily guided me to the right way to do this.

First, a bit of background you will need to know. A people picker field used for entering new data should be on a data card on a form on a screen.  Then you can modify the data card’s field attributes to get the current logged on user.

When you click on the data card, you will see a box border around several fields, one that displays the heading for the field and another that is the data itself.  Be sure and click on the data field to get to the correct tributes.  Here’s an important thing to note:

The data card is locked automatically when it is added to the form via a data source (SharePoint list, e.g.).  To modify it in any way, you need to first unlock it.  On the right hand PowerApps pane, note there is an Advanced tab to the far right. Click on that then click unlock near the top.

Now clock on the data field.  Note that at the upper left tool bar has a drop down selection list of field attributes in alphabetical order.  Choose DefaultSelectedItems and enter in the expression box next to the attribute name

{
‘@odata.type’:”#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser”,
Claims:Concatenate(“i:0#.f|membership|”,User().Email),
DisplayName:User().FullName,
Email:User().Email
}

The line spacing (i.e. carriage returns) are for readability only and you can use a continuous string of characters if you wish. The important thing is to make sure all of the actual characters above are entered correctly.

I was frustrated for a day or two with this not working.  The reason is that I was entering the expression in the Default or Items attribute and nothing was displayed in the people picker choice.

You can set the people picker to other AD values as well.  For example, to set it to the logged on user’s manager, use

{
  '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
   Claims:Concatenate("i:0#.f|membership|",Office365Users.Manager(User().Email).Mail),
   DisplayNameOffice365Users.Manager(User().Email).DisplayName,
   EmailOffice365Users.Manager(User().Email).Mail
}
Advertisements

I needed a quick PowerAppsapp to display some calculated averages based on documents created by an InfoPath form with recurring fields – imagine an expense report, and you will have imagined something similar.  There were some tricky steps to get this to work, so let me save you some time and trouble in getting there.

First, to connect PowerApps to a xml forms library data source, you first choose SharePoint then the site where the library is located, but when just lists appear, instead choose custom value (check the box) and enter just the library name. THE NAME CANNOT CONTAIN SPACES.  If your library name does contain spaces, you will have to create a new one and get the data into it.

Now add a gallery to the screen in PowerApps and put some fields onto the top datacard using labels.  Now if you want to add up the value of a field on each row of the gallery, create a label outside of the row datacards inside the gallery and set its text value to

Sum(Filter(dtasource.field, field > 0), field)

Or if the field can be negative, change the expression to !=, as skipping o values won’t change the sum.

Why sum(datasource.field) doesn’t work I don’t know, but it doesn’t.

Thanks are not necessary but always welcomed!


A client called in a panic because a sub-site was no longer showing on the link bar, in site contents, and no links to documents there worked any longer.  Vastly puzzling was that there was nothing in the recycle bin related to the sub-site or any of the files.  A search was ambiguous:  it would autocomplete in the search bar but then not find anything.

The real clue came from using a direct URL to get to the site which gave a 403 Access Denied error.  Why, I wondered, would there not be a site not found message from the browser?

It took a bit of snooping to find the problem, but here’s what to do.

  1. Go to the Admin Center in Office 365.
  2. Go to the Exchange Admin Center and choose the recipients tab, then choose the groups tab inside that.
  3. Scroll down through the groups and look for any that have been deleted.  Restore them one by one and see which one(s) bring access back.
  4. Done!

Because the sub-site was never deleted it wasn’t in the recycle bin and more importantly nothing was lost.  No one could get to it any longer was the only issue.  Restoring the groups fixed that.

Thee are probably two takeaways from this:

  • Limit administrators who might delete a group so that inadvertent deletion doesn’t happen;
  • Perhaps give an explicit full control permission to any sub-sites that have inheritance disabled on them so at least one admin can still get in.

The third takeaway might be to remember this tip.


Flow Is Amazingly Cool and Powerful

I have been working with Flow for a few weeks now, and I am delighted with all it can do.  There are some rough edges and some flaws, and I will address one of the rough edges now, and a flaw later on.

When a File Is Created (or updated)

This is the trigger you should use for launching Flow on a Formlibrary.  I’ll just concentrate of when it is created for this post.

So I started with Create from blank on the My Flows (https://flows.microsoft.com to get there).  Click on Search hundreds of connectors and triggers to get to the Flow creation, click on the SharePoint icon, and then on when a file is created (properties only).

In the site address, use the drop down arrow to see a list of sites for your Flow logon.  Chose the site where the forms library is contained.  For the SharePoint library name, follow the steps outlined below.

Getting Flow to the Forms Library

What you need to enter into this field is the ID of the SharePoint library.  You can find the library Id by using SharePoint Designer 2013.  Open it to the site, click on lists and libraries, then click on the forms library you want to use for Flow.  The list information page displays, and at near the top left, below Wed Address: is List ID:.  Copy the list id but do NOT include the {} enclosing it.

Now paste the ID into the library name field in Flow.  Dynamic content will magically appear so your Flow will have access to all of the form library fields/columns.

Thanks to…

I had some great help from Kerem Yuceturk and Stephen Siciliano at Microsoft on getting started with some advanced Flow features and especially this one.

My Unfavorite Flaws in Flow

It probably goes without saying that the interface to access forms libraries needs work.  I haven’t drilled down into dynamic content yet to determine if fields from repeating tables show up, and how one might aggregate data from them into, say, arrays.  My first Flow on a forms library did not require that.

What I hope gets expanded quickly is rich text editing in creating the body of an email.  You can insert HTML features like <b> but not my favorite thing.  Harder to make Flow accessible to larger groups of Office 365 users.

I also dislike intensely accessing functions if Flow.  Some take so many parameters and options that it becomes rather impossible to get them right without trial and error.  A richer build experience would be nice.  A lot nice.

Hope this is of some value to you guys.


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!!!


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.