Dynamic Control - InfoPath Dev
in

InfoPath Dev

Dynamic Control

Last post 06-18-2007 02:11 AM by romaik. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-15-2007 08:09 AM

    • romaik
    • Top 500 Contributor
    • Joined on 05-31-2007
    • Paris France
    • Posts 43

    Dynamic Control

    Hello every one

    I have a problem and I don't know how to sort it out.

    I would like to know if there is a way to have different control depending on a secondadry data source ?

    Example :

    •  In my secondary data source, there is a line :

                <price></price>

                 and it automaticaly creates a text field

    •  Or I could have a data like this :

                 <actors>

                        <actor>bob</actor>

                       <actor>John</actor>

                       <actor>Jenny</actor>
                </actors>

                 And it automatically creates a combo box with those names

    Even worst : tags may not be actors or price, but text1, text2, not knowing to what it is refering (the process of the data is made through a java app)

    Is there a way to make this ?
     

    InfoPath 2003 SP2 User
  • 06-15-2007 11:51 AM In reply to

    If you are trying to do this in a truly generic fashion, then no, there is no way to do it.  However, if you know all of the possible schemas that might occur in the secondary data source, then you should be able to implement the controls for each one, and then use conditional formatting to display only the one that needs to be displayed.

    Good luck!

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-18-2007 02:11 AM In reply to

    • romaik
    • Top 500 Contributor
    • Joined on 05-31-2007
    • Paris France
    • Posts 43

    Hello Matt

    For now, I only need to have Text Field or ComboBox.

    The structure of the XML has changed a bit.

    it would be :

    <turbos>
            <turbo name="bathtub"></turbo>
            <turbo name="ground">
                <sub>tile</sub>
                <sub>carpet</sub>
            </turbo>
    </turbos>

    which means that I do not know how many turbo element I can have.
    I guess I have to use a extensible table : on the left the name to display, on the right the control.

    The problem is on how to say that : IF "turbo" element has no child then display a textfield

    ELSE display a combobox with what is in "sub" tags

     

    Thanks for the help 

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