![]() |
![]() |
We are currently migrating this forum over to our HelpSystems domain. Please post all new threads in our new HelpSystems Community Portal. |
![]() |
|
![]() |
AutoMate Discussion | ![]() |
help :
faq :
home
|
||
Latest News:
|
latest topics : statistics |
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 |
![]() |
![]()
|
![]() |
||||||||||
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?
Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder) |
||||||||||
|
||||||||||
![]() |
||||||||||
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?
------------------------- Dustin Snell |
||||||||||
|
||||||||||
![]() |
||||||||||
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.
|
||||||||||
|
||||||||||
![]() |
||||||||||
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!
------------------------- Dustin Snell Edited: 02/16/2009 at 09:58 PM by Dustin Snell |
||||||||||
|
||||||||||
![]() |
||||||||||
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.
|
||||||||||
|
||||||||||
![]() |
||||||||||
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.
------------------------- Jean Delfosse - Automate Beta Tester Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4 ![]() |
||||||||||
|
FuseTalk Enterprise Edition v4.0 - © 1999-2021 FuseTalk Inc. All rights reserved.