Get user name from Infopath form to a SharePoint List - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Get user name from Infopath form to a SharePoint List

Last post 01-14-2015 04:57 AM by rallyjus. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 08-07-2012 07:36 PM

    Get user name from Infopath form to a SharePoint List

    Is there a way to convert a user name from a Infopath form to be an active user in a SharePoint list?

    I created an Infopath form that collect the name of the manager who is supposed to approve the form. I want to create a view that filtered based on that name. The problem is that SharePoint doesn't recognize that name as a network user (see pict attached)

    I tried promoting the fields in different ways (by display name, account ID, account type), but no luck...   :-?

    Do you have any suggestions?

    I want to filter the view by the name in the 'Manager Approver' Column, but it comes out as text and no as an active user field (as the 'Modified By' colum)

    How can I convert the names in the 'approvers' colums  to be blue (clickable-'filterable') as the one in the 'Modify By' column

    sharepoint list

    EB
  • 08-14-2012 07:43 AM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    Edwin Brito:
    Is there a way to convert a user name from a Infopath form to be an active user in a SharePoint list?

    Any reason why don't you create for this:

    • from Sharepoint side a column of type Person or Group
    • or in Infopath Designer 2010 doing the same by drag&dropping Person/Group Picker control   

    Update: 

    From your screenshot I guess you did not mean a sharepoint list but I also succeeded to do this in a form or document library without any promotions.
    Though it is already guessing game (you post your screenshot from library and ask in it about sharepoint list)... 

     


    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 08-21-2012 07:15 PM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    I have tried your suggestion, but still can't figure it out.

    The way I initially tried was inserting a 'Person/Group Picker' field in Infopath, but when I promote it to the SP list, it comes out as a string. So when I create a view to be filter by that column is not recognized as a person.

    Now I when try your suggestion, I created the column in SP, but I don't know how to make this an editable filed inside Infopath. I tried creating a data connection to receive data from the SP list. I can see the column field, but it is not editable. It inserts a repeating field.

     I guess I don't know how to insert that column field and make it editable in Infopath.

    Any suggestion?

    EB
  • 08-21-2012 11:56 PM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    I am afraid I do not understand whar you are wrtiting

    Edwin Brito:

    The way I initially tried was inserting a 'Person/Group Picker' field in Infopath, but when I promote it to the SP list, it comes out as...

    It is impossible to promote any Infopath fields to a SP list.
    OOOTB, Infopath controls are directly bound to Sharepoint list fields and OOTB this binding is not modifiable 

    You create a field in sharepoint list, press   :Customize Form" on ribbon under List (List Tools) tab and it appears in infopath form template.
    And vice versa in already created before (as I wrote above) Infopath form, in Infopath Designer 2010 you just drag&drop Person/Group Picker control onto design surface and it appears upon Quick Publish in sharepoint list

     I rechecked it a few times.

    Person/Group Picker also works if to save/open XML form into/from a library.
    It will appear in sharepoint library as a string if to promote it to library field but it has nothing to do with Infopath, as far as you open the form in Infopath filler or in browser through Infopath Form Service, the Pesron/Group Picker control is working

     

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 08-22-2012 06:11 AM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    Ohh! I see.

    I am using an Form Library not a SharePoint List. My bad, I didn't notice there are different.

    In a Form Library, the customize form is not in the ribbon in the browser. To customize the form, I have to open the site on SharePoint Designer, open the list and then the customize form.

    Check out the form in the attachment..

    EB
  • 08-22-2012 09:28 PM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    I believe I addressed your question in context of library as well 

    Gennady Vanin (Геннадий Ванин, Новосибирск):
    Person/Group Picker also works if to save/open XML form into/from a library.
    It will appear in sharepoint library as a string if to promote it to library field but it has nothing to do with Infopath, as far as you open the form in Infopath filler or in browser through Infopath Form Service, the Pesron/Group Picker control is working
     

    Edwin Brito:
    I guess I don't know how to insert that column field and make it editable in Infopath
     

    The field is editable in Infoapth if you open XML data form from sharepoint library in Infopath, isn't it? 

    It is not editable from sharepoint but why do you need it to be editable from sharepoint (if you opted to use Infopath)?

    You wrote:

    Edwin Brito:
    I want to filter the view by the name in the 'Manager Approver' Column, but it comes out as text and no as an active user field (as the 'Modified By' colum)

    And you edit it by opening Infopath data form .XML file, don't you? And Person/People Picker control with this field still works in Infopath in full functionality, does not it? 

    You do not need the field to be editable (in sharepoint) in order to filter the view (in sharepoint), do you?
    Filter it by string

    I promoted Person/Group Picker in Infopath and created a filter in Sharepoint library on promoted field, and it works OK in Infopathand is filtered in sharepoint 

     

     

       

     


    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 01-31-2013 01:21 PM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    Hi Gennady:

    I tested your solution and it works. But now I want to create a filtered view using the 'Display Name":

    a. In SharePoint 2010, I created a view using 'My documents' template.

    b. For the view filter, I tried to replace [Modify By]; with 'Display Name'.  The Filter formula should now be:   Display Name is equal to [Me]

    However I get this error when saving the view:  "Filter value is not a valid string". 

    Have you tried one this yet?  Thanks in advance!

    Patrick Lee

  • 05-13-2013 10:12 AM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    Hi, did you ever find a solution to this issue? I am having the same issue creating a view and filtering on [Me]
  • 09-06-2013 08:52 AM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    from my understanding this can only be achieved with a workflow
    Thanks

    @lphamax
  • 09-08-2013 03:10 PM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    We did a webinar on this topic recently: http://youtu.be/vQTkRBTSIos

    Patrick Halstead
    Project Manager at Qdabra
  • 10-30-2013 07:58 AM In reply to

    Re: Get user name from Infopath form to a SharePoint List

    I've used this double eval technique but don't see a difference with just merging the account-ids together when promoting the account-id field.

    In the sharepoint formlibrary this column is of type text and not of person/group. Is er a possiblity to change that?

  • 01-14-2015 04:57 AM In reply to

    Re: Get user name from Infopath form to a SharePoint List

     I managed to do this today:

     

    After publishing the InfoPath form to a new SharePoint library go into the SharePoint Form Library list settings. Add two new columns for each Person Picker you want to filter on using the [Me] function.

    AccountableAccountID (Single Line Of Text)

    Accountable (Person or Group)

    So you've added these via SharePoint and not InfoPath and promoted them.

    Then re-publish your InfoPath form but in the Property promotion select the AccountID field and set the column name to AccountableAccountID (this should be in the list of options and is the field you created above via SharePoint)

    Once this is done you will need to create a Workflow using SP Designer

    Make the Workflow run on every save/update of the item.

     The workflow will have one action - Set Filed In Current Item

    Set Accountable to Current Item: AccountableAccountID

    When you save a form it will run this workflow, which will lookup the AccountableAccountID (e.g. domain\user.name) in you user directory/AD and set the Accountable (Person or Group) field you created to the user.

    You can then use the Accountable field in a list filter using the [Me] function.

     

     

     

Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.