Populating Textbox, Based on Drop Down - InfoPath Dev Sign in | Join | Help in SharePoint Integration InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » SharePoint Integration » Populating Textbox, Based on Drop Down 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: Oldest to newest Newest to oldest Previous Next 09-17-2009 11:19 AM SuperScott Joined on 09-09-2009 Posts 3 Populating Textbox, Based on Drop Down Reply Contact 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 Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 spkelsey Joined on 10-01-2009 Posts 11 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 Qazi Anis Joined on 03-13-2009 Chicago Posts 1,025 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 AnisTechnical ArchitectBitwise Inc 10-01-2009 02:40 PM In reply to spkelsey Joined on 10-01-2009 Posts 11 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 Qazi Anis Joined on 03-13-2009 Chicago Posts 1,025 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact where is the info abt the companies that you want to display supposed to come from.where is the info stored Qazi AnisTechnical ArchitectBitwise Inc 10-02-2009 06:06 AM In reply to spkelsey Joined on 10-01-2009 Posts 11 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 Qazi Anis Joined on 03-13-2009 Chicago Posts 1,025 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 AnisTechnical ArchitectBitwise Inc 10-02-2009 09:45 AM In reply to spkelsey Joined on 10-01-2009 Posts 11 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact That did it. Thanks for the help. 10-25-2009 11:10 AM In reply to sammor Joined on 10-24-2009 Posts 5 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 Qazi Anis Joined on 03-13-2009 Chicago Posts 1,025 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 AnisTechnical ArchitectBitwise Inc 11-06-2009 11:52 AM In reply to sammor Joined on 10-24-2009 Posts 5 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 princevis Joined on 08-18-2009 Delhi Posts 129 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 SrivastavaSenior Software EngineerSDG Software Pvt Ltd 11-06-2009 06:43 PM In reply to sammor Joined on 10-24-2009 Posts 5 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 Qazi Anis Joined on 03-13-2009 Chicago Posts 1,025 Re: Populating Textbox, Based on Drop Down Mark as Not AnswerMark as Answer... Reply Contact 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 AnisTechnical ArchitectBitwise Inc Page 1 of 2 (18 items) 1 2 Next > Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
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
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...
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?
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.
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?
where is the info abt the companies that you want to display supposed to come from.where is the info stored
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.
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
That did it. Thanks for the help.
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.
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
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:
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,
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.
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?
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.