skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

Last post 08-01-2011 03:20 AM by Skarn. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-17-2011 04:08 AM

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

    Before anything: I am creating this and testing it on my own forms - but I cannot guarantee anything won't go wrong - please backup templates before modifying using this toolkit!

    Hi IPDev community.
    I want to contribute a little toolkit of techniques, hacks, tools for Infopath to this website/forum.
    I'm only coming into this with experience and techniques I've come across in my own Infopath development. I'll be using Microsoft Access 2007 environment to 'provide' the toolkit.
    The idea would be also that nothing in the toolkit have dependencies after template modification - so no server add-ons or webservices etc. This is purely because that's the environment I myself have to work in.

    I assume that most of us would have Microsoft Access.

    So - For my 'alpha' version - a single feature (with many more to be added!).

    Download: skInfopathKit.zip

    Feature 1: View Clone - copy a form view.

    One I think some of us have wanted many times - e.g. a starting point for a print view for a view.
    Quick steps on how to use this first feature.

    1. Unzip the skInfopathKit.zip to any folder.
    2. Run the skInfopathKit .mdb file
    3. Allow macros
    4. Get one of your templates to test with and make a copy of it somewhere (please be safe and backup stuff before using my toolkit - in case it breaks something!)
    5. Use the 'Add Form' button on the 'Templates' page to register the template with the toolkit
      Registering unpacks the Infopath template cab file into the templates sub-folder of the toolkit - this is what the toolkit modifies.
    6. Double click the form name after registering it (it should now appear in the list) to make it 'active'
    7. Go to the 'Tools' > 'Clone View' page
    8. You should see the views in your form listed.
    9. Select one, and press 'Copy' button
    10. You will be asked for the new view name - type one in and press OK.

    The toolkit will tell you the view has been added.

    To verify and test you need to 'Re-CAB' the form template (this is essentially what Infopath does when it publishes a template).

    1. Press the 'Re-CAB' button at the bottom right of the main window
    2. You will be prompted for a save location - name the form with .xsn as it's file extension

    You should now have an Infopath form in that saved location and you can go to design mode and verify you have a cloned view!

    For those worried about virus' etc:

    • Scan it
    • All the modules and forms and code is completely viewable.

    For those who like it, and have comments, suggestions etc.:

    • Thanks! 
    • My email is in the 'About' page of the toolkit

    regards,
    Skarn

  • 07-18-2011 08:37 AM In reply to

    Re: skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

    In case no one has mentioned it lately, Skarn, you rock. What a neat tool to share with others!

    Hilary Stoupa

  • 07-18-2011 02:23 PM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

    Thank you :-) I'll be adding more - The next two features:

    * View tweaks - convert other controls to Text Boxes. Bulk change fonts.
    * Header Footer - modify a view to have fully formatted/dynamic Header and Footer for printing.

    Now I think about it - most of the functions are geared towards print view improvements - but maybe other uses can be found.

  • 07-19-2011 03:44 PM In reply to

    Re: skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

    The Access form is nice looking.

    So you know, I'm using InfoPath 2010 / Access 2010.

    I had an error adding a form - on this line:
    xmlDoc.selectSingleNode("//xsf2:share/@path").Text = strNewPublishPath

    The exception was "Object variable or With block variable not set"

    I tried again, after publishing the form to a network location (which was my guess as to when xsf2:share/@path would be added to the manifest)- my new form added as well as the other two I'd been trying to add.

    It would be nice if when we browse for a location for the new template, if the file extension was forgotten by the user (oops!) the tool added it.

    The Clone View feature worked for my IP 2010 template - so now you can say it has been tested for 2010.

    However, I have to ask, with no snark intended (because as I've posted here and mentioned in email - I think it is way cool you've invested your time in this!) - how is this easier for me as a user than just clicking in a view, CTRL + A to select the whole view and CTRL + C to copy, then create a new view and paste the whole thing in? I guess, once I've added a template to the toolkit - it will probably be quicker, so I've maybe answered my own question there... And I know you intend to add more features.

    Again, nice looking form, pretty good user experience - you should try it on some forms that haven't been published to network shares - that should repro the issue I had.

    Hilary Stoupa

  • 07-20-2011 01:17 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

    Thanks for having a look Hilary :-) I will have to add an instruction that it expects to work with network drive published forms.
    Sharepoint or other types of form template I am not familiar with unfortunately.

    Your suggestions are exactly what I am looking for - I will definitely fix the file extension being added if user does not provide it.

    And no snark taken! I also use the straight forward Ctrl+A and paste method all the time - and because of that I found plenty of time that the pasting didn't quite work the way I expected - extra carriage returns and other minor formatting mismatches.
    I've also had Infopath decide to crash during large copy and pasting of controls.

     The view cloning is a key component to upcoming features as it's needed for e.g. to auto generate a print view of a view, so I thought it might be a basic function to get working straight up :-)

    Thanks again for testing, and I'll aim for weekly updates on funtions/features/fixes :-)

  • 07-20-2011 05:48 AM In reply to

    Re: skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

    Well, from what I saw of your code, you are resetting the publish path for the form, right? And if a form has been published to SharePoint, you should be able to just change the publishUrl, which I see you are doing a line down. So perhaps wrap the bit setting xsf2:share/@path in an if? If this were C#, I'd do something like:

    XPathNavigator nav = MainDataSource.CreateNavigator().SelectSingleNode("//xsf2:share/@path", NamespaceManager);
    if (null != nav)

          //do some stuff like setting the value of nav
    }

    That way you can set the node if it exists, and won't have an error in non-network published forms.

    How do I update the forms I've added? Just add the same template again?

    Hilary Stoupa

  • 08-01-2011 03:20 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: skInfopathKit - Looking for feedback and testing of first 'Alpha release' - Comes with View Clone feature

    Well, I have the header footer feature working well - but it's not persistent enough.

    I've tried numerous configurations of <xsl:apply-templates select="xxx" mode="xd:preserve"> and <xsl:template match="xxx" mode="xd:preserve"> to enable me to wrap a view in a table/thead combination with no luck.

    Would anyone else know if xd:preserve or something similar can be used for <table> which would prevent Infopath from re-writing the table tags every publish?

    The only real damage it does is converting all <thead> tags into <tbody> - the strange thing being that it's not even necessary for IP to do this from what I can tell.

    If there is no solution, then my toolkit can present the following workflow:

    • form template is saved by user
    • toolkit is opened and user select 'header/footer' function
    • user selects template and toolkit applies header/footer 'patch'
    • user re-publishes form without making any view changes
    When the user next updates the template for whatever reason, the patch has to be applied again. Hardly ideal.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.