Accessing a specific row for repeating table. - InfoPath Dev
in

InfoPath Dev

Accessing a specific row for repeating table.

Last post 06-24-2011 07:58 AM by Jimmy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-24-2011 06:42 AM

    • Shyam23
    • Not Ranked
      Male
    • Joined on 06-10-2011
    • Atlanta
    • Posts 19

    Accessing a specific row for repeating table.

    Hi,

     I know this is a very common question. But I couldn't find answers in this forum. I need to change a particular field(say 2nd row, 3 rd column) of a repeating table based on the value selected in dropdowns (which is outside the table). Right now when I insert a new row, the previous row's values are copied. Somebody please help me out with it.

    Thanks,

    Shyam

  • 06-24-2011 06:54 AM In reply to

    Re: Accessing a specific row for repeating table.

    Unfortuately, this isn't available with InfoPath's built-in functionality, and we added the SetValue command to qRules to address this very problem.  Please give it a try.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-24-2011 07:03 AM In reply to

    • Shyam23
    • Not Ranked
      Male
    • Joined on 06-10-2011
    • Atlanta
    • Posts 19

    Re: Accessing a specific row for repeating table.

     Thanks Jimmy. Will give it a try.

  • 06-24-2011 07:17 AM In reply to

    • Shyam23
    • Not Ranked
      Male
    • Joined on 06-10-2011
    • Atlanta
    • Posts 19

    Re: Accessing a specific row for repeating table.

    I just downloaded the Q rules and I injected it to the form. I am not sure now how to use qrules to set the value of a field in repeating table.
  • 06-24-2011 07:58 AM In reply to

    Re: Accessing a specific row for repeating table.

    The quick start guide should give you a good rundown, but basically, you use a rule to set a command to the Command field in the QdabraRules data source, and it runs that command.  For SetValue, the command format would be:

    SetValue /xpath=xpath of the field to modify /value=value to set to the field

    You can use a concat formula to dynamically insert values into the command, so to set a field on the third row of a repeating group to the value of a field called address, you could use a formula like this:

    concat('SetValue /xpath=/my:myFields/my:group1/my:group2[3]/my:addressField /value=', address)

    Likewise, you could concat in another field value to dynamically change which row is modified:

    concat('SetValue /xpath=/my:myFields/my:group1/my:group2[', rowToModify, ']/my:addressField /value=' address)

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.