Create an InfoPath Form to Auto Populate Data in SharePoint 2010

In Anne Stenberg's Blog from 2 Nov 2011 3:00 PM "How to Create an InfoPath Form to Auto Populate Data in SharePoint 2010" she artfully steps through how to create an InfoPath Form to Auto Populate Data. It works but... Jason, another user, 
wrote whenever the form is opened again either to view or edit, it displays the current users information instead of the value of the person who completed the form in the first place.
Anne's response was "Hi Jason - I had forgotten I had that problem, too. Change the Form Load rule's condition to
DisplayName is blank and that should work."
My problem is I can't find anything other than AccountName in "Select a Field or Group" [GetUserProfileByName (Secondary)] to use in the Condition statement that will correct the problem.
Any help will be very appreciated.
Thanks,
Joe

Hi Joe,
I recommend to add one more condition in Form Load to make the form not be populated with current user’s information (You can change Title to another column which should not be blank when users create a new item).
Best regards,
Victoria
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • How to create Infopath form that auto populate data from one list to be fill by another user?

    hi.  I would like to ask, how to create form that fill by User A, for example, and then the User A assigned task to User B to complete the form. Next, the form will be approved by approver. May I know how to do
    that? and if possible, I do not want to use any programming code.
    Azuaniza Ariffin

    Hi,
    If your SharePoint environment supports InfoPath Forms, then you can customize the form and add rules to make the list items as read only when user A submits the form.
    you can then write a form load event to check the logged in user using username() function. This logic can be implemented in variety of ways, like setting a flag when User A submits the form, or storing user A username in a form variable etc., else comparing
    User A and User B values within form Load event.
    Another way of doing this is using Views or grouping all of the User A fields within a section etc.,
    The above would take care of Form logic, and for the workflow, you can use SharePoint designer to create a custom workflow, where it will run on onItemCreate and onItemChange events.
    The logic for workflow would be if the form Submitted for the first time, the workflow will start and send an email to User B, and when User B submits the Data then onItemChange change event will start the workflow to send an email to approver to approve
    the data.
    here are some links for your reference -
    http://office.microsoft.com/en-us/infopath-help/add-formulas-and-functions-in-infopath-2010-HA101821255.aspx
    http://office.microsoft.com/en-us/videos/video-create-an-approval-workflow-in-sharepoint-designer-2010-VA101897477.aspx
    http://blogs.technet.com/b/meacoex/archive/2010/11/01/get-manager-approval-in-sharepoint-designer-2010-step-by-step.aspx
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • How to: Create a master form that auto-fills data into other pdf forms?

    I hope someone can please help me.  I have about 15 PDF forms that all require similar data entry (name, address etc). Can I create a master form that we fill in once per client, and then auto-fill in the matching data on the 15 forms? 
    I am not looking for an online solution as the information is highly sensitive. 
    I have already created a form in Acrobat X Pro with the 'master data', and created the (15) forms with identically named fields.  How I link the forms now to the master, I cannot figure out (after much searching).
    I have read similar questions on the same topic but have not found any answers.   I hope this time someone can please help.
    Many thanks in advance.

    Thank you!  I had just figured out how to export the data from the master as an FDF file and then import it to the other files.  I'm afraid I don't understand scripting to automate the process across multiple files.  To you mean with java script? 
    I've also thought about combining the forms, once we know which ones the particular client will need.  I have to see how it works in practice for my colleagues who will be using them.
    Thank you again.

  • Auto populate date field

    I have a JavaScript that I use to auto populate date fields. However, I've discovered that it doesn't work when the form is opened on an iPhone or Android phone. Is there a way to auto-populate a date field without using JavaScript?

    What app on the iPad are you using.
    Different apps on mobile devices have varying degrees of JavaScript compatibility.

  • How to genetare reports(ssrs) with form library's data in sharepoint 2010

    Hi,
    How to genetare reports (ssrs) with form library's data in sharepoint 2010.I am saving infopath(2010) xml form data in form library.I have 500 and more forms in the form library( more forms can come in future).How to generate reports from this xml data (i
    want to make it automate)? Reports should get updated automatically when any changes made to data and if new form entered in the library.
    Please suggest possible solutions.I can not go for code base solution.( somthing SSIS, BCS or web service ....etc or anything else will be fine)
    Thanks in advance.

    Hi,
    According to your post, my understanding is that you wanted to generate SSRS report with form library in SharePoint 2010.
     In order to use the data stored on the InfoPath form, you need to add the controls on the form to be columns in SharePoint(This is the OOTB way without code).
    You can add the control during the publish process:
    Then when you create the SSRS report using the form library as the data source, you can use the fields just as the fields created in SharePoint.
    There is a tool called InfoPath DB in codeplex, you can have a look at it.
    http://infopathdb.codeplex.com/
    More reference:
    http://sharepoint.stackexchange.com/questions/28825/how-to-query-a-form-library-in-sharepoint-2010
    http://sharepoint.stackexchange.com/questions/38492/reporting-against-a-form-library
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • How to copy Excel sheet data to SharePoint 2010 List?

    Hi,
       I need to export excel data to SharePoint 2010 list. I have created 22 columns in list which are of following Column types:
    Single line of text,
    Multiple line of text,
    Choice
    Number,
    Date,
    Person or Group.
    Now i need to export the excel data to SharePoint list.
    When iam trying to copy data from excel to List , it is showing as "The selected cells are read only".
    can someone guide on this to export spread sheet data to SharePoint list without importing Spreadsheet.
    Thanks in advance.
    Badri

    I've updated the example of using PowerShell to include a Person field (user field) and a choice field.
    The CSV file has the following columns:
    TRIP_NO
    VESSEL_NAME
    FLAG
    AGENT_NAME
    CURRENT_LOCATION
    RPT_DATE
    EMPLOYEE
    EMPLOYEE_TYPE
    #Get the CSV file and connect to the SharePoint list
    $vessellist = import-csv -Path C:\Temp\VesselInPortReport.csv
    $l = (Get-Spweb "http://devmy101").GetList("http://devmy101/Lists/smarInPort")
    #Get the lists EmployeeType field (choice)
    $employeeType = $l.Fields["EmployeeType"] -as [Microsoft.SharePoint.SPFieldChoice]
    #Loop through the items and add them to the list
    $r = 1;
    foreach($item in $vessellist)
    $ni = $l.items.Add();
    #Add the Title, using the rows VESSEL_NAME column
    $ni["Title"] = $item.VESSEL_NAME;
    #Add the "Date Recorded" field, using the csv rows "RPT_DATE" column
    [DateTime]$rd = New-Object System.DateTime;
    if([DateTime]::TryParse($item.RPT_DATE, [ref]$rd)){
    $ni["Date Recorded"] = $rd;
    #Add the csv rows "TRIP_NO" column to the new list items "Trip Id" field (SPFieldNumber)
    [Int64]$tn = New-Object System.Int64;
    if([Int64]::TryParse($item.TRIP_NO, [ref] $tn)){
    $ni["Trip Id"] = $tn;
    #Add some other text properties
    $ni["Flag"] = $item.FLAG;
    $ni["Agent Name"] = $item.AGENT_NAME;
    $ni["Current Location"] = $item.CURRENT_LOCATION;
    #Add user information
    $ni["employee"] = $w.EnsureUser($item.EMPLOYEE); #In this case, the $item.EMPLOYEE value from the spreadsheet is a persons name. Eg. "Matthew Yarlett"
    $employeeType.ParseAndSetValue($ni,$item.EMPLOYEE_TYPE); #In this case, the $item.EMPLOYEE_TYPE value from the spreadsheet is valid choice present in the EmployeeType list field. Eg. "Manager"
    #Update the item
    $ni.Update()
    Write-Host ([String]::Format("Added record:{0}",$r));
    $r++;
    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.
    I just added a webpart to the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • Is it possible to create a Event Reciver program as Sandbox solution? - SharePoint 2010

    Dear All,
    I try to create a Event receiver program as SandBox solution in SharePoint 2010. I want to do a list item updation using this event receiver.
    Almost all the internet help & examples seems to be written with Farm solution and I got plenty of
    errors in the code(since the code may be written for farm solutions).
    So is it good idea that I am trying to do Sandbox Event Receiver???? Can any one please advice me
    and if sandbox is feasible can anyone help me with a tutorial( How to create a sandbox event receiver for list item updation).
    Somebody please help me soon.

    Dear All,
    hen I run the project, I got this error
    There were deployment errors? do you want to continue. I pressed No button but
    I cannot see any error list below in visual studio 2010!!! I am not able to
    identify where is the error or rectify those error, somebody please help me soon.
    I try to create one event receiver for list updation. I selected Event Receiver template
    while created new project and added following code for debugging, debugger is not hitting!!!
    please note my code below. Am I missing anything?????
    EventReceiver1.cs
    using Microsoft.SharePoint.Security;
    using Microsoft.SharePoint.Utilities;
    using Microsoft.SharePoint.Workflow;
    namespace NewProjEventReceiver.EventReceiver1
        /// <summary>
        /// List Item Events
        /// </summary>
        public class EventReceiver1 : SPItemEventReceiver
            static void Main(string[] args)
           /// <summary>
           /// An item is being added.
           /// </summary>
           public override void ItemAdding(SPItemEventProperties properties)
               base.ItemAdding(properties);
           /// <summary>
           /// An item is being updated
           /// </summary>
           public override void ItemUpdating(SPItemEventProperties properties)
               base.ItemUpdating(properties);
               SPListItem CurrentItem = properties.ListItem;
               String strCustomer = CurrentItem["SampleList"].ToString();
               int startPos = 0;
               int endPos = CurrentItem["SampleList"].ToString().IndexOf(";#");
               int Cust_ID = Convert.ToInt32(strCustomer.Substring(startPos, endPos));
               SPWeb oWeb = properties.Web;
               SPList oList = oWeb.Lists["SampleList"];
               SPListItem Customers = oList.GetItemById(First_ID);
               CurrentItem["Title"] = "One Time";
               oWeb.AllowUnsafeUpdates = true;
               oWeb.Update();
               oWeb.AllowUnsafeUpdates = false;

  • Auto populate date field in form

    Hi
    I have been trying to get a field in a form to automatically populate with todays date. I have got a script which defines the default value for the field as: document.dform.currentdate.value=displayfirst+"/"+displaysecond+"/"+displaythird
    where dform is the name of the form, and currentdate is the name of the field.
    This works fine.
    But I am using the form to populate another program, and the field name must be 00N20000001QbHo
    I assumed therefore that I should use: document.dform.00N20000001QbHo.value=displayfirst+"/"+displaysecond+"/"+displaythird
    But this does not work. In Dreamweaver the .00 appear red.
    I suspect that I need to put 00N20000001QbHo in parentheses or something similar.
    Can anyone help a newbie who doesn't know what he is doing? Full script below
    <form name="dform">
    <input type="text" name="00N20000001QbHo" size=11>
    </form>
    <script>
    var mydate=new Date()
    var theyear=mydate.getYear()
    if (theyear < 1000)
    theyear+=1900
    var theday=mydate.getDay()
    var themonth=mydate.getMonth()+1
    if (themonth<10)
    themonth="0"+themonth
    var theday=mydate.getDate()
    if (theday<10)
    theday="0"+theday
    var displayfirst=themonth
    var displaysecond=theday
    var displaythird=theyear
    document.dform.00N20000001QbHo.value=displayfirst+"/"+displaysecond+"/"+displaythird
    </script>

    JavaScript.is.not.Java.
    This is a Java forum. You could look out for a JavaScript forum at JavaScript.com. I believe JavaRanch also has one.
    db

  • How to auto-populate dates in a calendar based on radio buttons?

    Hi,
    I'm trying to create an availability form that is submitted on a monthly basis. What I'd like is to have a radio button the user could click to indicate what day the first of the month falls on (Monday through Sunday), and have fields auto-populate with the remainder of the dates on the calendar. As it stands right now, I've got the radio buttons and the text fields, but I'm running into serious issues getting the text fields to auto-fill based on the selected radio button.
    I've labelled the radio button group "First Day of Month" and the individual values are "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday" and "Start". The "Start" button is hidden but is checked by default.
    My text fields are even simpler: "Monday 1" "Monday 2" "Monday 3" "Monday 4" and "Monday 5" (and then, obviously, repeated for each day of the week.
    I am horrible at scripting, so I think that might be where I'm running into issues. What I'd like to put is something like this (only, you know, functional, and for each days' text value):
    For "Monday 1"
    if "First Day of Month.value" = "Monday", "Monday 1.value" ="1"
    else "Monday 1.value" = ""
    For "Wednesday 3"
    if "First Day of Month.value" = "Sunday", "Wednesday 3.value" = "11"
    if "First Day of Month.value" = "Monday", "Wednesday 3.value" = "17"
    if "First Day of Month.value" = "Tuesday", "Wednesday 3.value" = "16"
    if "First Day of Month.value" = "Wednesday", "Wednesday 3.value" = "15"
    if "First Day of Month.value" = "Thursday", "Wednesday 3" = "14"
    if "First Day of Month.value" = "Friday", "Wednesday 3.value" = "13"
    if "First Day of Month.value" = "Saturday", "Wednesday 3.value" = "12"
    else "Wednesday 3.value" = ""
    For "Sunday 5"
    if "First Day of Month.value" = "Sunday", "Sunday 5.value" = "29"
    if "First Day of Month.value" = "Friday", "Sunday 5.value" = "31"
    if "First Day of Month.value" = "Saturday", "Sunday 5.value" = "30"
    else "Sunday 5.value" = ""
    Is this possible? I have no doubt there's a better way to do it (with proper coding and everything), so any help would definitely be appreciated!

    Hello,
    Which sharepoint edition you are using? I would prefer to customize your list form in infopath form then add new connection which will connect to your SQL. Later you can filter data based on cust ID. Here is the link to add connection in infopath:
    http://office.microsoft.com/en-in/infopath-help/add-a-data-connection-to-a-microsoft-sql-server-database-HP010092823.aspx
    If you want to do it via code then simple ADO.NET connector will help.
    http://www.codeproject.com/Articles/33862/Connecting-to-Database-Using-Custom-Webpart-in-Sha
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to auto populate data values on Material Class in Classification?

    Hi,
    I created 10 characteristics and assigned them to a class (type 001 for Material). This class I added in Material Master under Classification.
    These 10 characteristics contains 2 key values where these 2 values able to retrieve the rest of 8 characteristics, which stored in different customize tables.
    Is there a way to make when user enter 2 key values of the characteristics in the class and the rest of 8 characteristics would be auto populate base on these 2 key values?
    USER_EXIT or something?
    Please help.
    Aish  T.T

    Hello,
    You can either use jquery/jaavscript or infopath form to achieve this. There is no default way to do this.
    I would suggest jquery because you can put script in newform/editfor.aspx page using content editor webpart. Refer this link for jquery:
    To get value from list:
    http://social.technet.microsoft.com/Forums/en-US/ac47fe2a-ccb6-4f5b-b274-703aecc6cb0a/get-list-items-in-sharepoint-2010-by-using-jquery
    http://www.robertkuzma.com/2010/08/read-list-items-using-sharepoint-web-services-and-jquery/
    To set value in column:
    http://paulgalvinsoldblog.wordpress.com/2009/06/13/quick-and-easy-use-jquery-to-set-a-text-field%E2%80%99s-value-on-a-sharepoint-form/
    http://spservices.codeplex.com/discussions/468729
    If you use infopath form, then you need to create two data connection to get data from both lists. Later you can set value in fields based on selection using rule. This can be possible without code.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to auto populate data from one list in SharePoint 2007 into another list based on a key value?

    Hi,
    As a part of new requirement in my project I am supposd to work on SharePoint 2007. I have one List (BCExtract - Main list) with all data related to an Application (like ID, name, app manager RTO etc).
    I have created another list which has form to be filled by a user (with details about his/her applications). My requirement is that when the user enters AIT ID then the page should refresh (probably after hitting enter) and other details like Application
    name, RTO etc which is present in another list gets auto populated depending on the AIT ID (unique column) entered so reduce the burden on the user.
    Please suggest me how this can be done. I do not have permission for obtaining SharePoint Designer and I do not know JQuery. Infopath is ok but if this can be done through SharePoint 2007 alone then it would be great.
    Thanks....

    Hello,
    You can either use jquery/jaavscript or infopath form to achieve this. There is no default way to do this.
    I would suggest jquery because you can put script in newform/editfor.aspx page using content editor webpart. Refer this link for jquery:
    To get value from list:
    http://social.technet.microsoft.com/Forums/en-US/ac47fe2a-ccb6-4f5b-b274-703aecc6cb0a/get-list-items-in-sharepoint-2010-by-using-jquery
    http://www.robertkuzma.com/2010/08/read-list-items-using-sharepoint-web-services-and-jquery/
    To set value in column:
    http://paulgalvinsoldblog.wordpress.com/2009/06/13/quick-and-easy-use-jquery-to-set-a-text-field%E2%80%99s-value-on-a-sharepoint-form/
    http://spservices.codeplex.com/discussions/468729
    If you use infopath form, then you need to create two data connection to get data from both lists. Later you can set value in fields based on selection using rule. This can be possible without code.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to auto populate a column/SharePoint list with Current Date?

    I have a SharePoint list and I created a column called ‘CurrDate’. 
    I need this column to;
     Display the current      date,
    Auto populate all rows with the current date in the      SharePoint list
    Dynamically update with the current date
    I first tried creating the column using the default SharePoint interface Date Time but it’s not doing any of the steps listed above:
    I even tried entering =[Today] in the Calculated Value field. 
    Still nothing…
    So, I’m sure you will toss out a code snippet to make this work, which is great. 
    However, I’m a total noob with SPD, where the heck do I insert this snippet?
    Always in need of help.

    Hi ,
    I understand that you want to add a column  to a list to hold current date. Here is a workaround:
    Add a single line of text column to the list. Name the list as Today.
    Add a calculated column to the list. Use the [Today] as the formula. Set the calculated column to be Date and Time type.
    Delete the Today column from the list.
    Thanks,
    Entan Ming
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please [email protected]
    Entan Ming
    TechNet Community Support

  • LiveCycle ES2 - Auto Populate Date field when signed

    Good afternoon,
    I've got a signature field called "sgnPOC" and a date field called "sgnPOCDate" I'd like to have the date field filled in automatically when the sgnPOC is digitally signed.
    I added the following to the postSign* event to sgnPOC.
    FORM.Main.sgnPOCDate.rawValue = util.printd("mm/dd/yyyy", new Date());
    and different variations including setting the date to yyyymmdd and like. It just won't auto populate. It passes the script check in the script editor.
    any ideas?
    Thank you.

    Thank you,
    I tried the following - to no success.
    FORM.Main.sgnPOC::postSign - (JavaScript, client)
    var myDate=date()
    FORM.Main.sgnPOCDate.rawValue = Num2Date(myDate, "YYYY-MM-DD")
    I also tried this
    FORM.Main.sgnPOC::postSign - (JavaScript, client)
    var myDate=date()
    $.rawValue = Num2Date(myDate, "YYYY-MM-DD")
    Which also did not work, but wouldn't that need to know where to put the date?

  • Creating a Fax sheet that auto-populates

    Hi:
    I am trying to create a fax sheet that has a list of companies in a drop down menu.  When a user selects a company, I want the phone field to auto-populate with the phone number.  I am using Acrobat X.  Any help would be greatly appreciated.
    Thanks
    Jeff

    Hi George:
    Sorry to bug you again but my combo box and the code are working great but my only problem is after I choose the company name from the combo box, I have to click my cursor into the phone number field for the phone number to auto-populate.  Is there a way to avoid that happening and the number will just appear when I click the company name?
    Thanks,
    Jeff

  • InfoPath 2013 customized forms no longer working after linking Sharepoint 2010 list to MS Access 2013 database

    Hello,
    I am having trouble with my infopath form now that I have linked my Sharepoint list to an Access database.  
    Background:  I created a simple SharePoint list and a few workflows to have users submit requests for changes to my organization's EMR system and have those requests be approved by the appropriate manager/department.  I used
    InfoPath to customize my form so that it would hide/show different portions depending on what the user selected.  The form has 3 views: NewItem, EditItem, ViewItem. 
    Issue: The form and workflows were working great until I linked my SharePoint list to an access database so that I could run queries and reports using that information. Now when I click "Add New Item" on my Sharepoint site,
    the correct form opens but the fields do not allow me to input any data and some of the formatting for the form has changed (ie: the text boxe fields are no longer centered.  I opened the form in InfoPath and it displays perfectly fine in there but
    not once it's published to the site) . 
    The only way that I've been able to input new data is using Datasheet view in SharePoint.  
    Is there a way to fix this issue?  I really need to be able to have the customized forms for users to fill out the information since most users are not familiar enough with SharePoint to expect them to be able to use Datasheet view to submit their requests. 
    Again, I'm using InfoPath 2013, Access 2013 & SharePoint Server 2010
    If the issue cannot be fixed, how can I disconnect or unlink my SharePoint list from the Access database because when I cliecked on "delete list" from inside Access, a warning popped up stating that it will also delete the list off of SharePoint
    as well.  If I can get the list back to the state it was in before linking to Access then I'll be happy enough to export it excel and then importh the excel file to Access as a work around for reporting purposes since I don't have to run the reports that
    often. 
    Any insight would be very helpful!!

    Hi Bostic,
    I tested the same scenario per your post in my environment, however the InfoPath form was not affected if I used the list as external data in Access database.
    The issue may be due to the browser you used.
    I recommend to verify the things below:
    Change another browser to see how it works.
    Add the site to the trusted zone and add to compatibility settings in Internet Explorer.
    Test with a new list to narrow down the issue scope.
    As a workaround, you can save the list as a template including content, and then create a new list based on this template.
    Learn how to Save a SharePoint List Template:
    http://www.fpweb.net/sharepoint-2010/tutorials/content/save-list-template/#
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

Maybe you are looking for