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 Currency no longer works in v11
Topic Summary:
Created On: 10/04/2017 02:42 PM
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/2017 02:42 PM
User is offline View Users Profile Print this message

Author Icon
KathyMcdonald
Journeyman (50-99)

Posts: 65
Joined: 09/21/2015

The following step no longer formats the value with commas...

          %Format(num, "#,##0.00")% 

I tried changing out the double quotes for single quotes but still didn't work.

Copied same step into v10 task and it worked as expected.

 

<AMVARIABLE NAME="ttl" VALUE="1416703.35" />
<AMVARIABLE ACTIVITY="set" VARIABLENAME="ttl">%Format(ttl,'#,##0.00' )%</AMVARIABLE>
<AMSHOWDIALOG>%ttl%</AMSHOWDIALOG>

 

 10/05/2017 08:11 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Kathy,

I was able to reproduce the issue and document it for correction. (23286)

I have provided a workaround below that may still allow you to use the format() function.


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


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

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

Author Icon
KathyMcdonald
Journeyman (50-99)

Posts: 65
Joined: 09/21/2015

That worked.  So did just adding the $ ... %Format(varString, "$#,##0.00")%

I have noticed several differences in the Format command between v10 and v11... what underlying change was made in this area?

For example, comparing %Format(Time(), "HHmm")% > 2200 doesn't behave the same.  In v11, it had to be explicitly cast to CInt, or when using "yyyyMMdd", cast to CULng where this was not necessary in v10.  But it didn't throw an error, it just always returned the same value regardless of what time it actually was.

 10/09/2017 03:49 PM
User is offline View Users Profile Print this message

Author Icon
Mary Manzano
HelpSystems

Posts: 280
Joined: 03/10/2014

Hello Kathy,

At this time we don't know what could have changed in the code. It has been submitted as a bug for developers to review and correct. 



-------------------------
Mary Manzano | Technical Consultant
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 12/07/2017 07:25 AM
User is offline View Users Profile Print this message

Author Icon
RicoLeenarts
Apprentice (20-49)

Posts: 31
Joined: 09/01/2015

Hi,

heavily using the "Format" function with dates in nearly every task we have. We had to stop migrating from version 10 due to this issue now.

%Format(Date(),"dd.mm.yyyy")%

gives 07.12.2017 in Version 10

gives 7122017 in Version 11

None of our tasks will work with this change. When will this be fixed?

This is very urgent for us!

Regards

Rico

 

 

 12/07/2017 10:17 AM
User is offline View Users Profile Print this message

Author Icon
Hamid Noorbakhsh
HelpSystems

Posts: 454
Joined: 07/29/2008

Rico,
Some good news, I just tested and for next release this issue will be fixed. I think you must be in German culture or some culture where dots might be multipurposed and our engine guessing the wrong one. Can you see if you can use the workaround below (On my German machine, both steps work for next release). I am hoping the AMTEXT activity with formatting the datetime and assigning it to a 'TEXT' variable might give you a temporary workaround.


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


-------------------------
Thank you for choosing AutoMate

Hamid Noorbakhsh | Senior Software Engineer
AutoMate | A 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 880 guests browsing this forum, which makes a total of 880 users using this forum.

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

Sitemap Network Automation Software Blog