RefreshSharePointListItem - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

RefreshSharePointListItem

Last post 11-23-2011 11:16 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-23-2011 08:19 AM

    RefreshSharePointListItem

    Hello,

    I've been banging my head over this for several days now, so I'm turning to this form for help.

    I have an InfoPath form that has a repeating table with 6 fields:

    Approved: true/false
    Taken: true/false
    Start Date: Date (date)
    End Date: Date (date)
    Description: Text (string)
    Days: Whole Number (integer)
    I also add the id field and qRulesLastModified attribute so the RefreshSharePointListItem will work. Here is my situation.

    I am using "SubmitToSharePointList /submit=ShPListSubmit /mapping=mapping /id=my:id" to submit to my sharepoint list, and everything populates to the sharepoint list fine. However, when I use the following command to RefreshSharePointListItem (RefreshSharePointListItems /dsname=RefreshShP /id=my:id /mapping=mapping /mode=Update), the Start Date and End Date fields are in the format like "2011-11-21 11:59:59" and my form says the date is invalid... What am I doing wrong? If the dates can get submitted to the list fine, then why can't they refresh from the list. What am I missing?

    My mapping.xml file is attached.

    Regards,
    Brandon
  • 11-23-2011 08:27 AM In reply to

    Re: RefreshSharePointListItem

    You may not be missing anything at all - This could just have to do with the fact that SharePoint returns the data in a slightly different format and we aren't doing anything to handle for that in qRules.

    I'm wondering - could you set a rule on your Start and End date fields where the condition is if the date doesn't contain "T" then you get the substring before the space, and concatenate that with "T" and the substring after the space? Bit of a work around - but it may take care of the issue.

    Hilary Stoupa

  • 11-23-2011 08:40 AM In reply to

    Wow,

    I think that's the fastest forum response I've ever gotten! Thanks for getting back so quickly.

    There isn't an actual "T" in the date fields, so would your suggestion still work? I attached a picture of the dates after I refresh.

    Anyway, I'm not sure how I would write the syntax of your suggestion. Would you mind helping me out with the syntax? The field names are StartDate and EndDate.

    Thanks!

    Brandon


  • 11-23-2011 09:32 AM In reply to

    Re: RefreshSharePointListItem

    Hilary,

    I have another question. I've found a workaround for the date issue: I'm locking down the list to read only, so the date will never be modified from the list - problem solved.

    However, when I have multiple rows in my repeating table, and I delete one of the rows from the repeating table, it doesn't get deleted from the sharepoint list. On the other hand, if I only have one row in my repeating table, and I delete that row from the repeating table, it DOES get deleted from the sharepoint list. Everything else works fine. I can modify any of the rows and the corresponding list items will get updated. It's just the deletes that don't work unless I have only one item in my repeating table.

    Any ideas?

    -Brandon
  • 11-23-2011 10:26 AM In reply to

    Re: RefreshSharePointListItem

    Oh, I do believe that may be a bug (one that's been fixed, but a bug all the same!) What version of qRules are you using? I'm going to email you via the forum so you've got my email address, and have you send me a copy of your template so you can try injected with a newer version....
    Hilary Stoupa

  • 11-23-2011 10:29 AM In reply to

    Re: RefreshSharePointListItem

    Oh, I should add that just because you don't see the "T" in the date in InfoPath doesn't mean it isn't there - open your XML in a text editor some time after using a date / time control - the format for a datetime field is 2011-11-23T11:20:23
    Hilary Stoupa

  • 11-23-2011 10:43 AM In reply to

    Re: RefreshSharePointListItem

    Hilary,

    Thanks so much for the quick responses today. It turns out that it is not a bug... just user error on my part. After some more trial and error, I finally figured out why delete would only work with one row. I was calling the refresh when my form opened and then calling another refresh then submit on my submit button. I changed my form to only use the refresh on form load, and now it works like a charm. You guys really do have an awesome product with qRules 3.3! I’m starting to get the hang of it now.

    Thanks!

    Brandon
  • 11-23-2011 11:16 AM In reply to

    Re: RefreshSharePointListItem

    Oh, great! I do remember there being some minor issues around delete, but I believe they were fixed for 3.3, so I'm glad it is working correctly for you.

    I have to say, I'm a huge fan of qRules - it has all these little pieces that you can put together to do really powerful stuff. I'm happy to hear you like it and are getting the hang of it!

    Hilary Stoupa

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