Update the value of a text box based on the value of another control - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Update the value of a text box based on the value of another control

Last post 03-27-2013 02:58 AM by varun_singhal. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 03-26-2013 01:47 AM

    Update the value of a text box based on the value of another control

    Hi Everyone, I am new to this forum and also new to the world on infopath forms. However i have a fair understanding of it.

    I am trying to create a form for a knowledge base and i am stuck at a point. In my form, there is a table with few columns. The first column is "category" which is a dropdown list. The second column is named "Application Name" which contains few controls including dropdowns, combobox and rich text box. Based on the value which is selected in CATEGORY, the APPLICATION NAME control changes. Rest all controls hide based on few rules. I want to then save the current value of the control to another field which i can then use to group the articles in the KB and more like create a two level tree structure.

     I can send the XSN file if need be. I do not know how to do coding in .Net and have done a fair amount of research but i am unable to find any solution for this. Please help.

  • 03-26-2013 05:40 AM In reply to

    Re: Update the value of a text box based on the value of another control

    Hi-

    It sounds like you can just a rule.

    When the value of a field changes, the rule will Set a field's value.

    Have you tried this? I don't believe code is necessary in your scenario.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-26-2013 07:15 AM In reply to

    Re: Update the value of a text box based on the value of another control

    I have tried using the rule but it still does not take the value of the second control to the text box
  • 03-26-2013 07:20 AM In reply to

    Re: Update the value of a text box based on the value of another control

     Where are you setting the rule? Remember, you need to set the rule on the field that changes, not the target field (sorry if you already know this, I just seem to see this error a lot. :) )

    Hilary Stoupa

  • 03-26-2013 07:51 AM In reply to

    Re: Update the value of a text box based on the value of another control

    Hi Hilary,

    I have attached a screenshot of the form which i have created. As shown, the first column is CATEGORY which contains a drop down. The second column APPLICATION NAME contains various columns. I think i have made some major mistake in the design in this part. I have rules running on every control in the APPLICATION NAME. For example, if the category is office 2007, then only the drop down which has excel on it will be shown and the rest all will be hidden. I now want this value of excel to be saved to another text box. Sorry i am pretty new and i am somehow getting this feel that there is some serious mistake in my design. please let me know.


  • 03-26-2013 08:45 AM In reply to

    Re: Update the value of a text box based on the value of another control

     I'm not sure what your data source looks like - are all the drop downs in the Application Name column bound to the same field in the data source?

    Hilary Stoupa

  • 03-26-2013 09:09 AM In reply to

    Re: Update the value of a text box based on the value of another control

    I have values bound manually on the drop downs and combo boxes.
  • 03-26-2013 12:22 PM In reply to

    Re: Update the value of a text box based on the value of another control

    Well - just to speak very generally here - usually you'd have rules on your Category field that set the value of the Application field - if that is what you are trying to do? I'm afraid at this point I'm a bit confused - why do you have so many drop downs for Application? 

    Hilary Stoupa

  • 03-26-2013 12:44 PM In reply to

    Re: Update the value of a text box based on the value of another control

    Hi Hilary,

    The column for applications contains a lot of control types like drop downs, combo boxes and rich text boxes. thats why i have so many controls. I think the best way to choose the data source for the application name column will be to choose some external sources. is it?

  • 03-26-2013 02:57 PM In reply to

    Re: Update the value of a text box based on the value of another control

     Usually, yes. I'd have a list with Company and Application in SharePoint, for example - then add that as a secondary data source and use that info to populate Application based on Company.

    Hilary Stoupa

  • 03-27-2013 02:58 AM In reply to

    Re: Update the value of a text box based on the value of another control

    Thanks for your valuable inputs. I will work on it and if need be will seek for your suggestions again. Many thanks :) 
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.