Smart Links - Speed up Contact Lookups! - Mel Balsamo

InfoPath Dev

This Blog


Mel Balsamo

Smart Links - Speed up Contact Lookups!

In a previous blog post, we’ve shown you a template part called Contact Block Advanced, and described how useful it is for keeping a record of contact persons / employees for every company, all in one place. One of its cool features is the ability to speed up contact lookups by using Smart Links. This blog post shows you how to create a sample form that uses Smart Links. Start by following the steps below and see how amazing and convenient it is to use Smart Links in your solutions.


1.       Design a blank InfoPath form template.

2.       Add the following nodes to your main data source: 



3.       Add tables and controls to your form similar to this:



4.       Add default values to the Address1 attributes:

a.       In the Data source task pane, double-click on the GoogleMaps attribute and specify a default value:


concat("", .., ", ", ../../my:Address2, ", ", ../../my:City, ", ", ../../my:State, " ", ../../my:Zip, " ")


Click on Verify Formula to check that you have entered the correct one. Your formula should be similar to this:



b.      Double-click on the LiveSearch attribute and specify a default value:


concat("", .., ", ", ../../my:Address2, ", ", ../../my:City, ", ", ../../my:State, " ", ../../my:Zip, " ")



c.       Do the same for the MapQuest attribute:


concat("", .., ", ", ../../my:Address2, "&city=", ../../my:City, "&state=", ../../my:State, "&zipcode=", ../../my:Zip)



5.       Add hyperlinks to Address1 that link to its attributes:


a.       Add a space after the Address1 label, right-click and select Hyperlink:



b.       For the Link to, select Data source and enter my:Address/my:Address1/@my:GoogleMaps. Enter GoogleMaps in the Text field under Display.




c.       Do the same for LiveSearch and MapQuest:

LiveSearch – my:Address/my:Address1/@my:LiveSearch

MapQuest – my:Address/my:Address1/@my:MapQuest


d.      You can add open and closed parentheses, as well as separators for the hyperlinks so they’d look neater:



6.       Do the same for all the other remaining attributes, specifying the following default values and pointing each hyperlink to its corresponding data source:


a.       Phone (@call to) - concat("callto://+1", ..)

b.      Email (@mail to) - concat("mailto://", ..)

c.       Website (@url) - concat(substring("http://", 10 * number(contains(.., "://"))), ..)


Your form should be similar to this:



Test your form in Preview mode by filling out the fields and clicking each corresponding Smart Link:


Address (LiveSearch):




Phone (Skype Call):




Email (Send Mail):



Website (Visit Website):




Smart Links are the best way to go to look up data in your forms. It is mostly useful in solutions that contain contact information. You can even create template parts that use Smart Links, and use them in your forms right away.


NOTE: The Smart Links used in this blog post are applicable only in the United States.



uberVU - social comments said:

This post was mentioned on Twitter by InfoPathDev: Use #Skype? Make a call directly from your #InfoPath form with Smart Links. Download it for free

April 28, 2010 3:29 PM
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.