auto fill other fields - InfoPath Dev
in

InfoPath Dev

auto fill other fields

Last post 12-10-2014 08:35 AM by TracyW. 31 replies.
Page 2 of 3 (32 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 12-17-2008 01:53 PM In reply to

    When the form opens .. I have a drop down for the user to pick the CCS Name .. how within the drop down box do I have it save the 3 fields of information from the secondary to the form and display in an Expression box?

  • 12-17-2008 02:09 PM In reply to

    You don't do anything within the drop box unless you want to set some rules that push data to other fields.  You can do this, or you can use the default method I mentioned before.  One thing I don't know about is when you refer to an expression box.  I don't use expression boxes for anything, so maybe you need to explain what you want to do with this expression box.  In lieu of that, I will explain the steps for doing what I said before:

    1. In your primary data source (myFields), create placeholders for Name, Phone, and Email - make them each regular text fields.
    2. Drag Name from your data source pane onto the blank canvas - it should show a blank text field.
    3. Change this text box to a drop-down list
    4. Configure the dropdown list properties accordingly in the List Box Entries area at the bottom of the Data tab:
      • Select the radio button that says Look up values from an external data source
      • Set Data Source to whatever data connection you created that pulls from the CCS list
      • Set Entries to the lowest folder in the schema (press the function button the right and drill down).  It should have the name of your SharePoint list
      • Set Value to the CCSName node (hit function button and drill down)
      • Set Display name to the CCSName node (hit function button and drill down)
      • Click OK
    5. Double-click your Phone data element, and set it to default to CCSPhone field
      • On the Data tab, click the function button next to the Default Value field
      • Click Insert Field or Group
      • Change the Data Source at the top to your CCS data connection
      • Drill down and click once on the CCSPhone node
      • Once selected, click Filter
      • Click Add to add a filter
      • Set the filter so that CCSName (CCS data source) is equal to Name (main data source)
    6. Repeat for Email

    What this will do is it will autopopulate the Phone and Email fields with the phone numbers and email addresses that correspond to the name that was selected.  You're basically saying...hey, InfoPath, take the name that was selected, compare it against the names in the SharePoint list, and fetch me the matching email and phone #!

    Make sense?

     

  • 12-17-2008 02:28 PM In reply to

    Thanks for the step by step .. I knew I was close and I knew it had to do with filter but I thought at the time I accessed for the name I had to keep the other data as well.

     EXCELLENT !!!! Appreciate all of your help!

  • 12-17-2008 02:36 PM In reply to

    Great.  Did that fully solve your problem and work as you hoped?

  • 12-17-2008 02:40 PM In reply to

    Yes .. it fixed the problem I have probably wasted almost 3 hours on .. in 10 minutes. You are wonderful.

     

    I am keeping your name on my contact list.

     

    Thanks again.

  • 12-17-2008 03:15 PM In reply to

    RE: Unique ID / Sequential Numbering

    New Issue .. I need to be able to have the system create a uniq ID number when the form is opened NOT at submit.

     I tried the now() function but it looks pretty ugly.  I would like a sequential number system but dont' know how to set up.

     Anything easy. 

  • 12-17-2008 06:32 PM In reply to

    Re: RE: Unique ID / Sequential Numbering

    Yes, the result of the now() function LOOKS ugly, but you don't have to display it.  I like to modify my views not to show the Name but rather the title of the form, which is completely different than the filename.  It's usually the first field in my form whether it be freetext or some sort of dynamic concatenation.  You can come up with all sorts of ways to choose your title and change the view to show the Infopath icon first (type field), then show the title field 2nd.  The only quirk is you no longer have the pulldown arrow associated with the name field, but that's ok with me as I want my users just clicking the infopath icon to get into the form and doing all edits there.

    I don't have an auto-incrementing sequential number system off the top of my head, but I'm sure someone has thought of one.  I think I even saw a thread on here in the last 2 days that referred to it, so I'll look.

  • 12-23-2008 08:14 AM In reply to

    Re: RE: Unique ID / Sequential Numbering

    I appreciate your response but I need to be able to provide a Unique ID and have it display.  I tried max(@D) + 1001 but that comes back with a error NaN.  Count(@ID) + 1001 seems to be able to duplicate when 2 users create a new doc at the same time.  I would like to add Time but can't get the substring-after(now()) to pull just the time?

  • 12-23-2008 09:43 AM In reply to

    Re: RE: Unique ID / Sequential Numbering

    Is that the syntax you used, or did you use the proper full syntax for substring-after?  It would be:

    substring-after((now()), "T")

    That will pull the time off of every date/time stamp using the now() function.  It takes all text after the T, which is between the date and time in the results.

  • 03-27-2009 06:16 AM In reply to

    • blulew
    • Not Ranked
      Male
    • Joined on 03-27-2009
    • Posts 2

    Hi All,

    I am new to Infopath and Sharepoint and am attempting to create a form that will utilize the Auto Fill function described in warrtalon's post RE: auto fill other fields, dated 12-16-2008 07:37 PM.  I have it all created, but no matter how I set the formula, it always auto fills the other fields with information from the first entry in my sharepoint list.  I am pulling what little hair I have left out!  Any help appreciated.

    Using Infopath 2007 along with Sharepoint Server 2007.

  • 03-27-2009 07:46 AM In reply to

    Lew, you have to set the dropdown list to display the words you want but to have the VALUE of whatever the unique identifier is for that list.  You then use that unique identifier to specify which data goes into the other fields.

  • 03-27-2009 09:12 AM In reply to

    • blulew
    • Not Ranked
      Male
    • Joined on 03-27-2009
    • Posts 2

    Thanks for the quick reply warrtalon.  I have it now.  I had to add some filtering along with the rules.  I do have another question.

    I have my form published to a Sharepoint Library and it can be opened with either Infopath or the Browser.  I use the NEW button in the library to open the form.  Is there a way to force infopath to close and return you to the document library when you click submit?  If the browser is used, is there a way to force the browser to return to the document library once the form is submitted.

    Is any of this possible?

  • 03-27-2009 10:17 AM In reply to

    Yeah, you have to filter based on some unique field - that was the bottom of step 5 above.

    The part about returning the user to the form library should be automatic unless I'm missing something.  I only use browser forms, and when mine are submitted or saved/closed, it returns the user to the form library.  I actually use custom submit buttons with rules behind them instead of the built-in submit function, so maybe it's different, but if you look at the URL of your browser form when it's open, you will see a return URL embedded.  This URL is typically the URL of the View the user was in when clicking New or clicking on an existing form.  It always returns you to that view.  When constructing a dynamic URL in a workflow or automated email, you can actually choose the return URL so that when someone submits or closes the form, it returns them to whatever URL you prefer (the same form library or some other location).

    Oh, to be clear, I put a "close" action at the end of the set of actions on my submit buttons.  This closes the form cleanly without the user having to do it, and it returns the user to the URL specified in the full Forms Server URL.

  • 08-11-2009 08:00 AM In reply to

     Hi,

     I'm also having a few issues pertaining to automatically filling in a form. I've tried using this quide (http://www.bizsupportonline.net/blog/2008/09/how-to-copy-contents-one-rich-text-field-to-another/) but am not having much success. 

     Basically I have a dropdown box in which I would like repeated into a text box. I'm using Infopath 2007 and am not sure if the above link is for Infopath 2007. 

     Many thanks for your help. 

    Jon

  • 08-13-2009 05:05 PM In reply to

    that link is talking about rich text fields, which behave much differently.

    Please create a new thread with your exact problem in much more detail if you don't mind, because this reply is buried deep inside a long-ago answered thread.  Please explain exactly what you mean by "a dropdown box repeated into a text box."  Where is the dropdown box and why would you "repeat" it into a text box?  Are you talking about displaying the contents of a dropdown list box in a repeating table with one text box element?

Page 2 of 3 (32 items) < Previous 1 2 3 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.