Dropdown List Box in Repeating Table - InfoPath Dev
in

InfoPath Dev

Dropdown List Box in Repeating Table

Last post 01-02-2013 11:16 AM by Hilary Stoupa. 22 replies.
Page 2 of 2 (23 items) < Previous 1 2
Sort Posts: Previous Next
  • 12-20-2012 12:34 PM In reply to

    Re: Dropdown List Box in Repeating Table

    Hilary,

    Thanks for your patience :)  I run a query for our Purpose drop down below:

     adapter.Command = String.Format("SELECT Category from bpiPersonalReimbursementPurposeCategory where Purpose = '" + e.Site.text + "' order by Purpose,Category"

    Since I can't use e.site.text because I won't be on the Purpose.OnAfterChange event, I'm not sure how to access the Purpose for the expense item in a repeating table that I have moved to.  I think that's the last thing missing.  Makes sense to re-query on the button.  Sorry I didn't realize that.  Helps to know that during the onBeforeChange event the DOM is read only.

    Mary

     

    Mary
  • 12-20-2012 12:53 PM In reply to

    Re: Dropdown List Box in Repeating Table

    If you add code to your button, you should be able to use something like this to get the purpose:

    e.Source.selectSingleNode("ns1:Purpose")

    Run in debug on the event on the button so you can look at e.Source. :-)

    Hilary Stoupa

  • 01-02-2013 08:24 AM In reply to

    Re: Dropdown List Box in Repeating Table

    Hilary,

    That did it.  The button works great.  Thanks for your help.  I have one final question.  This field is contained in a cell of a repeating table.  With the addition of the expression box it now takes up two lines instead of one, even though the expression box and drop down don't display at the same time.  Is there a way when I hide either one for it not to be taken into account in the display screen so I can keep it all on one line?

     Thanks again.

    Mary

    Mary
  • 01-02-2013 08:34 AM In reply to

    Re: Dropdown List Box in Repeating Table

    Do you have a carriage return between the two controls? If you go back to the original sample I posted, you'll see that my row is only one line, regardless which control is displayed.
    Hilary Stoupa

  • 01-02-2013 10:19 AM In reply to

    Re: Dropdown List Box in Repeating Table

    I don't have a carriage return between them.  If I make the width smaller on both objects, there is only one line.  But I have it set at a width of 336 px to accommodate some long items in the drop down list.  If I take the expression box out or take the drop down box out, there is only one line.  But with both on the form, even when one is hidden, it is two lines.  Thanks for your help Hilary!

    Mary
  • 01-02-2013 10:29 AM In reply to

    Re: Dropdown List Box in Repeating Table

    Feel free to attach your form under the Options tab if you'd like me to take a look.
    Hilary Stoupa

  • 01-02-2013 10:55 AM In reply to

    Hilary,

    I've attached my xsn file.  It does use a schema file which I didn't attach and also has a number of data connections to databases on our servers.  That is how the Category drop down is populated.  Not sure if that will cause you problems. 

     Also, and this may seem odd but it saved massive changes at the time, the Category field has a label of Purpose.  We used to have Purpose > Category but then they decided to switch them around.  So if you click on the field following the Purpose label, you will see it is the Category field.  In that section I have the button and the expression box.  I put the CategorySelected field over to the right as I was trying to reformat things.  I made the changes on the Initiator (default) view only.

    Mary

    Mary
  • 01-02-2013 11:16 AM In reply to

    Re: Dropdown List Box in Repeating Table

    Yeah - it is being stubborn about previewing.

    What I usually do is put my cursor to the left of the expression box and backspace to ensure that there is no carriage return between the controls. I also usually set row height to auto for the row - generally that prevents these issues.

    Hilary Stoupa

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