InfoPath 2013 web form print view with repeating table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

InfoPath 2013 web form print view with repeating table

Last post 08-24-2016 04:51 AM by 2shahid.hashmi@gmail.com. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 08-19-2016 06:56 AM

    InfoPath 2013 web form print view with repeating table

    *Environment: Using InfoPath 2013 (Web form) with SharePoint 2013

    *Requirement: Want to display only 10 items from repeating table per page with fixed header and footer for all the pages

    *Background: Getting child items as rows in repeating table using filtered External Data source Also users will be able to select specific/All items from the repeating table (using checkbox) to print

    *Solutions Tried: 1.Using position() function to set counter did not help (it says not supported) 2.Tried count(preceding-sibling::d:SharePointListItem_RW)+1 but it returns the position of item in respective external data source list not the position in the current filtered repeating table ( which is filtered based on checkbox=true)

    In case any alternate solution to achieve the clean printable InfoPath view with repeating table containing 200+ rows would be appreciated.

    Thanks in advance
    Shahid
  • 08-19-2016 08:16 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    I think you'll have to add the same XPath filter to your count of preceding sibling - I'm guessing the checkbox is bound to a field in d:SharePointListItem_RW? The filter will vary based on the name of the field bound to the checkbox & the selected value of the checkbox, but basically something like this: count(preceding-sibling::d:SharePointListItem_RW[d:CheckBoxField = 'true'])+1
    Hilary Stoupa

  • 08-20-2016 08:16 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    Thank you so much for reply Hilary!!

    I tried this on a calculated value inside repeating table and there was no error in formula on applying it but when I published the form it prompted me error saying "Binding a non-repeating control to repeating field or group is not supported in SharePoint list form", Am I missing something??

    I published form ignoring error but it is still showing the item position from the list.

    My formula looks something like this: - count(preceding-sibling::d:SharePointListItem_RW/d:Position[/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Chkbox = "true"]) + 1
    Shahid
  • 08-22-2016 08:12 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    1. The error on binding shouldn't be a problem unless your form has code - if you search on the error message, you'll find a blog post I wrote on this. Basically, it is an InfoPath bug - calc'd values should not be bound, but sometimes IP adds that to the view and it causes an issue
    2. Isn't your formula on the repeating table row itself to hide it? What is in the Position field?
    3. Your filter uses an absolute path back to the checkbox field - that isn't what I'd try. count(preceding-sibling::d:SharePointListItem_RW/d:Position[../d:Chkbox = "true"]) + 1 would use the relative path. But perhaps I don't understand what you are trying to do here. :)
    Hilary Stoupa

  • 08-23-2016 03:06 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    1. I have ignored the error as formula seems working.
    2. I was trying some solution hence added position field and converted it to calculated value (not required though)
    3. Thanks for relative path tip, My Objective is to provide users with the printable web form where only selected rows should be visible in table and the sequence should start from 1
     Currently the formula is returning the position of the item from the external content source. That means it is not returning the row position in the current table as per the visibility. (Not sure if I am missing something in formula or I am trying wrong approach)
     Going forward I want to limit the row count to 10/15 rows with page breaks and display repeating header-footer on every new page being printed
    I am thinking to try generating word document or PDF for printing if it is possible to carry and format repeating table in word.

    Please advise.
    Shahid
  • 08-23-2016 08:09 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    So- in your calculated value for the "position" field, you could add the XPath filter to only include items where the checkbox field is true.
    Hilary Stoupa

  • 08-23-2016 08:57 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    That is what I am trying to do but no luck so far...could you please elaborate little more .... this is haunting me for weeks .... :-(
    Is it really possible to get the position (starting from 1) of only filtered and visible items in case of repeating table created from external data source?
    Shahid
  • 08-23-2016 09:47 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    Can you attach a copy of your form under the Options tab in a reply? Yes, of course it is possible to get the position of items even with an external data source and XPath filters.
    Hilary Stoupa

  • 08-23-2016 02:29 PM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    Thanks Hilary,

    Please see attached form I am working on, It is my R&D copy, Here on PrintMultiple view is where I am trying to get the list of all employees selected by requester for print.
    Shahid
  • 08-23-2016 03:43 PM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    The rule on the repeating section that hides where checkbox is not = true should be correct. Rule 2 which has the condition 1 = 1 should be hiding all rows, so you should delete that. Can you give me a hint as to what the math in Rule 1 is supposed to be doing? Then I should be able to help you with that formula - sorry, I just don't understand it at all, so if you spell it out for me, it will help. :)
    Hilary Stoupa

  • 08-24-2016 04:38 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    My apologies Hilary... :-( I realized the position number is appearing correctly as I wanted, thanks for the suggestion to add [Checkbox] condition.
    Shahid
  • 08-24-2016 04:51 AM In reply to

    Re: InfoPath 2013 web form print view with repeating table

    The formula in Rule1 in one of the post on this forum (Attached) & was just trying attempts to modify it according to my need.
    The formula returns the result in a specific pattern, every ninth row will have same result for round (count(preceding-sibling::SharePointListItem_RW/Position[Chkbox = "true"]) / 10) and count(preceding-sibling::SharePointListItem_RW/Position[Chkbox = "true"]) / 10 . I was just trying to utilize the result in condition to manipulate the repeating table.
    I am still trying to implement the page brake logic on printable form limiting 10 rows each page with place holders if there are less than 10 items.
    Today I received final template to generate the printable form (attached) this is how output should be printed with incrementing number.
    Shahid
Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.