Delete from SharePoint list? - InfoPath Dev
in

InfoPath Dev

Delete from SharePoint list?

Last post 08-03-2011 11:16 AM by shniggens. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-31-2011 05:49 PM

    Delete from SharePoint list?

    In the qRules guide it indicates that you can add a dsname to delete from secondary data source.  Does this mean we can delete items in a SharePoint list?

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

    Re: Delete from SharePoint list?

    Yes. Have you read about the RefreshSharePointListItems command? For info, read this: http://www.infopathdev.com/files/folders/qrules/entry61475.aspx
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-01-2011 09:37 AM In reply to

    Re: Delete from SharePoint list?

    So I assume you can't run the Delete command to directly delete an item from a SP list?

    I will look into the Refresh command.  I haven't used that one yet. 

    I originally filtered my SubmitToSharePoint command to not submit my "order" field if it contained 0's.  I wasn't thinking that later on, users could zero out those values if they need to.  Well, then that item wouldn't get updated in the list.  This is basically an order form, where users go down the list, and enter the number of items they need ordered.  It's a large table that contains all the items that can be ordered.  I was trying to reduce the amount of items that get submitted to the back-end list.  The back end list really shouldn't display any items with an order amount of 0. 

    After the users submit it, a reviewer reviews it, then "Finalizes" it.  This submits the items to the backend list, and opens the form back up the user if they need to make any changes (which could include changing previously ordered items to "0"). 

    How would you approach this situation?

  • 08-01-2011 04:36 PM In reply to

    Re: Delete from SharePoint list?

    Here's what I'd do.

    I'd submit all items to the list. I'd use the Refresh command to keep items and list in synch - give limited permissions to the list if you think you'll have trouble there.

    I'd think through my logic a bit - can you define a time when the user should no longer be able to make changes to the order? To me - finalizing sounds like it means "Order is complete" - but it seems like that isn't the case here. I guess I'm thinking - give the user a checkbox or something to indicate that they are absolutely done making changes.... you should be able to then use the Delete command to remove any items that aren't going to be ordered. Since the items will have been submitted at one point, they'll have an ID from the SharePoint list. If you use the refresh commands, items deleted from your XML will get deleted from your list....

    So, that way, when the user is really really done making changes, the 0 qty items just get removed from the form and list.

    Hilary Stoupa

  • 08-01-2011 04:38 PM In reply to

    Re: Delete from SharePoint list?

    Oh, sorry, I forgot to answer your initial question:

    shniggens:
    So I assume you can't run the Delete command to directly delete an item from a SP list?

    The Delelete command deletes a node in a primary or secondary data connection in your form. It does not delete items from the source of your secondary data.

    Hilary Stoupa

  • 08-01-2011 04:47 PM In reply to

    Re: Delete from SharePoint list?

    10-4.

  • 08-03-2011 11:16 AM In reply to

    Re: Delete from SharePoint list?

    OK, here's an interesting question - 

     I'm currently filtering my submit on [my:Total != 0].  With RefreshSharePointListItems, can I also filter on the qRulesLastModified field as well?  So that only submit the item if [Total !=0] AND qRulesLastModified result field does not contain ID, or does not exist or something.  That way, only new items that = 0 in the total field are not submitted, but items that had previously been modified ARE submitted, even if they contain 0?  Does that make sense? 

     I really want to avoid deleting items from my XML.

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