Tie up Repeating table field with a non repeating table field - InfoPath Dev
in

InfoPath Dev

Tie up Repeating table field with a non repeating table field

Last post 11-25-2014 06:59 AM by Ravik. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-21-2014 09:08 AM

    • Ravik
    • Top 500 Contributor
      Male
    • Joined on 01-25-2013
    • Aberdeen(Scotland)
    • Posts 33

    Tie up Repeating table field with a non repeating table field

    Hi All, I have two dropdown fields, one in a repeating table and the other one is not. Currently, the logic is , if i pick a value from the repeating table drop down field, the value in the non repeating field should change on the basics of the value that is picked. Which works fine if there is only one repeating table, but if there is more than one repeating table, how can i get this working. I basically need to check that particular dropdown field which is in a repeating table and compare it with the same field which is present in all the other repeating table and then get the highest value and based on that the field from the non repeating table should change. Hope i have made it clear.. Any help would be greatly appreciated. Regards, Ravi
  • 11-24-2014 02:02 AM In reply to

    Re: Tie up Repeating table field with a non repeating table field

    Hi Ravi,

    I'm guessing that you may need to use the current() xpath function to reference the current row in the repeating table. If you are trying to set the target field based on a row in a repeating field, then you will have to use the current() function to select the correct value.

    But, I could be wrong. Can you provide more detail?

    Thanks!

    Patrick Halstead
    Project Manager at Qdabra
  • 11-25-2014 01:46 AM In reply to

    • Ravik
    • Top 500 Contributor
      Male
    • Joined on 01-25-2013
    • Aberdeen(Scotland)
    • Posts 33

    Re: Tie up Repeating table field with a non repeating table field

    Hi Patrick, Thanks for getting back. Please see my example below Non-repeating field Actual level which has L0, L1, L2, L3, L4, L5 as values where L5 being the maximum value. Field in the Repeating Table Type of Injury has L0 - Near Miss; L1 - First Aid Case; L2 - Medical Treatment Case or Restricted Work Case; L3 - Lost Time Injury; L4 - Fatality; L5 - Multiple Fatalities. My Current rule is if Type of Injury is Multiple Fatalities then the value in the Actual Level will change to L5 which is based on one repeating table If there is more than one repeating table for example Type of Injury in table 1 is Lost Time Injury Type of Injury in table 2 is Multiple Fatalities How can i get the value in the actual level to be L5 based on the maximum value chosen in the Type of Injury. Currently if i had more than one repeating table, the actual value is getting calculated based on the Type of Injury in the first table. Based on the above query, the value of the actual field is showing as L4 but actually it should be L5 because this is the maximum value. If Type of injury is table 1 is First Aid Case Type of injury in table 2 is Medical Treatment Case or Restricted Work Case Type of injury in table 3 is Lost Time Injury Actual level should be L4 When there is multiple table like the above example, how can i get the maximum value? Hope the above example makes sense than to my previous request. Regards, Ravi
  • 11-25-2014 06:18 AM In reply to

    Re: Tie up Repeating table field with a non repeating table field

    Hi Ravik,

    Thank you for the detailed explanation.

    I'm afraid I need to see the form template. Can you attach that?

    Thanks for your patience.

     

    Patrick Halstead
    Project Manager at Qdabra
  • 11-25-2014 06:59 AM In reply to

    • Ravik
    • Top 500 Contributor
      Male
    • Joined on 01-25-2013
    • Aberdeen(Scotland)
    • Posts 33

    Re: Tie up Repeating table field with a non repeating table field

    Hi Patrick, I should have done this in the first place. Please see the attached Xsn file. I have created this form based on my original form. The way the actual level should work is, its should look for the highest category if there is more than one Injury Category in the section and based on that i should get the validation error. Thanks for your time, Patrick. Regards, Ravi
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.