Populating Textbox, Based on Drop Down - InfoPath Dev
in

InfoPath Dev

Populating Textbox, Based on Drop Down

Last post 02-14-2017 10:03 AM by erik.moreau. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 09-17-2009 11:19 AM

    Populating Textbox, Based on Drop Down

    Hey Guys,

     

    I have a drop down list box that populates from a sharepoint list. the sharepoint list has 2 columns.

    I need my first choice to read the 2nd column and populate a textbox.

     

    ie:

    Sharepoint List:

    1 - Red

    2 - Blue

    DropdownA = 1, 2

    TextBoxB = 

    when i pick 2, i need textboxB to display Blue.

     

    here is my problem, i cant use code, and it has to be browser based.

     

    i'm using moss and IP2007 with Sharepoint 2007.

    if you tell me i'm going to have to use code then you're going to see a grown man cry.

     

    thanks.

    -scott

  • 09-18-2009 04:02 PM In reply to

    Re: Populating Textbox, Based on Drop Down

    Hi:

    You should just be able to use a rule for this. Set a rule on your field with the drop down, DropDownA. The action of the rule should be to set the value of a field, and you want to set the value of TextBoxB. Click the fx button next to the value field. The formula editor opens. Select the Insert a Field or Group button. Select the column that contains (red, blue) from your SharePoint data source. Click the Filter button. Your filter would be that the column that contains (1, 2) from your SharePoint data source should be equal to DropdownA in your main data source. Click OK on the approximately 800 dialog boxes now open and test. I'm not getting any browser form errors in the Design Checker with this method, so I'm hopeful that it is browser compatible...

    Hilary Stoupa

  • 10-01-2009 08:20 AM In reply to

    Re: Populating Textbox, Based on Drop Down

    Not to sound stupid, but I am trying to do something like this but I am having trouble. I have a drop down populated from Sharepoint with Company names. I have a text field that is the related contact information. I can get it to where I choose a Company from the pull down but then the text field is populated with the same text, instead of the contact information. How can I get this to work correctly?

  • 10-01-2009 10:17 AM In reply to

    Re: Populating Textbox, Based on Drop Down

    i hope in the secondary data connection you are pulling in both the company name and the contact info. and that company name is displayed in the drop down and you want contact info to be populated in the text box on the basis of selection of the dropdown. go to the properties of the text box and set its value to the contact info of the secondary data conection filtered on the drop down.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 10-01-2009 02:40 PM In reply to

    Re: Populating Textbox, Based on Drop Down

    The Sharepoint data only contains the company name. If I choose a company, how would I set up the rules on the text box to show the corresponding contact information? Does the pull-down need a rules as well? If so, how would I do those?

     Is there a template somewhere I can download to see this?

  • 10-02-2009 12:54 AM In reply to

    Re: Populating Textbox, Based on Drop Down

    where is the info abt the companies that you want to display supposed to come from.where is the info stored

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 10-02-2009 06:06 AM In reply to

    Re: Populating Textbox, Based on Drop Down

    the sharepoint site has the company names, but it does not contain the contacts for them. I have to provide the contacts myself by setting up rules.

  • 10-02-2009 08:49 AM In reply to

    Re: Populating Textbox, Based on Drop Down

    in that case you will have to set rules on the drop down to populate the value of text box typical rule will be like

    if dropdownfield is equal to companyA

    textboxfile = Company a location and info

    to set rule right click on the control and click rules

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 10-02-2009 09:45 AM In reply to

    Re: Populating Textbox, Based on Drop Down

    That did it. Thanks for the help.

  • 10-25-2009 11:10 AM In reply to

    • sammor
    • Not Ranked
    • Joined on 10-24-2009
    • Posts 5

    Re: Populating Textbox, Based on Drop Down

    Hi Everyone,

     I have a similar problem. I was able to populate text box value from drop down list value. However, what about if I select a different option in drop down list?... populated value in text box would change.

     What I want to get is to accumulate selected values from drop down list in text box. To be clearer, following this example:

     Dropdown values= 1, 2

    First Selected option: 1

    TextBox value= 1

    ------------------------------------------

    Second Selected option: 2

    TextBoxB value= 1, 2

    I basically want the option of accumulate values in text box from option selected in drop down.

     Hope you may help me ! 

    Thanks in advance,

     Samuel.

     

  • 10-25-2009 11:39 PM In reply to

    Re: Populating Textbox, Based on Drop Down

    set a rule on the drop down.

    condition if textbox does not contain dropdown value

    set value of textbox to concat (textbox, ",",dropdown)

    that should help

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 11-06-2009 11:52 AM In reply to

    • sammor
    • Not Ranked
    • Joined on 10-24-2009
    • Posts 5

    Re: Populating Textbox, Based on Drop Down

    Thanks so much! That worked perfectly. :-)

     However, I do have another similar problem. Imagine that I'm getting the values of drop down list from a SharePoint list like this one below:

    Language ISO code
    Arabic ar-xm
    Bulgarian bg-bg
    Czech cs-cz
    Danish da-dk
    German de-de

    Apart of accumulate the values in text field as Iasked in previous topic, I also need to somehow filter the information in text field. Basically, I need to:

    1 - Select language from Drop Down list. Example: Arabic

    2 - Populate that value in text field, but instead of showing first column, showing second one, this is ISO language code. So if you select Arabic, it should display ar-xm.

    3 - Concat values from selected value in drop down but as I said, showing the iso code.

     Is this possible? I'm sure you guys know how to do it.

     Thanks ina dvance,

     

    Samuel. 

     

     

  • 11-06-2009 01:17 PM In reply to

    Re: Populating Textbox, Based on Drop Down

    Well,

       I think u just need to put a rule on the textbox,to select a value from the dropdown and on the basis of that populate textbox value from the secondary data connection,which in your case is list.If u still face some problem just let me know.

    Vishal Srivastava
    Senior Software Engineer
    SDG Software Pvt Ltd
  • 11-06-2009 06:43 PM In reply to

    • sammor
    • Not Ranked
    • Joined on 10-24-2009
    • Posts 5

    Re: Populating Textbox, Based on Drop Down

    Hi Vishal,

     Thanks for your response!. Well, I tryed that but it does not work. Let me know if I am wrong but my guess is that I can populate Text field by setting the conditions in drop down list but not by setting them in text field.

    Whenever I set a condition in Text field with a value from drop down list, it does not show up anything.... :-(

     Any other ideas?

    Thanks in advance,

     

    Samuel.

  • 11-10-2009 01:17 AM In reply to

    Re: Populating Textbox, Based on Drop Down

    hi Samuel,

    You cannot have a rule on textbox that will populate it when value of drop down list is changed. you can have rule on drop down list to populate textbox when it changes alternatively you can set the Default value of the text box to the value of drop down list and make sure that you check (update this value when the formula of the value is recalculated) check box.

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 2 (18 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.