Copy to SharePointList in a repeating section using QRule - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Copy to SharePointList in a repeating section using QRule

Last post 02-22-2018 07:42 AM by Hilary Stoupa. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 01-14-2018 12:20 AM

    Copy to SharePointList in a repeating section using QRule

     Hello,

     can we use the Copy to SharePointList with validation? Example it will only write/update to the list if the status is Submitted 

     

    Thanks 

  • 01-15-2018 07:30 AM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

    The submit to SharePoint List command will fail if the form doesn't pass validation. However, I think you may be asking instead if you can conditionally submit items? You can add an XPath filter to the repeating group in the mapping file to conditionally submit some of the items.
    Hilary Stoupa

  • 01-15-2018 03:13 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

     Hello, Thank you

     Example I have a repeating section for Logs, in first submission I created 2 entries - then got approved. So status for these 2 entries/lines are Approved

      

     I wanted to add another log, how can I add the filter to say just update this line (to Submitted status)

     My experience was, it updates all the entries back to what the status of the latest entry which should not be the case since the initial 2 entries were approved already.

     Also I don't want set of buttons per section (Submit, Verify, Decline), if I can make this work using 1 button for the entire form using the filter.

    Hope it makes sense to you :) Thank you

  • 01-15-2018 04:53 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

    I'm having a little trouble understanding, I'm sorry. I think you saying you want to update just some of the repeating rows in your table with a button outside of your table? If so, SetValue command can do that - then you can continue to submit all rows to SharePoint.
    Hilary Stoupa

  • 01-15-2018 05:13 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

     Hello, I wanted to share the actual Form, how can I attach? :)

  • 01-15-2018 06:06 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

    Under the Options tab in a reply. :)
    Hilary Stoupa

  • 01-15-2018 06:09 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

     Apologies to confuse you. How can I update a certain rows of the repeating section using the outside button? how can I add the filter

    ex. only items 1 & 2 (out of 5) need to be updated then submit to sharepoint list  

  • 01-15-2018 06:23 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

     Thank you - attached :)

     Goal is to get rid of the buttons within the Activity Log section and just utilize the outside buttons (Submit, Verify, Decline)

    Scenario

    First submission I have 2 activity logs with the other form details (but I wanted to focus more on activity logs section as it needs to be displayed in dashboard via the sharepoint list being created) - then I got them approved

    I access the Forrm again and tried to edit and re-submit: I added additional activity log

    The initial 2 activity logs should have Approved status (as these have been approved already in the first round of submission) and the recent activity log being added should have a Submitted status

    How can I incorporate the Filter in the outside buttons to just copy/update only the 3rd activity log using the Command? 

    Thank you. 

      

  • 01-16-2018 08:15 AM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

    So - silly question.... but if there are two log items approved and another new item added, if the user clicks an "approve" button not associated with individual items, how do they know what they have approved? Is it just generally accepted it would apply to all that are not currently approved? Or if two are approved and one is submitted, and I now click a "decline" button not associated with individual items, how would I know that I'm only applying that action to the submitted item? What if my intent is to now decline all the items? How would I do that?

    However, to answer your actual question - if the Log this Activity button was outside of the section, I'd use a qRules command to just set the rows with a blank status like this:

    SetValue /xpath=/my:myFields/my:ActivityLog/my:group11[my:ALStatus = ""]/my:ALStatus /value=Submitted

    I'd probably set the other fields first, so I could leverage the blank status as an indicator of what to set:

     concat("SetValue /xpath=/my:myFields/my:ActivityLog/my:group11[my:ALStatus = '']/my:ALSubmitDate /value=", today())

    Then, it doesn't matter if all the items resubmit to the list, because the existing items won't have been changed.

    Hilary Stoupa

  • 02-21-2018 07:35 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

     Thank you so much for this.

     How can I set a Date field to date today() - can I have a sample SetValue rule (ALSubmitDate) ? 

  • 02-21-2018 09:35 PM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

     How about setting a repeating section field with an outside section field's value - how can I do that, what command shall I use? 

  • 02-22-2018 07:42 AM In reply to

    Re: Copy to SharePointList in a repeating section using QRule

    So - I gave you a sample with "today" - you can see in the concat statement, today is outside the quotes. Put the qRules execution history on your form and you'll see the actual command that was executed with the value of today's date. The same approach works for any field - instead of the today function, you can use the field selector to pick the field with the value you want. All that matters to qRules is the actual string value passed into the Command node.
    Hilary Stoupa

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