SubmitToSharePointList with filter? - InfoPath Dev
in

InfoPath Dev

SubmitToSharePointList with filter?

Last post 08-10-2011 10:43 AM by shniggens. 21 replies.
Page 1 of 2 (22 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-25-2011 08:27 AM

    SubmitToSharePointList with filter?

    Is it possible to filter the items that this command submits?  IE - if a repeating table row's field's value = zero, I don't want it submitted to the list.  I know I can delete the row first, but I don't want to go that route yet.  I still need the row in the form.

  • 07-25-2011 09:50 AM In reply to

    Re: SubmitToSharePointList with filter?

    You sure can. You'll need to manually modify your mapping file (or use a rule to set the value). The node you want to change is the RepeatingGroup node. It would be something like /my:myFields/my:group1/my:group2 and you would change it to /my:myFields/my:group1/my:group2 [my:field1 != 0].

    However, this is something that was just added for v3.3, so it hasn't been released yet - send me an email if you want to beta test this feature.

    Hilary Stoupa

  • 07-25-2011 10:05 AM In reply to

    Re: SubmitToSharePointList with filter?

    Sure, I would love test it. 

  • 07-26-2011 09:38 AM In reply to

    Re: SubmitToSharePointList with filter?

    It works great!  What a nice feature.  Thanks!

  • 08-05-2011 03:58 PM In reply to

    Re: SubmitToSharePointList with filter?

    Can I filter on 2 conditions?  What would the appropriate syntax be, just an "and" in between the conditions?

  • 08-05-2011 06:48 PM In reply to

    Re: SubmitToSharePointList with filter?

    Yup, just your standard XPath filters "my:field1 = 'a' and my:field2 = 'b'" or "my:field1 = 'a' or my:field2 = 'b'"

    Hilary Stoupa

  • 08-06-2011 08:09 AM In reply to

    Re: SubmitToSharePointList with filter?

    When does SubmitToSharePointList assign the ID?  I was messing around with not submitting items if the ID is blank, but it looks like the ID is assigned to late in the process, so it wouldn't submit anything at all. 

  • 08-06-2011 08:15 AM In reply to

    Re: SubmitToSharePointList with filter?

    Basically to try to get around the insert workaround to copy table (I just don't want to do the insert, there's too many fields in my table to populate), I am trying to filter my submit in such a manner that it does not submit items that = 0, unless it exists in the list already.  Therefor I tried to filter this way -

     [my:Total != 0 and my:PullID != '']

     

    I'm looking for an alternative to RefreshSharePointListItems command. 

     

     

  • 08-07-2011 12:24 AM In reply to

    Re: SubmitToSharePointList with filter?

    Are you using 2010? Copy rule will help you with the Insert.
    Patrick Halstead
    Project Manager at Qdabra
  • 08-07-2011 02:46 PM In reply to

    Re: SubmitToSharePointList with filter?

    Yes, but is there a workaround that you can think of?  Is the ID set after the SubmitToSP command is run?

  • 08-08-2011 12:12 PM In reply to

    Re: SubmitToSharePointList with filter?

    ID is set after the SubmitToSharePointList command is run, as long as the /id parameter is provided.

    The ID is the list id from the list you have submitted to - that value will already be present in your list.

    Hilary Stoupa

  • 08-08-2011 01:06 PM In reply to

    Re: SubmitToSharePointList with filter?

    So shouldn't this work, if I am submitting a value of not zero the first time it is submitted ?

     [my:Total != 0 and my:PullID != '']

    Because it is not working.  It won't submit anything. 

    I figured I could do it this way, because when an item is edited, and possibly zeroed out, it would still submit because the ID would exist.  Since it was already submitted to a list earlier. 

  • 08-08-2011 04:27 PM In reply to

    Re: SubmitToSharePointList with filter?

    I don't know what PullId is. Is this the field you are putting the list id into? It will get populated after a successful submit. So, if you have a new list item, and you intend to submit it, using this XPath would exclude new items, they wouldn't have a PullId.

    Hilary Stoupa

  • 08-08-2011 04:40 PM In reply to

    Re: SubmitToSharePointList with filter?

    OK, I thought it would exclude items with a total of 0, and that don't have an existing list ID.  Both conditions together for one row of a repeating table.  And yes, the PullID the ID I'm using for the Submit. 

  • 08-08-2011 04:45 PM In reply to

    Re: SubmitToSharePointList with filter?

    Your filter will submit anything that has a total not equal to zero, and a pull id not equal to blank.

    Sounds like you are saying you want:

    [my:Total != 0 and my:PullID = '']

    So that you submit anything that has not been submitted (i.e., pull id is equal to blank) but has a total that is not equal to zero.

    Hilary Stoupa

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