Repeating Employee Table - InfoPath Dev
in

InfoPath Dev

Repeating Employee Table

Last post 10-24-2013 09:25 AM by kameron.berget. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-24-2013 06:16 AM

    Repeating Employee Table

    This is my setup. I have a SharePoint list called Employee Data. My form has a repeating table for entering time entry type data. The first column in the repeating table is a drop down that is being fed from the employee data list. Up select of an employee I have a rule that is setting the EmployeeID and Class (Columns in Employee Data list). This rule works for the first row but subsequent rows don't set the values correctly. What is the trick to getting this to work? My rule goes something like: EmployeeID[Title = Employee] LaborClass[Title = Employee] I have done this before but something seems off about this. I hate to set the post back for each row since I will possibly have 100's of rows.
    Filed under: ,
  • 10-24-2013 08:36 AM In reply to

    Re: Repeating Employee Table

     Hi - when you say don't set the values correctly, what do you mean? Are the values not getting set at all? Are they getting set to something unexpected?

    Hilary Stoupa

  • 10-24-2013 08:41 AM In reply to

    Re: Repeating Employee Table

    The first row is set correctly but the subsequent rows are set incorrectly. I am using a filter but it still is incorrect. I am also displaying the data connection so I can verify that everything is ok and it looks good.
  • 10-24-2013 08:46 AM In reply to

    Re: Repeating Employee Table

     When you say "set incorrectly" could you please tell me what "incorrectly" means here? Is the value being set to anything? To the wrong value? The first value? Some random value? :)

    Hilary Stoupa

  • 10-24-2013 08:58 AM In reply to

    Re: Repeating Employee Table

    For testing I only have two values in the SharePoint list. Everything after the first row is set to the value of the first row. Employee, EmployeeID, Class John Doe, 12345, 1 Jane Doe, 54321, 5 The form: [Row 1] John Doe --> Rule Sets EmployeeID:12345 and Class:1 [Row 2] Jane Doe --> Rule Sets EmployeeID:12345 and Class:1 Subsequent rows take the values from the first row.
  • 10-24-2013 09:06 AM In reply to

    Re: Repeating Employee Table

     Okay - if things are getting set to the value of the first row, something is off with your filter. Can you paste in the full XPath of the expression you are using?

    Hilary Stoupa

  • 10-24-2013 09:10 AM In reply to

    Re: Repeating Employee Table

    When the Employee is selected from the drop down that sets the two values. Condition: EmployeeName != "". Set EmployeeID: xdXDocument:GetDOM("Employee Records")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:EmployeeID[../d:Title = xdXDocument:get-DOM()/my:myFields/my:Time/my:Employee], Set Class:xdXDocument:GetDOM("Employee Records")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:LaborClass[../d:Title = xdXDocument:get-DOM()/my:myFields/my:Time/my:Employee] The Employee table uses the Title field for the name.
  • 10-24-2013 09:19 AM In reply to

    Re: Repeating Employee Table

     Your problem is here:

    xdXDocument:get-DOM()/my:myFields/my:Time/my:Employee

    That will always return the first Employee.

    Since this rule is on Employee, you should be able to use current() in place of that.

    xdXDocument:GetDOM("Employee Records")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:EmployeeID[../d:Title = current()]

    Hilary Stoupa

  • 10-24-2013 09:25 AM In reply to

    Re: Repeating Employee Table

    That did it! I have done this several times and needed another pair of eyes. You rock. Thanks again!
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.