|
wheelman Novice
Joined: 30 Jan 2006 Posts: 41
|
Posted: Thu Dec 13, 2007 9:07 pm
#While combined with #IF |
Code: |
#T+ Identify;c 'identify' %1;#DBFIRST;#WHILE (!%null(%rec)) {#IF (@EquipName=&Name) {@EquipExist = 1;#DBNEXT}}
#IF (@EquipExist = "") {RecordAdd} {#T- Identify} |
Does anyone know what's wrong with this? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Dec 13, 2007 9:11 pm |
To start with it is doing all the database stuff before your triggers have a chance to capture an identify information. Beyond that I don't see much wrong.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Thu Dec 13, 2007 9:14 pm |
First line of the #WHILE loop you have @equipexist = 1. I'm guessing it should be equipexist = 1 (the syntax was more lax in zmud)
Code: |
#T+ Identify
c 'identify' %1
#DBFIRST
#WHILE (!%null( %rec)) {#IF (@EquipName=&Name) {
EquipExist = 1
#DBNEXT
}}
#IF (@EquipExist = "") {RecordAdd} {#T- Identify} |
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
wheelman Novice
Joined: 30 Jan 2006 Posts: 41
|
Posted: Fri Dec 14, 2007 12:47 am |
I'm getting an error of unmatched braces, but I don't see any that aren't matched.
Edit: Nevermind got it. |
|
|
|
|
|