LIST_LINE numeric format string

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

LIST_LINE numeric format string

Post by gijsvb »

Hi,

I have a list_line command like:
Abonnement.Pakketbeschrijving=LIST_LINE(Abonnement.Pakket,'ORDER BY PakketOptie.Pakket.Volgnummer',':',' ','CodeAGF','OptionAmount,0.00')

I try to present the OptionAmount with two decimal digits f.i. 15.00. The resulting string contains amounts with one decimal digit, like 15.0. What should be the correct format string to get two decimal digits?

Regards,

Gijs.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: LIST_LINE numeric format string

Post by customaware »

Have tested but try....

CodeAGF','[email protected]')

or

CodeAGF','OptionAmount@n')
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Re: LIST_LINE numeric format string

Post by gijsvb »

Hi Mark,

Thanks for your response, but this doesn't help. Using a @ sign, the attribute name is no longer recognized. I also tried leaving out the optional format specifier, but this gives the same result with only one decimal digit.

When shown on a form, the 'OptionAmount' is correctly displayed with two digits, but in the list_line function it isn't working.

Regards,

Gijs.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: LIST_LINE numeric format string

Post by customaware »

Hi Gijs,

What is the format you have of the Attribute OptionAmount in the Business Object?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Re: LIST_LINE numeric format string

Post by gijsvb »

Hi Mark,

The format of OptionAmount is 0.00 (Type= Number)

Regards,

Gijs.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: LIST_LINE numeric format string

Post by ACDC »

Try this:
Object.Number,#0.0
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Re: LIST_LINE numeric format string

Post by gijsvb »

Hi,

Thank you for response, but it's not a solution. Still the same effect, only one decimal digit.

Regards,

Gijs.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: LIST_LINE numeric format string

Post by Jaymer »

will it accept a function?

'CodeAGF',AS_STRING(OptionAmount)
instead of
'CodeAGF','OptionAmount'

if so, then you can do
AS_NUMBER(AS_STRING(OptionAmount),'#.##')
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: LIST_LINE numeric format string

Post by tford »

I was thinking the same as Jaymer. If it won't accept, of course you could take a similar approach by creating another attribute & using Jaymer's rule to populate the new attribute.
Tom - V8.8 build 3137 - MySql / PostGres
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Re: LIST_LINE numeric format string

Post by gijsvb »

Hi,

LIST_LINE doesn't accept functions as a parameter it seems, I get the message:
com.bas.shared.ruleparser.ParseException Invalid parameter identifying attribute name in LIST_LINE function

Thanks for your response however.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
Post Reply