You can't put an "equation" inside of the ifnull, you'd have to do it outside.  
So first set up a form variable
    vhigh = eqphigh in eqphigh where dotnum = dotno
 then
    vhighdisplay = (ifnull(begeqp,.vhigh,begeqp))

One thing to be careful of: if vhigh is an integer and you have Zero On, then 
it might evaluate as a zero rather than a null.  So you'd have to test both 
conditions.  And if 0 is a valid number then you have to use a GETPROPERTY 
command instead because that will distinguish between a true null and a 0

Karen


 

 

-----Original Message-----
From: Hodges, Dennis <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Fri, Jul 18, 2014 11:46 am
Subject: [RBASE-L] - Form Variable and IFNULL problem



I have a column in my table that contains the Beginning Equipment Usage 
(begeqp).  In my Edit form I want to set the begeqp to the high usage value 
(eqphigh) of the eqphigh table, otherwise I want to use the current value of 
begeqp.  I tried using IFNULL as shown below:
 
(ifnull(begeqp,eqphigh in eqphigh where dotnum eq dotno,begeqp))
And got the following error.
 
The first and last arguments for IFNULL must be the same type. )2155)
 
They are not only the same type, they are the same variable.
 
How can I do this?
 
Thanks, 
Dennis Hodges
Maintenance Management Manager
FDOT Office of Maintenance MS #52
PH: (850) 410-5635
FAX: (850) 410-5511
[email protected]
 
Please note: e-mail may be subject to public disclosure.
 


Reply via email to