Infopath and Repeateing Table Help - InfoPath Dev
in

InfoPath Dev

Infopath and Repeateing Table Help

Last post 02-22-2019 09:09 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-22-2019 08:07 AM

    Infopath and Repeateing Table Help

    I have a repeating table within my InfoPath form, I have it setup so this table when it loads auto numbers my tables rows 1-254 (for my IP Address ranges) with in this table and row there are other fields such as the field Host Name. Outside my repeating table I have a text field called HostInUse. Here is what I want to happen, when the form loads I would like a formula or rule to run to: If Host Name is not blank, then take the IP address associated with that row and copy it into the HostInUse ready only text box. So, basically when the network admins open this form they can easily look at this box to see that the IP ranges 1, 34, 55 and 250 are in use meaning that all other ranges are open to be assigned. My problem I am having is since it’s a repeating table it only wants to display the first row it comes to that is true so in this case HostInUse would only show the number 1 in the box, not 34, 55 and 250. Can this be done?
  • 02-22-2019 08:15 AM In reply to

    Re: Infopath and Repeateing Table Help

    Yes - you will need to use what is called a double eval formula to show all of them. If you search the forum for double eval, you should find some info, or if you attach your form under the options tab in a reply, I can help you with the formula. Here's a link that explains the concept: http://tinkerersjournal.blogspot.com/2013/01/codeless-double-eval.html
    Hilary Stoupa

  • 02-22-2019 08:21 AM In reply to

    Re: Infopath and Repeateing Table Help

    Hello, Thank you so much for getting back to me so quickly. I have attached my form to this message. When I use the formula substring-after(eval(eval(IP, 'substring-after(concat(. = "", ",", .), "false")'), ".."), ",") it will populate all the IP #s and all I want to post is the the IP #s based off the if the HostName has a value or data. Thanks again for all your help. Wendy
  • 02-22-2019 08:29 AM In reply to

    Re: Infopath and Repeateing Table Help

    Ah-ha! So you have the right idea - you just need an XPath filter on the "IP" field part of your formula. In your form load rules, you tried to do this with a condition, but that won't evaluate on a per row basis. Instead, you need a filter on the eval formula itself: substring-after(eval(eval(IP[Host_Name != ""], 'substring-after(concat(. = "", ",", .), "false")'), ".."), ",") - give the attached template a try. Save it locally, right click and select design to open in design mode & for previewing.
    Hilary Stoupa

  • 02-22-2019 08:53 AM In reply to

    Re: Infopath and Repeateing Table Help

    YOU ARE AWESOME!!! THANK YOU SO MUCH!! I love this site.....
  • 02-22-2019 09:09 AM In reply to

    Re: Infopath and Repeateing Table Help

    Well you did most of the work - you just didn't know where to put the filter you needed. Now you do! :) Have a great weekend!
    Hilary Stoupa

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