IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#19998 - 09/08/06 03:13 PM bracket instead of "-"
Fluff Offline
Junior Member

Registered: 07/13/06
Posts: 14
Hi everybody,

In my data, I have variables with negative amounts where "-" is written after the amount.

ex : 100,00-$


Is this possible to insert a condition in Talk so that it replaces me it "-" by brackets?

ex : (100,00)$

Thank you for your assistance,

Fluff

Top
#19999 - 09/08/06 03:22 PM Re: bracket instead of "-"
Anonymous
Unregistered


in the advanced data selection:

Code:
 
=if(eq(pos('-',trim(@(1,1,10)),0),trim(@(1,1,10)),'('+strip('-$',trim(@(1,1,10)))+')$')
 
This line of code checks for the presence of the '-' character and reformats the string if necessary.

You can also adapt this code to make a function out of it.

Top
#20000 - 09/08/06 03:40 PM Re: bracket instead of "-"
Fluff Offline
Junior Member

Registered: 07/13/06
Posts: 14
Thanks Claude!

Top


Moderator:  cosimo, OL Newsgroup Support