Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: VBScript lacking functions?
Topic Summary:
Created On: 08/01/2018 11:02 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 08/01/2018 11:02 AM
User is offline View Users Profile Print this message

Author Icon
JayJ Aquina
Student (5-19 posts)

Posts: 12
Joined: 05/09/2007

Hello,
I usually go through odd things upgrading Automate. I have this client that was happily running Automate 10 but he upgraded to the latest V11.0.6 some days ago and everything stopped working.
Digging around the code he has for most of the stuff he runs, I found out that one VBScript function (for what I could find so far) is no longer implemented.
The bellow code stopped working

stFileNameAux = ExtractFileName(stFileName)

The function ExtractFileName doesn't seem to be available in Automate anymore.
Is this true or is there something missing on his configuration?
Are there other retired functions to be expected to be found?

Thanks a lot for your help.
Jay
 08/01/2018 01:36 PM
User is offline View Users Profile Print this message

Author Icon
Hamid Noorbakhsh
HelpSystems

Posts: 454
Joined: 07/29/2008

Jayj,
As you might already know, some functions listed under 'Extended Functions' in our expression builder are not vbScript and are handled by us. I just tested and it seems like one can not use them through the BasicScript action, so somehow there is a disconnect, whereas they work everywhere else. I have entered this into our bug tracking system #24425 to be looked at.

-------------------------
Thank you for choosing AutoMate

Hamid Noorbakhsh | Senior Software Engineer
AutoMate | A Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 08/01/2018 03:58 PM
User is offline View Users Profile Print this message

Author Icon
JayJ Aquina
Student (5-19 posts)

Posts: 12
Joined: 05/09/2007

Hello Hamid,
Thanks for replying.
This seems to be an undocumented change that break things. It was working nicely on the previous version.
I'm advising my client to stick with V10 and have the scripts running smoothly but I think he is not keen to this possibility.
I appreciate your help filling this on you bug tracking system.
Regards,
Jay.
 08/02/2018 08:45 AM
User is offline View Users Profile Print this message

Author Icon
Hamid Noorbakhsh
HelpSystems

Posts: 454
Joined: 07/29/2008

Hello Jay,
I further investigated this and first of all not all Extended Functions are failing. I did get the go ahead to fix this ASAP, but upon further looking into it, it is working. The issue is tricky in that if you try to run the script from the BasicScript Editor in AMTB, it fails (I think the Extended Functions are not getting loaded at this time), but if you save and run, the STEP runs fine, since the engine will know of Extended Functions! Load the following in the Editor, run, you get an error, then save to step and run, and it is working, so the Editor has issues. I am still looking into this, but the script 'should' run in a step. If you are still seeing something different from what i have explained, let me know and I will further look into that specific issue. I will need a simple working example to pinpoint the issue since from your explanation, this is what I have. Also this behavior was not intended and hence that is why there is no documentation.

Sub Main
Dim a As String
Dim x As String
a="C:\Temp\Hello.ext"
x = ExtractFileName(a)
MsgBox(x)
End Sub

-------------------------
Thank you for choosing AutoMate

Hamid Noorbakhsh | Senior Software Engineer
AutoMate | A Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 08/02/2018 09:52 AM
User is offline View Users Profile Print this message

Author Icon
Hamid Noorbakhsh
HelpSystems

Posts: 454
Joined: 07/29/2008

To almost close this thread, I did add the Extended Functions to the BasicScript editor for availability, HOWEVER, one can not test all of them since some functions are ONLY available during running of a task. e.g. GetAgentName, GetCurrentStep, etc and SHOULD NOT BE counted to be available in the Editor. From Editor it will throw a 'Not Implemented' Exception since it is not available.

Thanks for your time for reporting this. It should be available in next release.

-------------------------
Thank you for choosing AutoMate

Hamid Noorbakhsh | Senior Software Engineer
AutoMate | A Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1149 guests browsing this forum, which makes a total of 1149 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2019 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog