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: Variable could not be set Identifier is already in use.
Topic Summary:
Created On: 02/16/2009 02:59 PM
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.
 02/16/2009 02:59 PM
User is offline View Users Profile Print this message

Author Icon
CoryWolfgang
Student (5-19 posts)

Posts: 14
Joined: 04/26/2007

I am attempting to re-set a variable using "Set Variable" and I am getting an error message "Variable "PersonMatch_MRN" could not be set (Script error: "Identifier is already in use." at script line 9)"

I tried to replicate this simply with create and set and set again and did not get this error. I have attached the code I was running in case it helps.  The only thing I can think of is the type nexted loops?



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 02/16/2009 03:35 PM
User is offline View Users Profile Print this message

Author Icon
Dustin Snell
AUTOMATE EMPLOYEE

Posts: 1656
Joined: 03/30/2005

Quite a few tasks steps there so I can't exactly replicate - however, I noticed you were trying to loop through the result of a custom BASIC function. Are you sure that is what you are intending to do? I am not sure it makes sense because it would change every iteration right?

Did you ever have this task working in a previous version of AutoMate this way?



 Category Survey


-------------------------
Dustin Snell
 02/16/2009 04:19 PM
User is offline View Users Profile Print this message

Author Icon
CoryWolfgang
Student (5-19 posts)

Posts: 14
Joined: 04/26/2007

Everytime I post it is something simple like that.

That was the problem that VB code was supposed to be at the top outside all loops.  Thanks for the help.



 Category Survey
 02/16/2009 04:44 PM
User is offline View Users Profile Print this message

Author Icon
Dustin Snell
AUTOMATE EMPLOYEE

Posts: 1656
Joined: 03/30/2005

Originally posted by: CoryWolfgang

Everytime I post it is something simple like that.


That was the problem that VB code was supposed to be at the top outside all loops.  Thanks for the help.


Great I am glad you have it solved!

 Category Survey


-------------------------
Dustin Snell


Edited: 02/16/2009 at 09:58 PM by Dustin Snell
 08/31/2012 03:31 PM
User is offline View Users Profile Print this message

Author Icon
DaveScotese
Student (5-19 posts)

Posts: 6
Joined: 09/23/2010

I'm getting that error too, in a script that runs fine when it is the first time a step of a task runs it. When it runs the second time, I get this error. I was able to eliminate the error by undoing a (very) recent change.

I had a loop that built a large list, and then a query that used that list. The size of the list was making the query time out, so I broke it up. instead of this:

do while ...
make list bigger
loop
Use list in query

I did this:

Sub useList( list, connection1, connection2 )
Use list in query
End Sub

do while ...
make list bigger
if Len(list) > 5000 Then
useList( list, connection1, connection2 )
list = ""
End if
Loop
useList( list, connection1, connection2 )

When I removed the new Sub and pasted the code into both places that I had "useList", the error went away. I am mystified.

 Category Survey
 09/01/2012 12:14 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Dave,
I suppose the whole script resides inside an Automate loop.
A sub (useList) can only be defined once
The
Sub uselist(....)
End Sub
must be placed first, outside of any loop.
I guess on the second run your script was trying to define again uselist, so that it failed.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
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 939 guests browsing this forum, which makes a total of 939 users using this forum.

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

Sitemap Network Automation Software Blog