Refering to an individual item in a Repeating Section - InfoPath Dev
in

InfoPath Dev

Refering to an individual item in a Repeating Section

Last post 04-22-2009 10:52 PM by swathip. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-21-2009 04:09 PM

    • Anthos
    • Not Ranked
    • Joined on 04-21-2009
    • Posts 5

    Refering to an individual item in a Repeating Section

    Firstly,

    I would like to apologise if this has already been asked I have spent the night reading through other similar posts, but have not found a similar use case to what I am trying to achieve. (Or perhaps it is just my noobness showing)

     I have a repeating section that asks for the following information
    - Drive Letter (C:\ D:\ etc...) and it also asks for Drive Capacity and Drive Used. (it then calculates % of drive use)

     Further down the form, I have another section where I use this repeating section to populate a drop down list
    What I want to do, is when someone selects D:\ from that list, pull in the relative % of used space, currently this is only working with the first record.

    Can this be done without code, as I would really like this form to be webservices based.

     Thank you for your time.
    Regards,
    Anthony

  • 04-22-2009 10:04 PM In reply to

    Re: Refering to an individual item in a Repeating Section

    Hi,

    Add the following expression as set condition to the drop down list.

    current() = ../../../my:group1/my:group2/my:field1

    and the following expression to set the relative % of used space.

    ../../../my:group1/my:group2[my:field1 = current()]/my:field2

    Here

    group2 is the first repeating section,

    field1 is the Drive Used       

    field2 is the Drive Capacity

     

    and the first repeating section xpath is /my:myFields/my:group1/my:group2 and

    second repeating section is /my:myFields/my:group3/my:group4

    Swathip
    www.ggktech.com
  • 04-22-2009 10:31 PM In reply to

    • Anthos
    • Not Ranked
    • Joined on 04-21-2009
    • Posts 5

    Re: Refering to an individual item in a Repeating Section

    Thank you, That was a perfect explanation,

    I did have to modify it a little, however, I think that is due to my lack of understanding of how to do good Infopath forms more then anything.

    If you like I will post up the Action Rule I used, although, it's generally only helpful if you know the structure of the Infopath form.

  • 04-22-2009 10:42 PM In reply to

    Re: Refering to an individual item in a Repeating Section

    ok. Post the structure of  schema that you are using for the repeating sections. or else send the xpaths for the first repeating table and second repeating table fields.
    Swathip
    www.ggktech.com
  • 04-22-2009 10:44 PM In reply to

    • Anthos
    • Not Ranked
    • Joined on 04-21-2009
    • Posts 5

    Re: Refering to an individual item in a Repeating Section

    This was the Xpath that I used and it worked perfectly, thank you.

    /my:checkList/my:grp_ServerCheckList/my:grp_Server/my:grp_HDDProperties/my:grp_HDDCapacity[my:HDDDriveLetter = current()]/my:hdd_FreeSpace

  • 04-22-2009 10:52 PM In reply to

    Re: Refering to an individual item in a Repeating Section

    Its good to hear that you got it.

    Swathip
    www.ggktech.com
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.