Expression Box - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Expression Box

Last post 04-14-2011 06:49 AM by ashoke. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-07-2011 10:56 AM

    • ashoke
    • Not Ranked
      Male
    • Joined on 02-24-2011
    • Toronto, Canada
    • Posts 21

    Expression Box

    Hello,

    In one of my forms, I have an expression box that will take value from a node called program. The expression box is taking value e.g. 25, 26, 27 etc. as entered in program field (drop down). I want the expression box to view "AT" instead of 25, "ON" instead of 26 and so on.

    How to do that? Any suggestions?

    Thanks,

    Ash

  • 04-14-2011 05:25 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

     

     I'm full of suggestions - problem is I don't always work out if it's the best solution. But try this.

    Create a secondary datasource xml file with a structure like below.
    Then for the expression box value, select the program field/node from record repeating group/node in the myDatasource secondary connection with a filter where code field/node = value of the field/node which the user has filled in called my:program from the 'Main data-source'.

    <myDatasource>
           <record>
                   <code>25</code>
                   <program>AT</program>
           </record>
           <record>
                   <code>26</code>
                   <program>BT</program>
           </record>
           <record>
                   <code>27</code>
                   <program>CT</program>
           </record>
    </myDatasource>             

     Look at the attached example. The secondary data-source has been included in the template as an included file.
  • 04-14-2011 06:49 AM In reply to

    • ashoke
    • Not Ranked
      Male
    • Joined on 02-24-2011
    • Toronto, Canada
    • Posts 21

    Hello Skarn, Thanks for taking time to make a sample for me. Much appreciated. In fact, I have done it by adding rules in nodes. Thanks again.

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