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: Passing a variable/constant to an Automate function
Topic Summary:
Created On: 10/04/2013 04:40 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.
 10/04/2013 04:40 AM
User is offline View Users Profile Print this message

Author Icon
MatthiasSpitzhorn
Journeyman (50-99)

Posts: 71
Joined: 07/27/2005

Hi,

I defined an automate constant called %inbound% with a value of "C:\test" .

Now I'd like to use the %FileCount(%inbound%\foo)% to get the amount of files within that directory. But it didn't work. I get the "expection an expression" error.

Also storing the value %inbound%\foo in a temp variable and using then
%FileCount(%tmpVar%)% didn't also work.

Isn't it possible in general to pass a variable to an automate function (basic or extended) ?

Thanks a lot.

 Category Survey
AutoMate 8 version:
Windows version:
 10/04/2013 06:45 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Matthias,

When referencing a variable within a function, the variable does not need to be enclosed with percentages. In your case, %FileCount(tmpVar)% should work. As for your other example, in order to use variable and string references your function should look like this: %FileCount("GetVarValueByVarName(inbound)\foo")%.



 Category Survey


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

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 10/04/2013 07:56 AM
User is offline View Users Profile Print this message

Author Icon
MatthiasSpitzhorn
Journeyman (50-99)

Posts: 71
Joined: 07/27/2005

Now it works.

Thank you very much.

 Category Survey
AutoMate 8 version:
Windows version:
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 925 guests browsing this forum, which makes a total of 925 users using this forum.

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

Sitemap Network Automation Software Blog