Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
my rule is that if a record for a certain day (say, 12.8.2013 which is 41498 in number format) is already contained in the field NumericDate, no further action needs to be done. If the record is not contained, some calculations should be done.
The problem is that the IF is not working like it should [that is, if I created it correctly]: the qvd Testi1 contains the value of the variable (=41498) in the NumericDate-field. Still, the screen captures (left showing execution of the statement and right showing that the condition of the IF did not work as expected because execution went into ELSE-part) indicate that something is wrong.
Can someone think of an error in the IF-statement?
Any help appreciated,
Juho
Hi Juho,
- the parameters of Exists are Fieldname and Expression and noth should be in single quotes.
So in your case try similar to this:
IF (Exists('MyDateField', '$(MyVar)')) then
TRACE Heureka;
ENDIF;
Regards
Roland
Hi Juho,
- the parameters of Exists are Fieldname and Expression and noth should be in single quotes.
So in your case try similar to this:
IF (Exists('MyDateField', '$(MyVar)')) then
TRACE Heureka;
ENDIF;
Regards
Roland
A better look at your script, tells me that, you are using the order of the parameters in the EXISTS function wrong. Try:
If( exists (NumericDate, '$(vDateOfReload')) Then
Roland and Tres, the IF now works thanks to you!
I actually tried to use
IF (Exists(MyDateField, '$(MyVar)'))
before beginning this discussion, but I could not figure out that both parameters should be inside single quotes.