Cascading Drop-down List Boxes - InfoPath Dev
in

InfoPath Dev

Cascading Drop-down List Boxes

Last post 06-17-2005 07:24 AM by 0bscur3. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-16-2005 08:44 AM

    Cascading Drop-down List Boxes

    I was able to get the example working for a form I was putting together.

    Thanks for "Cascading Drop-down List Boxes in a Repeating Table (Using XSL Variable), v1.0"

    I followed the format for example two except her is my xml:

    <Software>
    <Product value="Corporate Enterprise 1 Year">
    <User value="1-50">
    <Price value="$1650.00"/>
    </User>
    <User value="51-100">
    <Price value="$2750.00"/>
    </User>
    </Product>
    <Product value="Corporate Enterprise 2 Year">
    <User value="1-50">
    <Price value="$2805.00"/>
    </User>
    <User value="51-100">
    <Price value="$4675.00"/>
    </User>
    </Product>
    </Software>

    I am able to get from the form by editing the view1.xsl so that I pick the product, then populates the User List and I choose the users.


    The problem. I want after I choose the user to populate the field My:price. Based off the xml <Price value="$4675.00"/>.

    I tried a rule to do this but it hasn't been very sucessful. Any help would be appreciated.

    Thanks.
  • 06-16-2005 04:15 PM In reply to

    Re: Cascading Drop-down List Boxes

    You will need to set a Rule on the User dropdown and select Set a field value, here select the Price node in this secondary Dom that you are using (which is above) and then filter such that value of the User (in the main dom) = the value of User in the secondary dom.

    You will need to use current() to get the value of the user of that specific row in the main DOM.

    Shanthi
    InfoPathDev India
    Shanthi Reddy
  • 06-17-2005 07:24 AM In reply to

    Re: Cascading Drop-down List Boxes

    Shanthi,

    Thanks for the reply, I tried your comments but I get the error that it cannot be applied to this field. Here is what I did.

    1. The User Field is blocked out under design field with Preserve code block fromt he view1.xml. So I open the data source tab and select user from the main domain and go to properties and then the third tab which is the rule tab.

    2. I add rule and name price. Add Action -- Set a field's value -- I click the button next to the Field: and select the price from Main DOM.

    3. I select the button next to the Value: I click insert group or field, I click the user field in the main dom and then the filer button on bottom left.

    4. From here I make user (main dom) = user (second dom which is the xml file above). It says the filter cannot be applied to the currently selected field.

    I would think if the rule is going on the user field (main) then the first field you select under set a field value would be price and then that information would filter from user (main) equal to user (sec dom). Then I can xpath edit it.

    ../my:Price[../my:User = xdXDocument:GetDOM("WSPricing")/Software/Product/User/@value]
    so I change that to

    ../my:Price[../my:User = current ()/../("WSPricing")/Software/Product/User/@value]

    That is obviously the wrong formula. Any help?
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.