How to select a different view based fields value - InfoPath Dev
in

InfoPath Dev

How to select a different view based fields value

Last post 05-13-2005 11:26 AM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-09-2005 02:36 PM

    How to select a different view based fields value

    I have 3 views in a InfoPath file that is connected to a MS SQL Data source

    The three views are :
    1) Start View
    2) New Entry View
    3) Edit/Delete Entry view

    The Start View has only one field (call it BoxNumber). When I hit submit on
    Start View, I query the database for that BoxNumber and if the database
    already has the entered BoxNumber, then I would like to be in the Edit/Delete
    Entry view. If the entered BoxNumber is not in the database, then this is a
    new entry, and I would like to be able to go the the New Entry View.

    The part that I am having difficulty with is dynamically selecting between
    the 2nd and 3rd views based on the user input in the 1st view.

    Any help in regards to this is greatly appreciated. Thanks much!

    -Elridge
  • 05-09-2005 06:01 PM In reply to

    Re: How to select a different view based fields value

    Hi Elridge,
    Welcome to the board! You can add a rule to your submit adapter that checks the value after you get the data and switches the view based on that. Alternatively, you can write some code that does the same thing.
    Cheers,

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 05-12-2005 11:11 AM In reply to

    Re: How to select a different view based fields value

    Hi Patrick,

    Thanks for your response to my query.

    I am pretty new to InfoPath, so I was wondering if you could point out how to add a rule that checks the value after I get the data and then switch views based on that? I looked into what you recommended but I am still not able to do this.

    Also, in regard to writing code to do this, could you point me in the right direction to view some resources that might be useful. I have not used JScript before although I have used Perl on other projects.

    Thanks very much,
    Elridge

  • 05-13-2005 11:26 AM In reply to

    Re: How to select a different view based fields value

    Hi again Elridge,
    Adding rules is discussed in my book and there are numerous examples of code too. In addition, you can find some samples on our site that discuss rules, etc. We will be unveiling new content in 2 weeks. Stay tuned ...


    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.