Repeating table linked to SP07 & adding a new row - InfoPath Dev
in

InfoPath Dev

Repeating table linked to SP07 & adding a new row

Last post 05-14-2012 11:14 AM by pmce10. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-09-2012 09:17 AM

    • pmce10
    • Not Ranked
    • Joined on 05-06-2012
    • Posts 3

    Repeating table linked to SP07 & adding a new row

    hello - I have an Infopath 2007 repeating table linked to a Sharepoint 2007 list (which is my data source).  My requirement is to select (dropdown) a 'Name', from SP list, and with that name selected, would subsequently auto-populate 'Job Title' in Infopath 2007.  This seems to work well for the first row within the repeating table, and sometimes the second row as well when I insert it, but when I insert a 3rd row on that repeating table, the data populated in 'Job title' (when I select a different name all together) comes from the first row of the repeating table. 

     Here are my conditions/actions on the 'Name' drop down box properties:

    Condition = 'Name' in Infopath = 'Fullname' in SP

    Actions = set a fields value

    field = 'Job title' (Infopath)

    value = @Job_Title_Role[@Full_Name = Name]

    Filter - Fullname = Name

     

    Is there any way that the end users can "Insert a new row" in the repeating table and the 'Name' selected will filter the SP data, or will I have to use Repeating Sections to get around this "issue"?

    P.S. I am a business oriented person with no technical background, so please take it easy on me...I can send the .xsn offline if need be.

  • 05-11-2012 05:18 PM In reply to

    Re: Repeating table linked to SP07 & adding a new row

    Hi - I think you don't need a condition at all. I'd remove that.

    The action looks correct, however - is "Name" the field from your main data source?

    If you open the formula editor for the "value" - there is a check box to edit XPath. Can you check that and paste the result in a reply?

    Hilary Stoupa

  • 05-14-2012 07:15 AM In reply to

    • pmce10
    • Not Ranked
    • Joined on 05-06-2012
    • Posts 3

    Re: Repeating table linked to SP07 & adding a new row

    Hi Hilary - thanks for the reply.  "Name" (or 'wdNoName1' as you see below)  is from the main data source, yes.  Here is the Xpath...

     

    xdXDocument:GetDOM("Compliance List")/dfs:myFields/dfs:dataFields/dfs:Compliance_List/@Job_Title_Role[../@Emp_Full_Name = xdXDocument:get-DOM()/my:Report/my:group1/my:group2/my:group3/my:group4/my:wdNoName1]

  • 05-14-2012 09:36 AM In reply to

    Re: Repeating table linked to SP07 & adding a new row

    So, here's the trouble:

    xdXDocument:get-DOM()/my:Report/my:group1/my:group2/my:group3/my:group4/my:wdNoName1

    This is always going to return the first instance of wdNoName1.

    If the rule is on the wdNoName1 field (I'm suspecting it is) you'd replace all that with the current() function.

    I'd try this:

    xdXDocument:GetDOM("Compliance List")/dfs:myFields/dfs:dataFields/dfs:Compliance_List/@Job_Title_Role[../@Emp_Full_Name = current()]

     

    Hilary Stoupa

  • 05-14-2012 11:14 AM In reply to

    • pmce10
    • Not Ranked
    • Joined on 05-06-2012
    • Posts 3

    Re: Repeating table linked to SP07 & adding a new row

    This is perfect...thank you so much for your help!! 

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