Toad World® Forums

If_Condition issue in Automation script

I have a automation script that works in 2.5.1 but does not work in 3.0. Any help will be welcomed.

I have a variable D1 defined in the script and it gets assigned a value in a loop. Then inside the loop, I used a If...Condition... to test the value of D1. In the Build condition expression field (in Activitiy Input tab), I put: D1="DEVICE_MALF", and test it successfully using the Test button. However, when I tried to run the whole script, the error message in the Log tab says: Activity 'If_Condition_1' validation failed: Variable value is not valid. (Please see the attached screenshots)

I wonder if it is the syntax that I used in the condition expression or there is something else I need to change.

Thanks

Yuheng

I made a simple script fitting your description in TDA 2.6 and used in 3.0. No problems. Variables did change from 2.6 to 2.7 and then again in 3.0. Can you send me your script? I can tell more from looking at the XML. Also send any supporting files such as the Toad Report.

Debbie
dpeabody@quest.com

Hi Debbie,

Thanks for your help. I have attached the script (and another two scripts that are used inside the automation script) for your review.

Thanks

Yuheng
COVEGTT0027 Device Malfunction Reports.zip (42.6 KB)

You are initializing your variables to "". So when the If condition validator tries to validate the expression "" = "DEVICE_MALF" it fails. Change initializing your vars to "EMTPY". This works around this issue.

Debbie

Hi Debbie,

Thanks very much. It works perfectly.

Do you happen to know if there is any documentation on Automation Script programming or something explains in somewhat detail how automation scripts work in Toad? Because oftentimes I encounter some problems and have a hard time to figure out how to solve it. For example, when I try to schedule this automation script, I always get the following error “the parameter is incorrect” (see attached screenshot). Maybe you can also take a look?

Thanks

Yuheng
TDA Automation Script Schedule Error Msg.bmp

Hi Yuheng,

We are aware of this issue and I’m working on it right now. It seems like TDA cannot schedule some specific scripts. Hope I’ll have more information soon.

Thank you,

Igor.

Sure. Thanks. Do you know if there is any documentation on how automation script works (some indepth explanation)? --yuheng

The first part of my blog has many postings about automation. That is your best source for how automation works.

http://toadworld.com/BLOGS/tabid/67/BlogID/39/Default.aspx

Debbie

Hi Yuheng,

Try to rename the script (Device Malfunction Report v1.2.tas) removing period (".") from its name. Please let us know if it helps.

Thank you,

Igor.