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
#57211 - 09/03/19 02:30 PM Data manipulation via PresTalk
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 400
Loc: Home
Hi, can someone help me to manipulate my data before printing.

I need to check the value of @(50,1,4) if it's = '0001' or '0002'

If it's true then, I need to change the value of @(100,1,4) to blank = ' '

below PressTalk is not working:

if(trim(@(50,1,10))= '0001')
stringreplace(@(100,1,10),'','')
endif()


This way I can skip the blank data and wrapping will work accordingly!


or if this can be done with run scrip in the workflow that also could work for me.
I need help please.

THANKS


Edited by Sami786 (09/03/19 02:57 PM)
_________________________
Peace

Top
#57221 - 09/10/19 08:31 AM Re: Data manipulation via PresTalk [Re: Sami786]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
You can't change the actual data, you can simply elect to skip it if a certain condition is met.
For instance, you could use code similar to this:
Code:
  &myValue:=@(100,1,10)
  if( not(pos('0001',&myValue)>0) and not(pos('0002',&myValue)>0) )
    show(&myValue)
    crlf()
  endif()

The code extracts the value from the data and stores it in a variable called &myValue. It then checks if it contains either 0001 or 0002 and if it does not, it prints it.

You'll have to adapt the code to suit your needs, obviously.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#57222 - 09/10/19 10:37 AM Re: Data manipulation via PresTalk [Re: Sami786]
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 400
Loc: Home
Thank you
_________________________
Peace

Top