January 2009 - Posts - Mel Balsamo
in

InfoPath Dev

This Blog

Syndication

Mel Balsamo

January 2009 - Posts

  • Contact Block Advanced Template Part

    Figure1

     

    The Contact Block Advanced Template Part contains a section for Company information, and a repeating section for Contacts information. This is especially useful if you want to keep a record of contact persons / employees for every company, all in one place.

     

    The Contact Block Advanced Template Part is part of the Qdabra Template Parts package ($25). See all of the template parts included in this package and purchase it here.

     

    This template part is designed to speed up customer lookup using Smart Links.

     

    • Maps – the Address 1 field contains links to lookup the location on Map Quest, Google Maps, and Live Search Maps
    • Visit Website – points to the URL  entered in the Website link
    • Send Mail – launches the default Mail application to send email when the Email field is filled out
    • Skype Call – opens Skype to call up the numbers entered in the Phone and the CellPhone fields.

    Here are some screenshots showing how the Smart Links work:

     

    Google Maps:

     

    GoogleMaps 

     

    Visit Website:

     

    VisitWebsite

     

     

    For you to be able to use it in your forms, you must first install the template part in InfoPath. Here are the steps to do that: 

     

    1.       In InfoPath Design mode, click Controls in the task pane, and scroll down to the Custom section found at the very bottom of the task pane.

    2.       If you haven’t installed any custom controls (like template parts), you will see that the Custom section is empty. Click Add or Remove Custom Controls, and then click Add in the dialog box that appears.

     

    Figure2


    3.       In the Add Custom Control Wizard, select Template Part from the options and click Next.

    4.       Browse to the path of your template part, and click Finish then Close when done.

    5.       The template part will now show in the list of your installed template parts. Click OK to close the dialog box.

     

    Figure3


    6.       After successful installation, the template part will now be available in the Custom section of the Controls task pane (Figure 4).

     

    Figure4


    To use it in your form, just click the template part and it will be shown on InfoPath’s design area (Figure 5). You can then continue designing your form and edit the sections in the template part as necessary.

     

    Figure5

     

    Additional Info:

    If you have added a template part to InfoPath as a custom control, modifying the template part will not change the control. You have to uninstall the current version from your custom controls in InfoPath (using Add or Remove Custom Controls) and then add your new version.

     

    In a real working environment, you must send the updated template part to anyone who is using the original. After the updated template part is installed on each computer, the users are notified that an update is available, thus the need to update the existing forms that are using the template part. 

  • Hide-Show Section Template Part

    I'm sure by now you already have an idea of what template parts are. There have been numerous posts and blog posts describing what template parts can do and how you can use them to make designing your InfoPath forms easier and less time-consuming.

    Speaking of saving time designing forms, wouldn't it be nice to just have a place where you can grab template parts and use them on your forms right away, rather than creating them from scratch? I did a search and found only a few pre-made ones. So I think it would be really good to start compiling these template parts and make them available for everyone to use and just customize as needed.

    Let me show you one good example of a template part that can't be found anywhere. (Believe me, I searched everywhere!) This template part allows you to show or hide sections in your form. It is often useful in forms that have Help sections or those that have a bunch of details that make the form look crowded and untidy.

    This is the Qdabra Hide-Show Section Template Part, which is part of the Qdabra Template Parts package ($25). See all of the template parts included in this package and purchase it here.

    This is what the template part looks like when the section is hidden.  

    Figure1 

    If you wish to expand the section and see the contents, just click on the Show Details link or the down arrow key. 

    Figure2

    For you to be able to use it in your forms, you must first install the template part in InfoPath. Here are the steps to do that:

    1.       In InfoPath Design mode, click Controls in the task pane, and scroll down to the Custom section found at the very bottom of the task pane.

    2.       If you haven’t installed any custom controls (like template parts), you will see that the Custom section is empty. Click Add or Remove Custom Controls, and then click Add in the dialog box that appears.

    Figure 3

    3.       In the Add Custom Control Wizard, select Template Part from the options and click Next.

    4.       Browse to the path of your template part, and click Finish then Close when done.

    5.       The template part will now show in the list of your installed template parts. Click OK to close the dialog box.

    Figure 4

    6.       After successful installation, the template part will now be available in the Custom section of the Controls task pane.  

    Figure 5

    To use it in your form, just click the template part and it will be shown on InfoPath’s design area (Figure 6). You can then continue designing your form and edit the sections in the template part as necessary.

    Figure6 

    Below are the screenshots of the form I have designed using the Hide-Show template part.

    All sections hidden:

    Figure7 

    Showing one of the section’s details:

    Figure8 

    All sections’ details shown:

    Figure9

    Additional Info:

    If you have added a template part to InfoPath as a custom control, modifying the template part will not change the control. You have to uninstall the current version from your custom controls in InfoPath (using Add or Remove Custom Controls) and then add your new version. To do this using the Hide-Show template part, change the placeholder texts so that it can be used specifically for How-to tutorials. 

    Figure10

    Save the template part to the same location it was in when we originally added it as a custom control. Remove the template part from your custom controls in InfoPath (leaving the original control on your form) and add the modified template part to your custom controls. Then, on the same form we created on Step 6, add the template part below the custom control we already had. In Figure 11, the first template part was from the original control, the second after we removed it and re-added it.

    Figure 11

    You can’t simply add the control (template part) again – you will get an error message that it already exists. It has to be removed and re-added.After re-adding the control, you can update the existing template parts that are present on your form by right clicking the old template part and selecting Update. 

    Figure12 

    You will see that the template part in the form has been updated. 

    Figure 13

    In a real working environment, you must send the updated template part to anyone who is using the original. After the updated template part is installed on each computer, the users are notified that an update is available, thus the need to update the existing forms that are using the template part.
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.