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: Automate not recognizing variable data
Topic Summary:
Created On: 11/22/2016 07:20 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.
 11/22/2016 07:20 AM
User is offline View Users Profile Print this message

Author Icon
AshleyDespain
Student (5-19 posts)

Posts: 20
Joined: 12/04/2012

Hello everyone.  I'm trying to download X amount of files (x can be any #), once downloaded, read through the list of files to determine if they are a P or an I file type.  Depending on the answer, I need to change the file name/extension.   Below is my code. (mostly)  The "variable watch" window in Automate allows me to see that the variables are being populated how they should but, when the comparison in the "IF" statement is true, it doesn't execute any of the steps below.  It goes immediately to the "Else" statement.

Thanks in advance!!

 

<AMFILESYSTEM ACTIVITY="get" SOURCE="%var_BeginLocation%" RESULTDATASET="netauto" FILEPROPERTY="fullname" />
<AMSET VARIABLENAME="var_counter">1</AMSET>
<AMLOOP TYPE="DATASET" DATASET="netauto">
     <AMSET VARIABLENAME="var_name">%netauto.Filename%</AMSET>
     <AMSET VARIABLENAME="var_right">%Right(var_name, 5)%</AMSET>
     <AMSET VARIABLENAME="var_left">%Left(var_name,10)%</AMSET>
          <AMIF TEXT="var_right" SUBSTRING="P.837">
               <AMFILESYSTEM ACTIVITY="rename" SOURCE="var_name" DEST="%Left(var_name, 10).CLP%" />
               <AMFILESYSTEM SOURCE="%netauto.Fullname%" DEST="\\qqqq\qqqqr\qqqqt\qqqqqqdqqqqqqqq\%var_fileoutputdate & var_name%" OVERWRITE="yes" />
          <AMELSE />
               <AMSET VARIABLENAME="var_i">%var_fileoutputdate & var_left%.CLI</AMSET>
               <AMFILESYSTEM SOURCE="%netauto.Fullname%" DEST="\\qqqqqqq\%var_i%" OVERWRITE="yes" />
               <AMFILESYSTEM ACTIVITY="rename" SOURCE="%netauto.Fullname%" DEST="%var_path & var_I%" />



 Category Survey
AutoMate 9 version: 9.0.3
Windows version: Windows Server 2003
 11/22/2016 09:03 AM
User is offline View Users Profile Print this message

Author Icon
AshleyDespain
Student (5-19 posts)

Posts: 20
Joined: 12/04/2012

Nevermind everyone... I figured it out!



 Category Survey
AutoMate 9 version: 9.0.3
Windows version: Windows Server 2003
 11/22/2016 09:20 AM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi Ashley,

Glad you got it working.  It was just that "var_right" was missing the %'s around it in the IF statement?



 Category Survey


-------------------------

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
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 2070 guests browsing this forum, which makes a total of 2070 users using this forum.

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

Sitemap Network Automation Software Blog