qRules - copy complex repeating data - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

qRules - copy complex repeating data

Last post 02-01-2016 08:01 AM by Hilary Stoupa. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 01-13-2016 04:25 AM

    qRules - copy complex repeating data

    Hi, I have been trying to copy your method for the above.

    I seem to be hitting a wall however when I come to the "Insert" command (Delete works fine).

    This is what I have:

    concat("Insert /parent=/my:myFields/my:BalanceScoreCardTable /child=my:BalanceScoreCardTable/my:BalanceScoreCardItem /count=", count(SharePointListItem_RW))

    however it is throwing up an error saying "failed to select the source node"

    I have hopefully attached a copy of my form for your reference.

    Any assistance you can provide would be greatly appreciated.

    Thanks

    Kirstie

     

     

  • 01-13-2016 07:50 AM In reply to

    Re: qRules - copy complex repeating data

    Hi - it is probably your schema design. We need the repeating group to be the last group in the parent group, which means in the BalanceScoreCardTable you need to move MYID2 up so the repeating group is last. Can you try that?
    Hilary Stoupa

  • 01-13-2016 07:52 AM In reply to

    Re: qRules - copy complex repeating data

    Whoops, also this: /child=my:BalanceScoreCardTable/my:BalanceScoreCardItem should be: /child=my:BalanceScoreCardItem
    Hilary Stoupa

  • 01-13-2016 08:04 AM In reply to

    Re: qRules - copy complex repeating data

    Thank you so much Hilary this has worked a treat!.

    I would never of thought to try moving the ID field.

    Success at last.

    Thanks Again

  • 01-14-2016 05:54 AM In reply to

    Hi Hilary,

    I have moved onto the next stage and now I am unable to get the set fields values to work.

    I have reattached my form for your reference.

    I have added the rules in but when I click copy only the blank table is created. 

    Any help you are able to provide would be fab.

    Thanks :)

  • 01-14-2016 06:50 AM In reply to

    Quick update!

    I have figured out the error of my ways and inserted an XML document to complete the count action. im now able to populate data! hurray!

    However!  if the secondary data source has 3 items (filtered on employee name, some names have more) it will just pick the first 3 items from the SharePoint list and ignores the name filter (secondary data source list) instead of selecting the correct ones based on the employee name as filtered in the secondary data source on form opening.

    Hope I have explained that right.

     

     

  • 01-14-2016 07:50 AM In reply to

    Re: qRules - copy complex repeating data

    You are so close to having this! So, the only thing you are missing is you need to add a filter to your rule that sets the values to match the filter you used to get your count. You want, for example, the third item with the same name, not just the third item. The full XPath for the formula for the rule setting Person_Responsible, for example, would be: xdXDocument:GetDOM("Business Balance Scorecard Info Collection Sheet")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:Title = xdXDocument:get-DOM()/my:myFields/my:Employee_Name][number(xdXDocument:GetDOM("ViewOptions")/Util/fields/Count)]/d:Title
    Hilary Stoupa

  • 01-14-2016 08:22 AM In reply to

    Re: qRules - copy complex repeating data

    WOO HOO!

    Thank You SO Much for your help with this Hilary!

    You have no idea how much this has made my day!

  • 02-01-2016 05:07 AM In reply to

    Re: qRules - copy complex repeating data

     Hi Hilary,

     Is there any reason why the copy button wouldn't be working properly when the list is published and opened on a web part page?

     When I click the copy button, nothing happens, if I then click insert lines on the table below it inserts them all as required along with the additional line from the "insert line" action.

    Do you know if there would be anything likely to prevent the copy button from working in the web part? it works fine in InfoPath.

    Thanks

    Kirstie

  • 02-01-2016 08:01 AM In reply to

    Re: qRules - copy complex repeating data

     Hi, Kirstie - this sounds like a postback issue. On your button, in design mode in InfoPath, right click the button and look under the Browser tab. Set postback to always and republish. Let me know if this doesn't fix it.

    Hilary Stoupa

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