repeating section as master in master/detail form? - InfoPath Dev
in

InfoPath Dev

repeating section as master in master/detail form?

Last post 07-06-2007 02:27 PM by Greg Collins. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 10-19-2004 08:54 AM

    • Lee
    • Not Ranked
    • Joined on 07-23-2004
    • United Kingdom
    • Posts 18

    repeating section as master in master/detail form?

    Hi,
    i have the following datasource

    <data>
    <solutions>
    <solution> - repeating group
    <solutionID/>
    ... more fields
    <feature_refs>
    <refs> - repeating group
    <ref/> - feature ID
    </refs>
    </feature_refs>
    </solution>
    </solutions>
    <features>
    <feature> - repeating group
    <featureID/>
    ... more fields
    </feature>
    </features>
    </data>

    i have the majority of my form completed using master/detail functionality of IP so that the relevant features are displayed with the relevant solution. obviously selecting a different row from the solution table (master) changes the features displayed.

    However i am now trying to create a print view that has a solutions repeating section with a nested features repeating section. however i cannot seem to make it so that only the relevant features for a solution a re displayed for each solution.

    i am trying to get it to look like the following:

    solution 1 information
    feature a info
    feature d info
    solution 2 information
    feature b info
    feature f info

    ...

    but no matter what filters etc i use i generally get

    solution 1 information
    feature a info
    feature b info
    feature d info
    feature f info
    solution 2 information
    feature a info
    feature b info
    feature d info
    feature f info

    im not sure if this is making much sense as i have been trying to figure it out for the last couple of days and its starting to drive me up the wall!

    reading through this again i basically want it so that the i can use a repeating section as a master in a master/detail situation... is this possible or is there a workaround that basically does the same.

    thanks for any help you can give im at a loss.

    Lee





    Lee A Newson
  • 10-19-2004 12:01 PM In reply to

    Re: repeating section as master in master/detail form?

    I'm assuming you have some sort of a relational item that connects features to solutions. If this is the case, you can add a filter on the repeating section for the features that only shows features that relate to the solution.

    Did that make sense?

    Greg Collins [InfoPath MVP]
  • 10-20-2004 01:22 AM In reply to

    • Lee
    • Not Ranked
    • Joined on 07-23-2004
    • United Kingdom
    • Posts 18

    Re: repeating section as master in master/detail form?

    Hi Greg,

    That does make sense. The relationship between the two data groups is the featureID which maps onto the refs data element.

    When i add that filter, the features do get filtered, but only by removing the features that are not referenced by any solution.

    for example if i had 10 features and 2 solutions, solution 1 references the even features (2, 4, 6, 8, 10) and solution 2 references the features whose id is divisible by 3 (3, 6, 9) then the form when used looks like this:

    solution 1
    feature 2,
    feature 3,
    feature 4,
    feature 6,
    feature 8,
    feature 9,
    feature 10
    solution 2
    feature 2,
    feature 3,
    feature 4,
    feature 6,
    feature 8,
    feature 9,
    feature 10

    where it should look like this:

    Solution 1
    feature 2,
    feature 4,
    feature 6,
    feature 8,
    feature 10
    solution 2
    feature 3,
    feature 6,
    feature 9

    the filter doesnt seem to filter the feature list by solution, but by solutions as a whole.

    cheers for your help in this


    Lee A Newson
  • 10-20-2004 08:44 AM In reply to

    Re: repeating section as master in master/detail form?

    Will you post your filters here? Select "The Expression" in the first drop-down list and then copy the results from the text box that appears after it. Its likely just that one of the filters are missing something.

    Greg Collins [InfoPath MVP]
  • 10-25-2004 08:53 AM In reply to

    • Lee
    • Not Ranked
    • Joined on 07-23-2004
    • United Kingdom
    • Posts 18

    Re: repeating section as master in master/detail form?

    This is basically the expression that is being used for a repeating section inside a repeating section (the "outer" repeating section should act as the master)

    (statuses) my:C_SolutionDocs/my:C_Docs/my:C_Doc = ../../Solutions/Solution/S_ID (Solutions)

    "my:C_Docs" and "Solution" are both repeating groups.

    and my:C_SolutionDocs is inside a repeating group itself:

    my:C_Solutions/my:C_Solution --> my:C_Solution is the repeating group and holds all the unique information for each solution

    All in the Statuses group looks like this

    <my:C_Statuses>
    <my:C_Status> --- repeating group
    <my:C_ID/>
    <my:C_Title/>
    <my:C_Body/>
    <my:C_Link/>
    <my:C_Modified/>
    <my:C_Editor/>
    <my:C_Releases>
    <my:C_Release> --- repeating group
    <my:C_Rel/>
    </my:C_Release>
    </my:C_Releases>
    <my:C_SolutionDocs>
    <my:C_Docs> --- repeating group
    <my:C_Doc/> --- maps to Solutions (S_ID)
    </my:C_Docs>
    </my:C_SolutionDocs>
    <my:C_Features>
    <my:C_Feature> --- repeating group
    <my:C_Feat/>
    </my:C_Feature>
    </my:C_Features>
    </my:C_Status>
    </my:C_Statuses>

    Solutions looks like this:

    <S_Solutions>
    <S_Solution> --- repeating group
    <S_ID/>
    <S_Title/>
    <S_Link/>
    <S_Modified/>
    <S_Status/> --- general status from SP (Draft/Ready for review/Final)
    <S_Editor/>
    <S_Owner/>
    <S_FeatureRefs>
    <S_Refs> --- repeating group
    <S_Relf>
    </S_Refs>
    </S_FeatureRefs>
    </S_Solution>
    <S_Solutions>

    If it would be easier i could send you a copy of my XSN, it may be easier to see what i am trying to do.

    Lee A Newson
  • 10-25-2004 02:18 PM In reply to

    Re: repeating section as master in master/detail form?

    That would be helpful. I'm still having trouble following it from this thread alone.

    Greg Collins [InfoPath MVP]
  • 10-26-2004 02:42 AM In reply to

    • Lee
    • Not Ranked
    • Joined on 07-23-2004
    • United Kingdom
    • Posts 18

    Re: repeating section as master in master/detail form?

    Gregg,

    I cannot figure out how to attach a file on here so i have sent a post to the MS InfoPath newsgroup with the file attached. (The subject is "For Gregg Collins [MVP]")

    FYI - in the datasource

    F_ID (S_Ref holds references to one or more Features (F_ID)
    *_Doc holds references to one or more Solutions (S_ID)
    *_Feat holds references to one or more Features (F_ID)

    (* = C, D, I, R)

    If a Status, Decision, Issue or risk has data in the *_Doc field and the *_Feat field is blank then these are items against solutions only. If they have data in the *_Feat field then they are associated with a feature(s).

    I have views in the form that ustilise the master/detail control so that i can make my way through the data by either solutions or features, one at a time. What i am now trying to achieve is a couple of print views that show corresponding data for all solutions, and likewise all features.

    I am basically trying to get the same functionality of a master/detail control, but without the necessity to click on a table row for the further information to be shown. I have looked at the xsl for the view with a master/detail control, however i am unsure as to how to modify it to do this.

    Lee

    Lee A Newson
  • 10-26-2004 06:06 PM In reply to

    Re: repeating section as master in master/detail form?

    Sorry... I was assuming you would have just emailed me the template.

    Okay, so I have it. Now I need to know a few things...

    1) Which view am I looking at?
    2) What section/etc. of that view am I looking at?
    3) Do I need a sample form.xml file to work with? Or should I just populate it myself -- if so populate what with what?
    4) What part exactly, isn't working?
    5) Let's start there...

    Greg Collins [InfoPath MVP]
  • 10-27-2004 12:53 PM In reply to

    Re: repeating section as master in master/detail form?

    I got the .xml file and have evaluated the template.

    First of all, using a master/detail in a print view makes no sense. That is an interactive control. And since you had only the master table and no detail section, it made even less sense. You should have only been using repeating sections for this.

    Secondly, because of the structure of your schema, I'm not sure you can do what you want to do from within InfoPath. You can accomplish this for a single level, such as Solution to Feature... but not if you need to go more levels.

    If your structure was hierarchical such as:
    Solutions
    Solution
    Features
    Feature
    Others
    Other
    ...
    Feature
    Others
    Other
    Solution
    ...

    Then you would have no problem doing what you are trying to do. Your schema is structured more like a database. I'm assuming there was a purpose behind that.

    Because of this, if you want to have more than one level (which it looks like you were trying to do, then the best thing would be to create your print view in XSL by hand, and then include it in the form as a Word Print View (See the Views task pane).

    I hope this has been helpful.

    Greg Collins [InfoPath MVP]
  • 10-28-2004 07:11 AM In reply to

    • Lee
    • Not Ranked
    • Joined on 07-23-2004
    • United Kingdom
    • Posts 18

    Re: repeating section as master in master/detail form?

    Hi Greg,

    Thanks for your help with this problem. Due to the file you sent me and the use of the current() function, i have managed to manipulate the xsl for the view to get what i want, this was helped when i tried 'current()/S_ID'. when i tried that and it worked a lot of the people around me stopped what they were doing and looked rather strangely at me... maybe next time i wont shout 'bulls-eye' or anything else for that matter :).

    I would put a description of my solution on here, but all i can really say is that current() was my saviour in the end. If it would be of any help i can send you a form that holds my data source and the view that now works so that you can see how i did it, i dont know if it may be any help in the future for a dev nugget or some such. Let me know if you would like it.

    Thanks again for your help, it has been very much appreciated.


    Regards

    Lee Newson.

    Lee A Newson
  • 10-28-2004 09:01 AM In reply to

    Re: repeating section as master in master/detail form?

    Lee,

    I'm glad I was able to help. Your form was very complex and I had to create a simplified model in order to figure out what to do. I really wasn't sure if you'd be able to accomplish your goal using the designer. I'm happy you were able to get it fixed!

    Yes, the XSL current() function is extremely helpful in many areas. I plan on devoting some bits to its usage at some point.

    I won't require a copy of the fixed form -- just glad I could help!

    Greg Collins [InfoPath MVP]
  • 07-03-2007 03:06 PM In reply to

    Re: repeating section as master in master/detail form?

    Greg, I am trying to print one detail view from a master / detail form.  I have created a separate view for the print view but when I select a different record in the master table the print view does not change with the corresponding selection.  No matter what changes I make and filters I apply to my print view it still wants to print all the records in the master table starting with the first one and will only display the first one in the print view. 

    It seems like the master detail control is very usefull but I would think it would be a very common thing to want to just print one of the detail views that you select from a master table of hundreds.  What am I missing?  Can you help?

  • 07-06-2007 02:27 PM In reply to

    Re: repeating section as master in master/detail form?

    The Master/Detail control does not work across views. How people make it work is to add a button to the master table in the first view, and that button sets some field somewhere with a value specific to that row of the master table, and then switches views. The second view is a repeating section based off the same table, but is filtered to only show the row that matches that field value which was set when the button was clicked.

    The special filter field value can be the row position, or some key value that is specific to that row of data.

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