![]() |
|
||||||||||||
|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
I need to compare the account number. When the account number changes I need to reset a counter. but I dont recall the IF statement when it comes to the dealing with the same field.
/VAR_PGCNTB 0 SETVAR The counter is tied to a 3of9 barcode we are using. Here is the SETVAR for the account number /VAR_1B RECORD 36 10 GETINTV BSTRIP SETVAR |
|||
|
If you have the latest version check out the new PREV_fieldname and NEXT_fieldname commands in Readme.txt under \vide\xgf. They look at the previous or next record in your data.
|
||||
|
I am using version 7 w/sp2. I will take a look. Thanks for the quick response.
|
||||
|
I have replaced
/VAR_PGCNTB 0 SETVAR with IF VAR_1B PREV_VAR_1B ne {/VAR_PGCNTB 0 SETVAR} ENDIF and for some reason it doesn't like the PREV_VAR_1B in the if statement. Is there something missing in the readme file? 2. Enhancements ============ PREV_name NEXT_name The PREV_ and NEXT_ prefixes provide built-in access to the previous or next values of any database field (inside a DBM) or table variable (inside a FOREACH loop). When there is no previous or next value a special value (**none**) is returned. Examples of usage: IF CustomerID PREV_CustomerID ne { ... action on CustomerID change ... } ENDIF IF NEXT_CustomerID (**none**) eq { ... action on last record ... } ENDIF Here is a pic of what version I am running. This message has been edited. Last edited by: TimS, ff.jpg (40 KB, 3 downloads) Free Flow Version |
||||
|
The PREV_ and NEXT_ look at a previous or next database field. So if RECORD is your data field:
IF PREV_RECORD RECORD ne { /VAR_PGCNTB 0 SETVAR } ENDIF |
||||
|
I know what it does. What I am saying is FF is not recognizing it.
According to the readme file PREV_ is coded as IF VAR_1B PREV_VAR_1B ne {/VAR_PGCNTB 0 SETVAR} ENDIF I have switched the two around just in case the readme was wrong. IF PREV_VAR_1B VAR_1B ne {/VAR_PGCNTB 0 SETVAR} ENDIF Both had the same error which I have attached. ff2.jpg (47 KB, 3 downloads) |
||||
|
VAR_1B is a variable not a data field.
|
||||
|
darwill is correct. The PREV_ and NEXT_ prefixes can only be applied to a database field (or a table variable in FOREACH).
You have only one database field which is RECORD so only PREV_RECORD and NEXT_RECORD will be recognized. You need to set a VAR_1B_PREV variable out of PREV_RECORD:
/VAR_1B RECORD 36 10 GETINTV BSTRIP SETVAR % account number from current record
/VAR_1B_PREV PREV_RECORD 36 10 GETINTV BSTRIP SETVAR % account number from previous record
IF VAR_1B VAR_1B_PREV ne
{ /VAR_PGCNTB 0 SETVAR }
ENDIF
|
||||
|
I have added the VAR_1B_PREV variable and free flow is not reporting any error. However when I submit the job to Originator I get this error.
0 0 0 Distill < Error: undefined; OffendingCommand: PREV_RECORD >. Flushing: rest of job (to end-of-file) will be ignored ExternalCommand on page 1 : Warning: PostScript error. No PDF file produced. I am wondering if this is due to the fact that I am running v7 for Free Flow and v6 for PDF Originator. Would this cause the problem. I have sent this question to my analyst. We will see who gets back to me first. This message has been edited. Last edited by: TimS, |
||||
|
I have confirmed with my analyst that older version of originator is the cause. We are working on getting originator up to the same software level as FF.
Just to add that the solution jbouche provided did the trick. Thanks again. |
||||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

