I wanted to ask out how to set a global variable in SmartConnect.
I've created a new variable GBL_PA_NUMBER. Then, with a script, I fill it this way:
GBL_PA_NUMBER = _PROJECTID_NO
I can read it after the map finished running. But then I run another map (as a task). In the other map, I try to read the GBL_PA_NUMBER var again and it's empty. Why isn't it permanent?
I want to be able to pass that data from my first map to the other one. How can I manage to do it? Been hours I'm trying and searching. And I specify this is the only data I want to pass. That's why I'm not using "use variables from parent map" settings. It doesn't fit my needs.
Thanks in advance!
I found a bug that I can repeat so just wanna report it:
1- Create a GBL variable (mine is GBL_PA_NUMBER)
2- Create/edit a map (doesn't matter what you do with it)
3- Create a new Scripting task with the following code:
[quote=]Microsoft.VisualBasic.MsgBox("Global: " & GBL_PA_NUMBER)
What makes me laugh is that it's JUST a READ command.
4- Set manually a value to the global variable like "test"
5- Run map
The msgbox should show the content of the variable. Now, go back in the "Global Variables" tab. The name of the variable should be bolded and blue. Click on it, modify it's content and try to save it. It throws a message longer than my arm!
[quote=]See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at eOne.SmartConnect.UI.FormMapTasksGlobalVariables.btnSave_ItemClick(Object sender, ItemClickEventArgs e)
at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
at DevExpress.XtraBars.BarButtonItem.OnClick(BarItemLink link)
at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)[/quote]
If someone could report it to your dev, would be appreciated.
Still digging for my global variable problem. 🙁
Note: the issue raised above has been fixed in the SmartConnect 2014 release.
Thanks Kevin, will look for a newer version.
Chris, I'm sorry but even when I call my task "Run Map" with option "Use variables from parent map" checked, when I attempt to read the global variable in the other map I've called, it's empty again. It doesnt change anything. So it's still not working with or without this option checked. :S
If anyone else has anything to suggest, I start to be out of ideas…
Thanks for your help!
We have just released the 2014 version on our site this week so if you grab that it should fix up the issue posted above.
Yeah, we've noticed and installed it….
The update scrapped all our maps… So much joy… 😐 was it intended?
For upgrading SmartConnect or the maps inside of it, you will want to go into the Setup window and open the GP Connector and ensure all the settings are still entered in there correctly; re-enter the user credentials and select the default GP company again to make sure everything connects.
After that is done you will need to launch the System Maintenance window and hit process and let it continue through until it completes to update the maps to the new build. If SmartConnect is installed on multiple machines, you will want to make sure no one tries to access the maps from an earlier version of the tool as well.
If the maintenance process throughs any errors or the maps still do not show the destinations after that process you should contact email@example.com for direct assistance on the issue. For any map that says the destination is missing you will want to hit the Clear button rather than the Save to keep from saving the map now when the destination isn't pulling in correctly.
We forwarded to tehcnical support because we can't manage to fix it.
Hopefully that my global variables will work when we'll be done fixing this issue.
Thanks for all your help Chris.
So done with updating the Smartconnect to the latest version, managed to make maps work again. I tried again to run it with the "Use variable from parent map" checked. When I read it in the child map, it's not working. The nullpointerexception is gone but the value still doesn't pass and I dont understand why.
Ok ok I messed around with it a bit. I added a script task with a msgbox to read the variable after the task map and now it works. This is very strange thing mmmmmm. Seems like "memory" needed something new to fully refresh its actions. I dont know!
Ok, my map is still not working as intended but I'll manage to make it works with trial/errors until I fully understand how software handle my requests.
Thanks again for your help folks! Have a good day and a happy independance day tomorrow! 🙂
If you would like to submit an answer or comment, please sign in to the eOne portal.