Set default value of a comboBox/List box/Text box - InfoPath Dev
in

InfoPath Dev

Set default value of a comboBox/List box/Text box

Last post 03-30-2010 05:57 AM by Hoveyg. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-29-2010 11:05 AM

    Set default value of a comboBox/List box/Text box

    Hi Everyone,

     I kind of have 2 questions here.  They sound simple at first, but i've been really racking my brain on them...

    1. Set default value of a comboBox - I have a comboBox that is populated from an external data source, just wondering, is it possible to set a default value to a combo box that is populated this way?  I'm sure I could set the value via a rule, but I'm not sure what values will be in the dropdown to hardcode in a default.

    2. Set default value of a text box in a repeating section - I have an external sharepoint list brought in as a datasource, and I want to set the value of that textbox using a filter from another field in the repeating section, but everytime i set it, the value changes for each node in the repeating section, i want to set it just for that node or is that possible?

     

    (in order to do what i have it doing so far, i had to add the Dropdown box to the repeating section as a text box, then I could use change rules to set the Special message box value ie. please Provide Relationship to deceased, but as soon as I choose one node with a special message, they all display the same message)

    Any help would be appreciated.

    Greg

  • 03-29-2010 08:50 PM In reply to

    Re: Set default value of a comboBox/List box/Text box

     1.  If you don't know what values are going to be in the dropdown, how do you intend for the form to select a default value?

     2.  Unless you need the user to be able to edit this value, why not just use an expression box, and no rules?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-30-2010 05:57 AM In reply to

    Re: Set default value of a comboBox/List box/Text box

    Hi Jimmy,

     

    Jimmy:
     1.  If you don't know what values are going to be in the dropdown, how do you intend for the form to select a default value?

    -Guess there were a few ways I was thinking of handling this.. It could be contained in a field of my Sharepoint list that the datasource is coming from..   Default Value=Y.. I'd even be happy with setting the default as the first value of the list.

     

    Jimmy:
      2.  Unless you need the user to be able to edit this value, why not just use an expression box, and no rules?

    I actually started off with the expression box, but it actually worked even more incorrectly...  The expression box value was duplicated throughout all nodes.. See screenshot below.  The Annual Leave selection should have the Annual Leave label, not hte Bereavement Leave  Label.  Every single node of the repeating table will have the same value for the expression.  Thats pretty much the root of my problem and what i'm trying to accomplish.

     

     

    When I use the Rule on the text box, it actually popuplates my label a bit more properly..  but then it'll default to the previous nodes' value.. Has a very sporadic behavior..

     Any other ideas?  Any help would be appreciated.

    Thanks,

    Greg

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.