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
#56211 - 08/08/18 03:38 AM Counter for identical Data
fwenger Offline
OL Newbie

Registered: 08/08/18
Posts: 1
Im looking for a expression, that increments a counter, if a datafield dont change.
For example, my table has a ID and a Value:
ID Value
15 xy
15 zt
15 ou
17 ff
17 ds

The counter should count the identical IDs and looks like this:
1/3
2/3
3/3
1/2
2/2

I read already about a macro in topic "[Macro] Check if data in a field changes", but there is no code inside. Also i read about a Expression IF(CHANGED([ID]),... but that Keyword dont want work in my PSM 6.1.1.

Is there any way to do that without a Excel-handling?

Top
#56214 - 08/09/18 11:02 AM Re: Counter for identical Data [Re: fwenger]
Sander vd Berg Offline
OL Expert

Registered: 06/10/08
Posts: 207
Loc: Objectif Lune NL
I think CHANGED only works in PSM 7.

You could write a macro for PSM 6 that would give you the "1" part of "1/3", but unfortunately I can't think of any way to get the "3" part of "1/3". You can look back to what you encountered before, but there is no way to look ahead.

Top
#56215 - 08/09/18 11:20 AM Re: Counter for identical Data [Re: fwenger]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
You could try to read your Excel sheet from an ODBC driver as a database and while you are extracting, use SQL to gather the number of each similar ID and add this as a new field that will be used as X of 1/X.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top