Refresh SharePoint data in offline template? - InfoPath Dev
in

InfoPath Dev

Refresh SharePoint data in offline template?

Last post 03-04-2010 11:32 PM by PeterB. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 03-03-2010 03:02 PM

    Refresh SharePoint data in offline template?

    We have a bunch of offline templates (XSN) that store SharePoint list data which is getting old.

    What's the easiest way to refresh this data?

    The only way I can see how to do it is:

    • Open the template in Design mode
    • Step through each SharePoint Data Connection wizard (thus updating the internal "X_offline.xml" file)
    • Save the template
    • Redistribute the template to the users

     

    Is there a better way? We looked at the built-in InfoPath refresh button, but it doesn't seem to refresh the underline template when they go back offline.

  • 03-03-2010 03:26 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Hi Peter,

    Have you taken a look at this blog post on the site: http://www.infopathdev.com/blogs/matt/archive/2006/04/10/Allow-Offline-Use-of-a-SharePoint-List-by-Caching-Locally.aspx?

    Seems like this method would help

    Ted

  • 03-03-2010 03:33 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Thanks Ted, but I believe this is similar to the built-in Refresh button in InfoPath 2007, which only performs a refresh on the current form without updating the underlying template's "X_offline.xml" data file - unless I'm mistaken.

    Perhaps other people use Groove - not sure if that performs the SharePoint data sync magically or not.

  • 03-03-2010 03:37 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Peter,

    Did you read this article on the MS Office site? http://office.microsoft.com/en-us/infopath/HA101569041033.aspx

    I'm pretty sure that you should not need to use Groove, the refreshing of the cached data in your 2DS should work.

    Ted

  • 03-03-2010 03:49 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Thanks again Ted,

    Yes, I've looked at that one and this one, but it doesn't clarify whether the underlying template data should be updated. Our tests showed, as soon as they went back offline, the form reverted to the old data. Surely it should keep the updated data?

    Perhaps it's an issue with the number of days set for caching the data (we've left it at the default of 3 days, and this data in much older than that). However I can't see why this would be an issue.

    Cheers,

    Peter

  • 03-03-2010 04:01 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Peter, what happens if you have the user first clear their IP cache before they go online and then see what happens after they connect to the form and go offline after that.

    I recall there being some form caching issues (bugs) with InfoPath 2007, I thought they were fixed in a service pack at some point.  Curious what clearing the cache will do.

    Ted

  • 03-03-2010 04:11 PM In reply to

    Re: Refresh SharePoint data in offline template?

    I assume you mean the data cache (Tools/Options/Clear Cached Queries) rather than the Form cache? I'll test this and let you know.

    Do you have any more info on the caching issues? We're running SP1 here.

  • 03-03-2010 04:20 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Hi Peter, I did mean the actual form cache.  I have seen a number of issues with form cache's not updating properly and although you haven't technically published a new template it seems to me that the local template should be being updated with the new 2DS after they go online.

    I do believe the form cache issues were fixed in SP2

  • 03-03-2010 08:02 PM In reply to

    Re: Refresh SharePoint data in offline template?

    After discussions with the client it seems we can't rely on users knowing how to refresh their laptop... in other words we have to do everything for them. We tested releasing a new version of the template and it works fine - i.e. the new data is present in the "X_offline.xml"after we manually refreshed the 2DCs.

     My questions are:

    • What's the point of the offline data feature if the data is never refreshed? 
    • Why doesn't InfoPath have a command-line switch like " -refreshOfflineData blah.xsn"? We could then put a batch file on the user's desktop which they can double-click when they're online and it'll refresh all the XSN files we need.
    • Are Groove InfoPath Forms the standard response to this?


    Cheers.
  • 03-04-2010 09:29 AM In reply to

    Re: Refresh SharePoint data in offline template?

    Hi Peter,

    I am not very familiar with Grove/InfoPath integration - frankly I don't hear a lot about that in my consulting projects with InfoPath. 

    If you re-read Matt Faus's blog post here: http://www.infopathdev.com/blogs/matt/archive/2006/04/10/Allow-Offline-Use-of-a-SharePoint-List-by-Caching-Locally.aspx

    The very last paragraph mentions putting the code to refresh into an OnLoad event handler so that it fires every time the user opens the form.  I think you should be able to use that with InfoPath 2007 as well.  Did you try that yet?

    Ted

  • 03-04-2010 02:55 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Did you read Matt's comment at the bottom? It's really a 2003 solution: 2007 is supposed to solve the problem with its Refresh button action, but apparently it doesn't. And even if it did, it doesn't make sense for the user to open up every form they have when they're back online, open a form instance, press a refresh button and then close without saving the form.

    What's needed is a meta-solution for synchronising forms and offline data - if Groove can do it, then I'll certainly be pleased, if it can't then the current solution here of RoboCopy refreshing form templates (which have had their SharePoint 2DCs manually refreshed) when users are back online seems to currently be the best compromise.

  • 03-04-2010 11:15 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Hi Peter,

    You are hitting the limitations in InfoPath's 2007 implementation of secondary data source caching. Life's a beach, you know, and the goal is to surf. OK, so enough theory, SharePoint 2010 has Groove integration and "spaces". This may give you the functionality you need. We haven't smoked it yet. I suggest you light up. Who knows, maybe it will be a good burn.

    There are other ways to offline data ... why not just embed it in the XSN proper?

    Qdabra also offers a "Standalone Dashboard" mode in version 2.4 of it's DBXL product that maps form to a local computer. 100% fidelity of secondary data sources. This works for SharePoint 2007 sites as well.

    Good luck with your board,

    Patrick

     

    Patrick Halstead
    Project Manager at Qdabra
  • 03-04-2010 11:32 PM In reply to

    Re: Refresh SharePoint data in offline template?

    Thanks Patrick - I'll patch up my board, apply some 2010 wax and hit the tubes :)

    Not sure what you mean by "XSN proper" but we have hard-coded data in the past which isn't ideal. I suppose we could use the main data source too, but you still need to manually refresh this. 

    Cheers.

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