This Tuesday we’re taking a quick look at the scripting windows in SmartConnect. There are a couple of improvements that have made scripting much easier and more useful in SmartConnect in the latest 2012 versions.
I am especially excited about these new features since a lot of my work in SmartConnect revolves around developing scripts and other tasks and these last couple updates have made the scripts much easier to read and also more secure.
The first thing you will notice is the text highlighting in the scripting and sql windows. There is a different highlighting method for VB, C# and SQL code so each language will have its own format in the windows.
As you can see from the image this VB code has all the comments color-coded, the keywords colored uniquely, and any strings displayed in another color. In the past, everything was just shown as plain black text which hurt the readability a bit.
The other piece I want to point out are the saved connections that can be used in scripts. I have mentioned this multiple times before, but the saved connections let us set up multiple types of connections in any script without displaying the critical bits of information (user names, passwords) in plaintext in the script.
This Fields list can be found in every scripting window just to the left of the coding window, and either of the Connections items can be expanded to see any saved connections you have set up already. The connections can then be used in the script. If you have questions on setting up the connections or using them in the script refer to my earlier tech article on creating saved connections.
Next week I will cover setting up templates in SmartConnect, which really deserve a video article just to themselves do to how powerful they are in speeding up your development time when working on multiple maps.