Populate Expression based on a dropdown selection - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Populate Expression based on a dropdown selection

Last post 01-17-2010 10:06 PM by texastwo. 21 replies.
Page 2 of 2 (22 items) < Previous 1 2
Sort Posts: Previous Next
  • 12-10-2009 07:56 PM In reply to

    Re: Populate Expression based on a dropdown selection

    Jimmy:
    You should be able to use current()/my:ID (or whatever the field is called) to reference the ID in the same row as the expression box.

     Except that it's in the context of the other data source instead of the repeating row so I get an error message when I try to use current. It's as if I try to XPath into the secondary data source while in the context of a repeating table inside the main datasource, while at the the same time trying to use current()/my:ID (from the main datasource) as node-test to target that element in the secondary data source...

    It was just a sample to try and learn infopath more so I'm going to change the repeating table to a regular table and skip the headache but again - Thanks.

    I'll have to try to actually learn XPath.

  • 12-10-2009 08:22 PM In reply to

    Re: Populate Expression based on a dropdown selection

     I'm not really sure what you're saying, but I assure you this is entirely possible and something that I do all the time.  Please see the attached XSN.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-10-2009 08:29 PM In reply to

    Re: Populate Expression based on a dropdown selection

    Wow dude ! You're the man. Thanks.

    That sample you sent was exactly what I was trying to accomplish. The error messages I was getting just weren't helping me. Thanks, I really appreciate it - how long have you been working on this ?

    I think I'll learn a lot from this site. Any pointers on learning InfoPath ?

  • 12-24-2009 10:01 AM In reply to

    Re: Populate Expression based on a dropdown selection

    Hi Everybody,

    I'm new to InfoPath and I have a requirement very similar to what is being discussed here. However, my requirement is to populate 3 textboxes instead of an expression box based on what is selected in the drop-down list box. My drop-down list box is bound to a secondary table (ClassTable) with the following fields:

    ClassID, ClassName, CapLimit, NumYears and Rate

    So I assigned ClassID as the drop-down list box's "Value" and ClassName as the "Display Name". Now what I need is to put the corresponding values for CapLimit, NumYears and Rate to their respective textboxes upon selecting an item on the drop-down list box.

    Is this even possible with InfoPath? Should I resort to coding in JScript? If not maybe in C#? If so, can anybody show me how to accomplish this?

    Any help will be greatly appreciated. Thanks........ and Merry Christmas to Everyone!

    - Ric

     

  • 12-24-2009 06:26 PM In reply to

    Re: Populate Expression based on a dropdown selection

     Just use the same idea as the one above, except instead of putting the formula in an expression box, put it in the Default Value property of the fields you want to populate.  Remember to check "Update this field when the value of this formula changes" and you're all set.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-29-2009 08:58 AM In reply to

    Re: Populate Expression based on a dropdown selection

    Thanks for replying Jimmy. It helped me a lot.

  • 01-17-2010 10:06 PM In reply to

    Re: Populate Expression based on a dropdown selection

    Jimmy,

    thanks for the post. I beleive this is what i'm looking for. Not to insult you but can you explain the syntax or break the formula down a bit. I am trying to use it verbaium by changing the "jobid" to a valid lib that i have etc. I cant get the formula to verify?

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