90 comments

  • Wonderful!! Thanks Laura !

    Like

  • I’ve used this method many times! I also have it pull in other information from the UPS as well. We several user defined fields in UPS that I access this way. We have over 200 franchise offices that the user could be a member of 20 of them. I use this method to pull in their preferred franchise (most recently used) and then a drop down list with the other franchises they can choose from as well.

    Thanks Laura!

    Like

  • Very informative post. What if the PreferredName could not be the current login user.

    For example, the people picker is populated by a managers group. But a manager is not allowed to approvetheir own expense reports.

    So the people picker should list all managers EXCEPT, the manager viewing the form? Any suggestions?

    Thank you

    Like

  • Hi Mark,
    You could do something custom here. create a new field, just call it PickedPerson or something. Set the default value as the AccountID field of that people picker. You can create a validation rule that will give an error if the picked person is equal to the AccountName of the currently logged in user.

    Like

  • Hi Laura,

    What I am trying to do is slightly different, asking you in case you can help me here.

    I read a person/group field (note that they are repeating in nature) from a different list. I use double eval method to read all repeating fields and concat the AccountID, DisplayName and AccountType with a “;” respectively. The issue here is after I place those concatenated values in my current list in their respective fields, the person/groups do not get auto resolved. A simple tabbing and clicking outside the box resolves them.

    Like

  • Srinath,
    Sorry, I don’t know of a better way to do it with repeating names being imported like that. Each name is going to have to end up as a new row inside that people picker.

    Like

  • Hi Laura,
    When I follow this method, I always get this error
    ” An error occurred while trying to connect to a Web service.

    Would you know what I could do to resolve the issue.
    Thanks

    Like

  • Hi Laura,
    You mention that this works with every version of Sharepoint 2010, but I thought the UserProfileService will not work with Foundation 2010. Can you please clarify for me.

    Thank you.

    Like

  • Qudsia and Scott,
    Please try the oher method that I blogged about here:
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=172

    Like

  • Hi Laura

    Thanks for this – it is incredibly helpful as this is something one would expect to be a standard feature.

    I do have a question; could this method be amended to pull through fields stored in an user’s AD profile such as EmployeeID or Location?

    Many thanks for your help

    Like

  • Matt,
    Yes, absolutely! Usually on form load, I pull in other fields like department and WorkPhone, and place them in the appropriate fields in the form.

    Like

  • Steven Sharepoint Virgin

    Cool, just did this–didn’t work at first, a delay between republishing and the page, so once it got refreshed it worked!!!!!

    Like

  • The above information works for the case of new form. If at all I had to populate the people picker value with the current user based on other field value, it does not work. Could you please share how to fic this?

    Like

  • Hi laura, When I enter the location of the Soap Definition I receive the error:

    The data source file is accessed through a redirection from a different domain, which is not allowed. If you want to use this data source file, copy it to a location within your security domain.
    Access is denied.

    Now i have checked that my form is set to fully trusted and I still cant bypass the error. I have tested the url in IE and it works so I am wondering if you could assist?

    Many thanks

    Ben

    Like

  • Hi Laura,
    I am trying to set multiple persons as default in a People Picker control. The persons are stored in a different list in SharePoint.

    I can build a concated list of AccountId (“Id1;Id2;”) and I was able to set this string as value of the People Picker and the persons are displayed correctly (no error in Check Names).

    The problem is, when the InfoPath form is submitted a message pops up telling me about errors in the form.

    It seems that the People Picker handles the value I set as single person.

    Can you think of a solution for this?

    Many thanks,
    Thomas

    Like

  • Siva,
    Sorry I don’t understand your question, can you please re-phrase, and add more detail?

    Ben,
    So don’t use a different domain, use the one that your form is already published to.

    Thomas,
    Sorry but I have never been able to figure out how to prepopulate with multiple people.

    Like

  • This works – thanks very much. My only issue is that I get “domain\username” format in the picker and have to click the check name to get it to resolve… does this happen to you?

    Like

  • Hi Laura,

    Thanks for sharing this!

    I’m getting this error on my Sharepoint 2010 Online /365..
    **********************************
    An error occurred querying a data source.
    Click OK to resume filling out the form. You may want to check your form data for errors.

    Hide error details
    An error occurred while trying to connect to a Web service.

    An entry has been added to the Windows event log of the server.
    Log ID:5566

    Correlation ID:3e9ac015-f122-41f1-89dc-d5ba434e82bf
    *******************************

    Any idea?

    Like

  • Why does this not work in edit form only in new form?

    Like

  • I just set the userID field to have a default value that is the userName() function and uncheck the Refresh checkbox.

    Like

  • SpBB, the getuserprofilebyname service does not work if you are using forms based authentication in SharePoint Online.

    Like

  • Badajoz,
    The whole reason for obtaining the “preferred name” is to get the first name last name format so that you don’t have to do that. Your profile sync must no be pulling that field over using that standard.

    spbb,
    If you can’t get to the web service, that’s a whole other issue. Try navigating to your site with /_vti_bin/userprofileservice.asmx after the site. Usually if you can’t get to the web service that’s something to do with your firewall or some other connectivity issue.

    Robert,
    You can make it do that in edit mode. It all depends on when you do the query. If you do it on form load when it’s a new form, then it will only happen with new forms. If you do it on every single form load (with no contition) then it will happen every time the form is opened.

    Chip,
    I don’t use that method because then you still have the little red underline and have to resolve it (in my experience).

    Ryan,
    There’s just a different syntax to use if you have FBA.

    Like

  • Hi Laura, i have a question. i have a repeating table with people picker. i would like to give all the users from that repeating table people picker, read access to that form. how can i achieve this. Please help me.

    Like

  • I created a sp list then customised the form in InfoPath using the GetuserProfileService to pull back PreferredName, Title, WorkeMail, WorkPhone and in preview all works fine.
    I then publish to sp but when I add a new item none of the fields is pre-populated except for some spurious characters in FullName (renamed Title) column.
    What is happening between the client and browser versions ? This is driving me nuts as it works fine on the client.

    Like

  • Hey!

    I am having similar issues to RichardC!

    I have a button which copies over the people picker details from one people picker to another. It works fine on the client but refuses to work in the browser unless the second people already has a value.

    Does anyone know why there is this difference in behaviour between browser and client?

    Like

  • Prakash,
    Yikes that’s tricky. Sorry, I can’t think of a way to do that.

    RichardC,
    You can troubleshoot this by creating a new view on your form, and just go to the userprofile data source on the right, and drag the whole “tree” of fields onto the form. Also, drag the query field and put a button on there that simply queries that data source. With all this, you can try different values in the query field to figure out where the problem lies. Are you using FBA for authentication? I discovered that the syntax is a bit different with that.

    Like

  • How to get current user name and manager name populate in infopath 2010

    Like

  • I’ve tried your method in a people picker field in a Document information panel created in InfoPath 2010.

    My only condition is that the people picker field is a required field. When trying to save the document, we get the “required field has not been populated” message.

    And on closer inspection, it appears that the AccountId field in the People picker is having issues. If you type in a name from the address book, the AccountId field gets populated with an Id (a number like 15), but it seems to struggle when we assign the “AccountName” field to it.

    When you use the same procedure in a regular form (not part of a DIP), then the field works correctly, it does not resolve to a number when using the address book.

    Any idea why this happens?

    Thanks in advance

    Like

  • Laura – this is great, thank you!

    Now to take it further, I want to setup a data connection to email the person populated in the picker (a summary of what they just submitted, or to be CC’d when their request is approved)

    I’m using this successfully for people entered manually into the people picker but can’t get it to work when prepopulated.

    To: concat(substring-after(AccountId, “ADdomain\”), “@domain.com”)

    Any help would be appreciated!!

    Like

  • Hi Laura, great information on this site. With this method in particular it works great on new forms but I cannot get it to work when editing an existing form. I’ve verified the form load rules, no conditions are set. Any ideas why this may be and any fix you can think of?

    Like

  • Raman,
    At step 17, you’re going to use Name is equal to “Manager” instead of “PreferredName”.

    Mahen,
    I’ve never come across that, but it sounds like it’s using the ID of the person from the User Information list maybe. You may have to try this method and get the ID field: http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=172

    Dojo,
    To troubleshoot, add your data source to the form (just drag it on there) and see if the data is actually there. That way, you can see if it’s even being queried or not.

    Like

  • Laura, confirmed the data is being queried. It just won’t set it for an already existing item. Seems really bizarre.

    Like

  • Supriya Khamesra

    I am also facing the same issue as Dojo for edit form i.e people picker is no getting pre-populated on edit form.
    What I am doing is if I edit the form by manually removing the user from people picker and saving it. It saves successfully.

    When I again open the lit item in edit mode the people picker should get pre populated. But it is not getting pre populated.

    Please suggest how can I resolve this issue.

    Like

  • Thanks for the great step-by-step. You are a genius. And a great person to follow on Twitter.

    Like

  • Dojo,
    Maybe it’s a conflict with the data type, like a date versus a date/time field?

    Supriya,
    Try setting a form load rule that looks to see if there’s a value in that people picker field, and if not then it gets populated. If it’s already populated and you want it to change, obviously you’ll have to figure out some other logic, like to set the form load rule with no condition and to set each of those fields in the people picker to blank first and then re-populate them.

    Terry,
    Thanks!!

    Like

  • I have receive follwing error with SP 365

    An error occurred while trying to connect to a Web service.
    An entry has been added to the Windows event log of the server.

    Log ID:5566

    Correlation ID:f0c64a9c-74d6-d0db-45d7-5a77c1ec6435

    This is due to loopback is enable on SP 365 server from microsoft, so when connection made from same server we receive the above error, does anyone have work around?

    Like

  • Laura,

    I’ve got what seems to be a rather common problem, but none of the solutions I can find online are in plain english… they are all in “tech-ese” code breakout so I am hoping you can break it down for me.
    I am having the same problem as SPBB. I use the User Profile Services to populate the fields. When I preview the form all of the auto-pop data is filled in. When I navigate to the /_vti_bin/userprofileservice.asmx it works fine and Design Checker doesn’t find any issues.
    However, when I publish the form I get the following error and none of the information gets populated: “An error occured querying a date source. Click ok to resume filling out the form. You may want to check your form data for errors.”

    Are there some security settings or something that I am missing? Any thoughts on how to resolve?

    Like

  • Tejal, Laura,

    I’m having this very same issue (Office 365).

    This article says there’s nothing to do about it: http://support.microsoft.com/kb/2674193/en-us

    This seems like a very big issue in Office 365 since InfoPath makes extensive use of this kind of behavior.

    Does anyone knows a way to achieve this pre-population for Office 365?

    Like

  • Hi Lara,
    great, it works on basis of logged in user,
    i have a question, how can we populate other user info who is a people picker field in form.
    Ex: (logged in user is different than Employee name)
    Infopath form
    Employee Name: people picker
    Job Title: ( need to populate automatically)
    Employee/Payroll ID : ( need to populate automatically)
    email id: ( need to populate automatically)
    department: ( need to populate automatically)

    Thanks

    Like

  • Hi Laura ,
    first of all thanks for this and other tutorials.

    It works as it should on an “Add new item” form, but I cannot get it work on my initiation form of the OOTB Approval Workflow.
    The strange thing is that it works in infopath preview but not on the page. The data source is ok, cause i can get user names in a calculated value but not inside the people picker.

    Thank u

    Like

  • kc and Rene, take a look at Lori’s “Upgrading InfoPath and the User Profile Service Data Connection” http://www.pointgowin.com/seethepoint/Lists/Posts/Post.aspx?ID=55
    This is if you have O365 or claims auth.
    Nadeem, that’s a whole other blog post. Not sure when I’ll get around to it, but Clayton Cobb has probably already written that. http://claytoncobb.wordpress.com/

    Luke,
    I’m not sure, I’ve never seen that happen.

    Like

  • This is great!

    Have a question, is there a way to clear/delete the value of the people picker field, without code? I have a form where user manually enters a person in the people picker field, then I have a rule to copy it to a text field and need to be able to clear out the old value from the people picker field.

    Like

  • Hi Laura,

    Probably a very basic question but I want to specify a specific user in the people picker field. Is that possible and if so how?

    Rgrds,
    Declan

    Like

  • Rene,
    Sure, use “set a field’s value” in an action rule, and do this for both the displayname and the accountID in there (screenshot at step 9). Set each one to blank. (just don’t type anything in the value field)

    Declan,
    Yes, use the “set a field’s value” in an action rule, and set each of those fields (screenshot in step 9). Set the display name to the person’s first name and last name, and set the AccountID to the person’s domain\username.

    Like

  • Hi Laura, Great work. I have this error come up often times. I have a web application e.g http://awards with default http://server1. I have an infopath form with getuserprofilesynchronization. when i open the form with the url http://awards, it shows an error, on clicking ok, the form opens but the profilesyn doesnt get to work but when i do with http://server1, it works fine.

    How do you think i can manipulate to avoid the errors henceforth.
    Thanks

    Like

  • Brandon Johnson

    Thanks Laura for your amazing work! I have been working with SharePoint for six years and somehow just discovered your excellent tutorials. Keep up the great work!

    Like

  • Hi Laura,
    Thanks for the detailed article.
    I’m having a bit of problem implementing this in my case.
    I also have the issue with the edit item.
    I’ve read the previous comments, but it doesn’t seem to work.
    My aim is this: i want the person picker to auto populate the the current user in case a there’s a change in a specific droplist.
    On initial load everything works fine, the person picker is left empty, an it gets populated once i change the value on the droplist. But if I save the form, and then later on try to edit it, and change the droplist value the person picker stays empty.

    The weird part is that I can save the form in this case even though there is a validation rule, which should prevent the form from saving on this case (the rule works well on a new item). For this reason I think that the web service is working, but for some reason it looks blank.

    can you assist?

    Like

  • Hi Laura, thank for the article.

    I want something along these lines but cannot find info on it anywhere. I would like to have a Persons field automatically take the same value as CreatedBy (an automatically populated Persons field). Specifically using Infopath 2010.

    I’ve tried all obvious approaches and the field stays blank.

    Like

  • thanks for this !!

    Like

  • Heather Williams

    How can you populate OTHER peoples names (with GetUserProfilebyName maybe) based on say another list, without having to go through and hit check user for each entry? I have say a district and in that district 5 people. Depending on the user selection, if they pick district A – then the 5 people populate in the form for email notifications. Currently I have it looking for the District A contacts, but if I do it with a people picker it wants the user to click click the check names for each one. If I use a text box then I have to fenagle it so there are no extra spaces, or commas. Any suggestions?

    Like

  • Hi Laura,

    When an ‘anonymous’ form is submitted, the ‘Created by’ and ‘Modify by’ fields’ are empty.

    I tried setting the value ‘On form loads’ and when it’s submitted as well by creating some rules and ‘set a field’s value’, but no luck.
    Do you know if it’s possible to set a default value of the ‘Created by’ and ‘Modify by’ fields’?

    Many thanks in advance for your comments,

    Laura A.

    Like

  • Using SharePoint List – (not Library) it does not seem to want to populate. Same behavior as others listed – new form – works, preview – works. In SharePoint list it first opens the display form then you change it to Edit and the People Picker is not retrieving a value. The Data Source is good (from pulling it to the page), but people picker value is blank.

    Like

  • @Amy: I’m experiencing I believe the same thing as you. The new form populating of a people picker is working. However, I have an “ApproverName” people picker that I’m trying to set via the same method based on a rule that is attached to an Approval Status field.

    I.e. if the field value changes on Approval Status,
    1. Query using the data connection GetUserProfileByName
    2. set field value DisplayName
    3. set field value AccountID
    4. set field value AccountType
    (all set exactly as shown above)
    5. I also then set an ApprovalDate field to now()

    This works great in preview mode, however after I publish the form, create a new item and then edit it, the ApproverName people picker field is not populated when I change the Approval Status field (the date field however is updated).

    Any ideas why?

    Like

  • Too bad I did not know about your blog before, I spent hours getting this concept to work for me when you already had it all figured out and posted for all to learn. I am looking forward to read more of your posts and to pick your brain with a few issues I am struggling with, if that is OK of course.

    Like

  • Thank you Laura, this did exactly what I needed it to do. I was able to add the email and phone number fields and have thos prepopulate as well. But, if the person completing the form changes their name in the people picker field to another user, how can I refresh the email and phone fields to match those of the user that was manully entered in the people picker field. Is this even possible?

    Like

  • Hi Laura,
    Great article! I’m trying to populate the names of two people into a people-picker field based on an entry made into a Department drop down? Do you have any suggestions with how to best do that?

    Like

  • I am trying to apply this to a SharePoint List form but I cannot even see the people picker field. Is there a different method when using SharePoint List forms rather than SharePoint Library Forms?

    Like

  • Thanks Laura – Very good article. This worked well for me.

    Like

  • @Laura: Many thanks for sharing the process of getting the logged in user details.
    From my observation it will work fine for new forms but for existing forms where we already used People Picker for some other user which we can not update then it will not work.

    Like

  • I need to hide a Text Box based on the Logged in User access level. If the user is the creator or part of Admin group then user will see the text box or else it will be hidden.

    I have used GetUserprofile service to find logged in user details and then comparing with creator and Admin Group making the control hide or show accordingly. But for New form post implementation its work as expected but for existing forms its not fetching the Display Name of the logged in user.

    Please help me here if any one has any solution. I think in above Shiv is also saying same thing.

    Like

  • Great post! Just what I needed. Thanks Laura.

    Like

  • Thanks a lot for this relevant information.

    The user is showing in the people picker control in case of Preview but after submitting the form the user is not showing in the people picker control.

    any idea why it is happening.

    Thanks in advanced

    Like

  • Hi Laura, thank for this post.

    When I attempted to set this up as you’ve described, I get the following message when the form loads:

    “The SOAP response indicates that an error occurred on the server:

    Server was unable to process request. —> Attempted to perform an unauthorized operation.”

    Any insight you can provide into how to fix that is greatly appreciated!

    Like

  • Hi Laura,

    I need to populate the fields based on the person picked from the people picker. The one that you posted is for current logged in user. Can you Help

    Like

  • Same here use infopath to customize the list and work on new form but not edit form. seems no solution yet.

    Like

  • Kandace Compton

    I need to populate other fields based on the value selected in a People Picker field. I used your solution for the current logged in user but if as in your example the secretary selects her boss my other fields (WorkPhone, AccountName,etc) do not update – as it shouldn’t since the solution was “on form load”. I thought of putting a button on the form but then the downfall with that is if the user fails to push the “Update” button and just submits the form. I will end up with inaccurate data. This is for a Help Desk Ticket system where a user could submit the request or if a user calls the Help Desk, a Help Desk teammember would complete the form. I found the following which suggests that a rule could be created on the people picker and the account id(
    https://wonderlaura.com/2012/06/27/infopath-pre-populate-the-people-picker/). I tried to create a rule on the people picker but my only option is to create a formatting rule. Thanks in advance for your help, Laura!
    FYI: Using SharePoint 2010 and InfoPath 2013.

    Like

  • Just put UserName() as default value for DisplayName and AccountId. That works for me.

    Like

  • Can this be used to pull in the ObjectGUID of the current logged in user?
    Can i somehow use this to get the ObectGUID of a corresponding AccountID ( not the logged in user, but a account picked by a people picker field)

    Any held would be greatly appreciated as i have working on this for a longtime yet with no results

    Thanks in advance

    Like

  • Idowu,
    This sounds like an issue on the server side, where you have an internal URL versus an external one. I think that’s something that needs to be fixed in DNS or alternate access mappings or something server-admin related like that.

    Yair,
    Don’t let users save the form, always use Submit instead, and disable the save and save as buttons. Validation doesn’t count in InfoPath if users click SAVE. See my post called Save as Draft https://wonderlaura.com/2012/01/01/infopath-save-draft-form-functionality-a-better-way/
    Also, maybe on edit the drop-down is empty because the data connection isn’t being queried? That’s usually the case.

    Marc,
    Your question sounds like you’re asking to do the exact thing this article describes, so I don’t know what’s different about what you’re asking.

    Heather,
    In this example, it sounds like you’re wanting to do something like a SP list called “approvers”, and maybe depending on a department name, a certain set of people need to be involved.
    So, do a data connection that doesn’t retrieve data automatically when the form is opened. Create a rule on the “district” field, so that when a district is picked, it sets the query field for the district field for the approvers SP list, then queries the list. That way, only that one row will be returned. Then you can set the values of the 5 fields in your form with the values from the 5 columns from the SP list of approvers.

    Laura,
    No, InfoPath forms don’t work well with anonymous authentication.

    Amy and those of you wanting to do this on edit, not just on a new form…
    I’m not sure what your situation / conditions would be. Do you want to override a people picker with a new value? Fill in a new people picker? So whatever the condition is for that specific business case, you’d do something different at step 10.

    Eric,
    Maybe the data is not being queried? To test this, in your fields pane on the right, switch over to your GetUserProfileByName data source (whatever yours is called), and literally just drag the whole thing onto your form. Then preview it in the filler and also test in the browser. If no data is in there at all, or the query field is blank, that will give you more info about how to get to the issue.

    Leeloo,
    Yes, this is possible. Create an extra text field, and call it EmployeeName or something. Set the default value of it to the “accountId” field from inside the people picker. Since you can’t set a rule on the fields inside the people picker, this is the shortcut. You can set a rule on this field, which has whatever person is picked in the people picker. Then create a rule on that field that sets a new query field and re-queries the user profile data. Then you have your fields about that other user.

    Mikeb,
    See my response to Heather above, and I think you’d have to have two fields, it’s really difficult dealing with a picker that lets you pick multiple people.

    Juan,
    No, they both have people pickers.

    Bijay,
    Again, not sure what your business logic needs to be later in your form/process after it’s already been submitted. One alternative you have, though, is to create two different userProfile data connections, and just use them for separate purposes.

    Sunil,
    The control is just disappearing? No, I don’t know, that doesn’t make sense.

    Jeremy,
    Maybe you’re using 2013? See this for the workaround in 2013 with claims authentication http://www.pointgowin.com/seethepoint/Lists/Posts/Post.aspx?ID=55

    Nimmi and Kandace,
    See my response to Leeloo above.

    Marco,
    Yes, there is a different operation for that. See step 4, it’s in that list.

    Like

  • I’m having the new versus edit issue as well. Laura – here’s the details:

    I have a list that contains three columns: Display_Name (text); Account_ID (text), and DetailName (group). Display Name and Account_ID are populated with the correct values that go into PeoplePicker. DetailName is blank. (This situation occurred because I created the list via a large excel database).

    When I edit an existing row in the list, the PeoplePicker does not prepopulate. I’ve tried both on form load, and on a button in the form. In both cases, the PeoplePicker remains blank.

    The only way it works: first: add any name to the PeoplePicker field – doesn’t matter who the person is; then, if click the in-form button that sets PeoplePicker values to the list values it will change the value in the PeoplePicker field. It’s almost like the PeoplePicker needs to be “activated” before it will all the values to be set (again: only when editing an existing list item; not on a new list item).

    Any ideas (other than having the user ‘fake populate’ the PP before using rules to really set the PP)?

    Great blog! Thanks for the help

    Like

  • Hi Laura, I have the same requirement that Leeloo had, and I don’t fully understand your reply (on 6/24/2015).

    “Create an extra text field, and call it EmployeeName or something” – done

    “Set the default value of it to the “accountId” field from inside the people picker” – done

    “…create a rule on that field that sets a new query field” – can you expand on this rule? It’s the “new query field” part I’m struggling with.

    Like

  • Hi Laura, great post although I have discovered late.
    I’m following the steps to populate with user’s different from currentUser as someone @Declan old query.
    I think that in that case you don’t need the SOAP query as far as we don’t query nothing, only the action on Form Load. Anyway, no user gets populated.
    Am I wrong ? Do I have to use the service to query for the plain text “WhatEverUser” and for the “domain\user” ?

    Thanks for the help.
    Luis.

    Like

  • congratulations for this article, the problem is that it does not work in SharePoint OFFICE 365, even after the amendments to the UDC and parametrage the secure store files, is there an alternative?
    thanks in advance

    Like

  • I am with ermo on this one, it looks like this doesn’t work in Office 365 any longer. I have also gone through the UDC data connection file and Secure Store configuration and it still doesn’t work. I receive an error stating error code 5566 was returned. This was all running as a tenant admin so has have rights over User Profile service, Secure Store and SharePoint sites.

    Like

  • Thank you Laura, worked like a charm in my SharePoint 2010 Enterprise environment.

    Like

  • I have a table that houses the name of schools and the principal for all of the schools in a district. Then another table that houses all of the teachers in the district. I want to populate the principal when the school is chosen. I need to be able to use the people picker on these so that I can create a web part that will filter to the current user so that when each principal logs in they only see the teachers that work for them. So I need to set the value of a people picker field by looking up data in another table. I have created the data connection but it won’t let me chose that field because its a group. Does that make sense?

    Like

  • Hi Laura, great information here. I do have a question though, now that I have this field on the form and it is displaying my name, how do I make it so that it is not editable? I do not see that option in the control or field properties.

    Like

  • Hi Laura, Thanks for this post, it is very helpful. I followed the instructions and was able to get it to work on the preview, but received an error message when I went to submit the form…

    Field or group: #text
    Error: No exact match was found.

    Any ideas what would cause this error?

    Like

  • Robert,
    To troubleshoot that, I usually dump all the fields I’m using on the form (at least on a test view), and even drop the people picker fields on there as a repeating table. That way, as I’m doing queries and getting / setting values, I can see exactly what is happening or populating, and what isn’t.

    Nick,
    Inside of your other data connections when you expand them in the data pane on the right, there’s always a “query” section of fields, and a “data” section. (I guess unless you’re in 2007). So when that “employeename” field gets populated, a rule on that field does “set a field value” on the query field in that data connection. I demo’ed all of this here https://www.youtube.com/watch?v=1ffUW61vR2I

    Luis,
    In 2010/2007, by default the userprofileservice automatically just queries the current user’s information. In O365/SP2013, you need to set the query field’s value of the person’s domain/username that you want to retrieve, THEN do the query.

    Ermo and James,
    Yes, it works in O365, see the aforementioned demo video.

    Vanessa,
    You’d need to have a lookup list with a teacher column and a principal column, and each row has only one teacher and one principal. Then, with rules, you’d set the query field of the principal’s name on that lookup list’s data connection, and then do the query. Then the only rows returned would be the teachers that match the principal.

    Alida,
    You’re right, you can’t make a people picker read-only. I’m not sure why you’d want to use a people picker if you don’t want them to pick people, though. 😉
    Just stick a calculated column on the page instead, and point it directly to the “displayname” field in the people picker’s section.

    Like

  • Laura, is there an easy way to have the approvers names pre populated and uneditable? The client wants the approval workflow to be manually kicked off but the user cannot change the approvers. Make any sense? Thanks!

    Like

    • Instead of putting a people picker control on the form, you can insert a calculated field in InfoPath instead. As the calculated field’s value, just select the displayname value that you see in the screenshot at step 9.

      Like

  • Hi Laura

    Like

  • Hi Laura, i have a question. After publish the form, I got Target application not found error.
    I already created SSRS in CA.

    Like

  • Gabriela Maganlal

    Hi, the prepopulating of the user information in the InfoPath form is great. I have been able to accomplish that successfully. I was wondering if there was a way that the users could override the data – this because the information on our web is not up to date and the telephone number/titles might be different.

    Like

  • HI Laura, I have followed this guide for using SharePoint Online however Im still receiving error when opening the web form.

    An error occurred querying a data source.
    An error occurred while trying to connect to a Web service.

    At the end of Step 5 it says about using the people picker, however when I attempt to publish the form, it says that data cannot be stored in those fields. Only publishes when I have rule to set a text field value.

    Microsoft Support haven’t been particularly helpful with this.

    Like

  • Hi Laura,

    I am also facing the issue with Edit form. I have a drop down, on change of which I am setting the value of people picker from a different datasource filtering on basis of dropdown value. In new item form this works, but if I save the new form without selecting anything in new item (leaving people picker blank) and edit the record later, then the people picker remains does not set its value. Though it works if while people picker was not blank while creating record. I have observed that this issue has been posted on several blogs but there are no solutions.

    Any suggestions?

    Like

  • Thank you so much Laura !

    Like

  • I am trying to follow this word for word and I know it is an old post. It works like a charm in preview but when I put it into the list and try to launch the form I get an error “you do not have permissions to access a web service that contains the data needs for this form” But I am the admin. what am I missing?

    Like

Leave a reply or question

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s