Repeating Table to show or hide a section - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Table to show or hide a section

Last post 04-19-2011 03:22 AM by B1rds. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-25-2011 06:37 AM

    • B1rds
    • Not Ranked
    • Joined on 03-24-2011
    • Posts 10

    Repeating Table to show or hide a section

    Hi I am new to inforpath and have been working away at it for a couple of weeks now, I am down to the last section where I have a repeating table with checkboxes that will hide/show a seperate form, the issue I have is that while I can use condtional formatting etc to hide/show this seperate section the second I repeat the checkboxes it negates the first line in the the table. I have tried to use Master/detail to no avail and now have looked to do this by conditional formatting via the expression as follows

    "Not(/my:myfields/my:method_statement/my:steps/my:step/my:associated_Harzards[Fire1 = 'true']"

     However I can not seem to get it to work, even if I check the check box on the initial table it still does not work, I am at a loss......

  • 03-28-2011 07:18 AM In reply to

    Re: Repeating Table to show or hide a section

    Hi B1rds,

    You need to use the current() function to do this and not an absolute xpath. Search this forum for "xpath current" to find examples.

    Patrick Halstead
    Project Manager at Qdabra
  • 03-28-2011 08:02 AM In reply to

    • B1rds
    • Not Ranked
    • Joined on 03-24-2011
    • Posts 10

    Re: Repeating Table to show or hide a section

    Thanks Patrick, will do that and appreicate your help

     

    Mike

     

  • 03-29-2011 03:12 AM In reply to

    • B1rds
    • Not Ranked
    • Joined on 03-24-2011
    • Posts 10

    Re: Repeating Table to show or hide a section

    Patrick Halstead:

    Hi B1rds,

    You need to use the current() function to do this and not an absolute xpath. Search this forum for "xpath current" to find examples.

     

    Hi Patrick Looked into the Current() function, the problem I face is that this will only look up the current row, I want to be able to look back at all rows and pick up if the node was selected in any row, then if it is displayed in any one or 2 rows it will display the hidden section. This was what I was trying to do with the original expression that it would refer back to all entries for that node.

    I have come up with a work around where if the node is selected it adds +1 to a hidden text box and then I use this for hide/show the section. I know this is rough and ready but it works, but I am still interested in getting a more robust solution, so any other help is appreciated. 

  • 04-14-2011 04:39 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: Repeating Table to show or hide a section


    Check-box field name: field3
    Table/Group name: tabl1

    Conditional formatting on the section to hide (when no check-boxes are checked.)

    count(my:table1/my:field3[. = "true"]) = 0

    Whenever a check box is ticked, this logic/formula will return false and section will appear.

  • 04-19-2011 03:22 AM In reply to

    • B1rds
    • Not Ranked
    • Joined on 03-24-2011
    • Posts 10

    Re: Repeating Table to show or hide a section

    Thanks Skarn, that worked a treat much easier solution than my earlier attempt

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