auto populating a read only text box - InfoPath Dev
in

InfoPath Dev

auto populating a read only text box

Last post 07-09-2009 05:47 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-08-2009 06:48 AM

    • Gagan
    • Top 500 Contributor
    • Joined on 06-02-2009
    • Posts 31

    auto populating a read only text box

    hello all,

     i have set up an xml file so that drop downs automatically filter. it 4 levels deep.

              location
                   product
                         ingredient
                                 code

    the first 3 are drop downs, and filter just fine, so if i pick a specific location, only those products show up and so on, so forth (using xml, and filter properties)

     the problem is for my "Code" i want a read only text box that popultes depending on the ingredient picked, the xml file usually only has one code for each ingredient, but sometimes more than one, but they are all the same when they duplicate. i went into the text box properties and did the FX and selected the options the same way as i did the drop downs, but it does just not seem to work. the forumala for the text box ended up as "Code[@IngredientName = Ingredient]" (i did check update the value when result is recalculated)

     so i am lost, any ideas?
                     

     

  • 07-09-2009 05:47 PM In reply to

    Re: auto populating a read only text box

    Hi Gagan,

    May have to do with the xpath axis not being correct (in other words, it doesn't get the right Ingredient). Check out Greg's blog entry on Axis: http://www.infopathdev.com/blogs/greg/archive/2005/06/13/Using-XPath_2700_s-_2700_preceding_2D00_sibling_2700_-Axis-Correctly.aspx

    Another way to do this is to just set the field. Add a rule to the 3rd dropdown that sets the field of the 4th. When you choose the 4th field to set you'll get a filter button in the lower left corner of the dialog. Use that and you may not have to worry about writing your own xPath.

    Hope this helps!

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.