infopath set field value repeating section - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

infopath set field value repeating section

Last post 02-15-2016 07:42 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-09-2016 09:06 PM

    • Adam
    • Not Ranked
      Male
    • Joined on 12-07-2014
    • Posts 5

    infopath set field value repeating section

     

    Hello,

    I have a problem in my form (browser-enabled), I am trying to set the values to couple of fields in a repeating section.

     Let's say I've got 8 fields in that repeating section: box1, box2 etc.

    users can set value for those boxes as 0 or 1

    0 gives a bad smiley & 1 gives a happy one :)

    Now I added a button, that have a rule; if date not equal today() & if box1 equal to 0 then set box 1 value = 2

    The problem with my repeating section (multiple rows), that the button sets the value (2) for all box1 rows (even if some of them equal to 0 or 1).

    I checked a few posts about that issue & understand that there is a way in xpath to do it.

     But nothing works for me.

    I try to do something like that:

    I used the same rule as above & in set value I tried:

    SetValue() /xpath=/my:fields/my:table/my:box1 /value="2", )

    But I guess its wrong.

    Hope my describe understandable.

    Any help will be appreciated.

    thanks!

    Adam.

    sorry for posting again,no one answeared i fifn't know if its the right place for my post.

  • 02-12-2016 08:19 AM In reply to

    Re: infopath set field value repeating section

     Hey, Adam - I deleted the duplicate post. The SetValue approach you are using is actually from a third party tool (which my company created) called qRules. There is a way to do this without it, tho - I'll work up a sample here and attach it to another reply, okay?

    Hilary Stoupa

  • 02-12-2016 08:25 AM In reply to

    Re: infopath set field value repeating section

     Okay, right click the link in the post heading, and save the file locally. Right click the saved file and select Design to open in design mode. From there you can preview, enter repeating rows, and for at least one row, set date to today and Box 1 to 0. Then click the button. There is a helper field in the repeating group that has rules and conditions to set Box 1 - the button just sets that helper field.

    Hilary Stoupa

  • 02-13-2016 05:07 PM In reply to

    • Adam
    • Not Ranked
      Male
    • Joined on 12-07-2014
    • Posts 5

    Re: infopath set field value repeating section

    wow, so simple & so out-of the box
    you're the queen!!!
    thanks alot!
    much appreciate

  • 02-15-2016 07:42 AM In reply to

    Re: infopath set field value repeating section

    Glad that helped. With repeating data, you sometimes just need to add some helper fields to the schema.
    Hilary Stoupa

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