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: Format() works differently during shared variable initialization (#2767)
Topic Summary: format string quotes come through to output
Created On: 07/15/2011 11:31 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.
Answer This question was answered by Rick Johnson, on Friday, September 23, 2011 10:45 AM

Answer:
Hi John,

That variant was also reproduced in our test labs as well, I'll have the developers address it too.
 07/15/2011 11:31 AM
User is offline View Users Profile Print this message

Author Icon
JohnScott
Artisan (200-499)

Posts: 231
Joined: 10/27/2010

I use formatted date strings in many of my workflows.  I've noticed that the Format() function works differently when it is executed as part of a Shared Variable initialization than it does when used in a Local Variable initialization or a Set Variable step.
When used as part of a Shared Variable initialization, the output includes the quotes from the quoted form parameter.  When used elsewhere, it does not include the quotes into the output.
I get the following output from the attached workflow, which demonstrates the various ways of setting a var to %Format(Date(), "mmddyy")%:
SharedAndInitializedWithQuotes = "071511"
SharedAndInitializedNoQuotes =
SharedAndResetLocally = 071511
LocalVar = 071511
Is this a poorly-documented feature, or a bug?

 Category Survey
AutoMate BPA Server 8 version: 8.0.1
Windows version: Windows 2003 R2



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


Edited: 11/10/2011 at 08:01 AM by AutoMate Discussion Moderator
 07/15/2011 03:56 PM
User is offline View Users Profile Print this message

Author Icon
Rick Johnson
AUTOMATE EMPLOYEE

Posts: 2757
Joined: 07/14/2008

Hi John,

I also see that setting a Shared Variable to %Format(Date(), "mmddyy")% results in the result being surrounded by quotes where setting a Task Variable to %Format(Date(), "mmddyy")% does not cause quotes.

I will forward this issue to the development team - the Shared Variable should be consistent with the Task Variable.

 Category Survey


-------------------------
- Rick Johnson
Network Automation
 07/25/2011 01:13 PM
User is offline View Users Profile Print this message

Author Icon
JohnScott
Artisan (200-499)

Posts: 231
Joined: 10/27/2010

Found another different expression of what is probably the same underlying bug.  When I initialize a shared variable with %DateValue("2012-05-30")%, the value shows as #5/20/2012#.  If I initialize a local variable with the same thing, the value shows as 5/20/2012.



 Category Survey
AutoMate BPA Server 8 version: 8.0.1
Windows version: Windows 2003 R2
 07/26/2011 08:58 AM
User is offline View Users Profile Print this message

Author Icon
Rick Johnson
AUTOMATE EMPLOYEE

Posts: 2757
Joined: 07/14/2008

Answer Answer
Hi John,

That variant was also reproduced in our test labs as well, I'll have the developers address it too.

 Category Survey


-------------------------
- Rick Johnson
Network Automation
 04/21/2014 03:06 PM
User is offline View Users Profile Print this message

Author Icon
JohnScott
Artisan (200-499)

Posts: 231
Joined: 10/27/2010

I have just started to test v9.0.4 on Windows 2008 R2, and am disappointed to find that this bug has not yet been fixed in the year and a half between when it was acknowledged in this thread and when v9.0.4 was shipped.

 Category Survey
AutoMate BPA Server 8 version: 8.0.1
Windows version: Windows 2003 R2
 04/21/2014 03:13 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi John,

I do apologize for the inconvenience and frustration this has caused. I can confirm that this issue is corrected in v10.

 Category Survey


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

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
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 1417 guests browsing this forum, which makes a total of 1417 users using this forum.

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

Sitemap Network Automation Software Blog