Repeating Tables and Look-Up Fields - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Tables and Look-Up Fields

Last post 05-01-2015 09:37 AM by Hilary Stoupa. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 04-29-2015 01:51 PM

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Repeating Tables and Look-Up Fields

    • InfoPath 2010
    • SharePoint 2010 Lists
    • No qRules yet, but will have

    Scenario:

    • Two Lists, where List 2 has a lookup field from List 1.

    What I WANT to do, but can't figure out:

    1. Repeating table of List 2 that will show the value of the lookup from List 1 in a field instead of the ID.
    2. Repeating table of List 2 inside a repeating table of List 1, where it will show an entry of List 1 and then the entries from List 2 that tie (by the lookup) to List 1.

    Clear as mud?  I figure I might need to use some XPathy thing, but I can't for the life of me figure it out!  =/

    Any help would be GREATLY appreciated!

  • 05-01-2015 06:22 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Repeating Tables and Look-Up Fields

    Anyone?
  • 05-01-2015 07:20 AM In reply to

    Re: Repeating Tables and Look-Up Fields

    Item 1 is pretty easy - just use a calculated value in the column where the lookup value should go, and select the field in list one where the id matches the value of the id in list 2.

    Item 2 is pretty hard. Usually what I do is add a section that I can "show / hide" and then when the user "shows" the section, I query list 2 for just the items related to the item I'm currently showing. I may have time later today to put together a sample of this using XML data sources if that would be helpful?

    Hilary Stoupa

  • 05-01-2015 07:46 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Repeating Tables and Look-Up Fields

    Okay, I swear I tried what you said in #1 and it didn't work, but I redid it today and wa-la, it did! 

    As for Item 2, this is for a report and the user wants to see everything, and be able to print it.  =(  Some more details:

    List 1:  This is a list of "Goals."

    List 2:  This is a list of "Objectives" that tie to a "Goal."

    And, to make this even more difficult...

    List 3:  This is a list of "Departments" that tie to an "Objective."

    Report Columns:

    • Goal
    • Objectives
    • Departments

    There are more columns that are part of the "Objectives" list.

    Maybe I'm thinking through this wrong. I just want them to magically tie together nicely.  =)  Any suggestions on alternatives?

    THANKS!

  • 05-01-2015 07:57 AM In reply to

    Re: Repeating Tables and Look-Up Fields

    They will not magically tie together nicely.

    If you need to see all the List 2 details for each List 1 item at the same time, I think you'll have to create another 2ds using an XML file with the structure you need, then use qRules and a transform to populate it - you could probably also do something with other qRules commands, like Insert and maybe  CopyTable -  but it will likely take some experimentation.

    Hilary Stoupa

  • 05-01-2015 08:03 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Repeating Tables and Look-Up Fields

    Well, fudge.  Looks like it might be time to schedule my free hour of qRules support!  =)
  • 05-01-2015 08:08 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Repeating Tables and Look-Up Fields

    How about this? 

    I can get the information in the columns the way I want using the first scenario I gave you.  What I don't like is showing the same Goal twice. 

    Is there a way to have the Goal field show "blank" if the item above has the same goal?

  • 05-01-2015 08:13 AM In reply to

    Re: Repeating Tables and Look-Up Fields

    You can use conditional formatting that hides something if a preceding-sibling has the same value - Here are preceding-sibling samples: http://www.infopathdev.com/files/folders/examples/tags/preceding-sibling/default.aspx

    Hilary Stoupa

  • 05-01-2015 09:17 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Repeating Tables and Look-Up Fields

    AWESOME!  I got it to work!
  • 05-01-2015 09:37 AM In reply to

    Re: Repeating Tables and Look-Up Fields

    Good job!

    Hilary Stoupa

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