Displaying selected node after switch view - InfoPath Dev
in

InfoPath Dev

Displaying selected node after switch view

Last post 08-14-2006 08:54 AM by Shiraz Cupala. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 04-29-2006 05:59 PM

    • spudy
    • Top 150 Contributor
    • Joined on 03-23-2006
    • United Kingdom
    • Posts 67

    Displaying selected node after switch view

    Hello all....

    I have a view with repeating table that show two fields from a repeating group. Each row in the table has a view and edit button. When a button is clicked I want to switch view and display all fields of the repeating group.

    Any ideas?

    Spudy
  • 04-30-2006 03:27 AM In reply to

    Re: Displaying selected node after switch view

    Hello Spudy,
    In order to switch view when we click a button you should apply rules. First create second view in which you would place all the fields of repeating group which you would like to display, then apply rules to button to switch view. To switch view please follow these steps:

    1. Double click on the button, click Rules, and then click Add.
    2. Name the rule "View 2", and then click Add Action.
    3. Select Switch Views from the Action drop-down list, select Tab 1 from the View drop-down list, and then click OK four times to close the Button Properties dialog box and apply the rule.

    Hope this helps!
  • 04-30-2006 03:35 PM In reply to

    Re: Displaying selected node after switch view

    Check out these tutorials, I think they're doing what you want:

    http://www.infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353
    http://www.infopathdev.com/howto/tutorials/default.aspx?i=3ed83f87f32a4b9699dfcd232cc4e602
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-01-2006 02:32 AM In reply to

    • spudy
    • Top 150 Contributor
    • Joined on 03-23-2006
    • United Kingdom
    • Posts 67

    Re: Displaying selected node after switch view

    Perfect, thank you for the links.
  • 08-09-2006 11:20 PM In reply to

    Re: Displaying selected node after switch view

    Hi All,

    The links that Matt posted are useful when you want to view existing data.

    What if you are in a new record mode (with SQL database connection) and you want to switch views and just see the detail that you are currently editing.

    What I need is something like the asset tracking sample form from Microsoft. I tried my hand at re-using what exists in the sample form but failed. I found it a little complex.

    Is it possible and can I get some guidance on this from anyone.
  • 08-10-2006 02:06 PM In reply to

    Re: Displaying selected node after switch view

    Ah, there is a trick to do this without code. What you do is when you click the button you have a first rule which sets the value of a "helper node" to the position() of the current repeating node you're inside. Be sure the button is directly in the repeating section and not inside another repeating section.

    Then the next rule is a switch view to the detail view.

    Finally add a filter to the last view which only shows the item when the expression "position() = theHelperNode"

    Thanks, Shiraz
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 08-11-2006 06:34 AM In reply to

    Re: Displaying selected node after switch view

    If you're in New Record mode, you're only dealing with one Record right? What I would suggest is putting everyting on one view and then having a checkbox that determines whether or not details are displayed. To do this, put all of the "detail" nodes in a section and then conditional formatting on that section that hides or shows depending on the state of the checkbox node.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 08-11-2006 08:12 PM In reply to

    Re: Displaying selected node after switch view

    Another option for putting everything on the same view is to use the Master/Detail control which is designed for this.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 08-11-2006 11:26 PM In reply to

    Re: Displaying selected node after switch view

    The checkbox and master detail suggestions are good solutions. But to improve the user's experience I need to de-clutter the default view by moving out a chunk to a detail view.

    I used the position function method and set the filter on the detail View's repeating section properties to:
    "position()=../../../../../../my:tempHelperNode"

    However the position() function "returns the index number of the node within the parent", so it can still return multiple records. So for example if I am editing the first node in the default view and then switch to the detail view, all the first nodes of all the parents are returned.

    How can uniquely identify the node I am editing (in new record mode) or viewing(sometimes in query mode)?
  • 08-14-2006 08:54 AM In reply to

    Re: Displaying selected node after switch view

    Ah, I think you are saying that you want to edit the a specific drill down on a repeater within another repeater. In this case you have to get position twice (you will need two hidden helper nodes). When the user clicks the button you need to store position for the immediate item and the position for the parent item. This will be two rule actions. Then in your detail view you need to drag in both nested repeating sections and filter both to narrow down only to the single item within the dual repeaters.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.