ISEMPTY Return two different results

ex1720ex1720 Member Posts: 23
Hi, I'm experiencing a strange behaivour.

In one case the ReservEntryExist returns TRUE (NOT FALSE) and another FALSE (NOT TRUE). So I analized what's in NewReservEntry record with the debugger and magically, in TRUE and FALSE cases NewReservEntry has the same value.

How is possible to return (ISEMPTY) two different values(TRUE AND FALSE) with the same values in the Record evaluated (NewReservEntry)?


IF ReservEntryExist THEN
TESTFIELD("Job No.",'');



ReservEntryExist() : Boolean
ReservePurchLine.FilterReservFor(NewReservEntry,Rec);
NewReservEntry.SETRANGE("Reservation Status",NewReservEntry."Reservation Status"::Reservation,
NewReservEntry."Reservation Status"::Tracking);

EXIT(NOT NewReservEntry.ISEMPTY);

Best Answers

Answers

  • EvREvR Member Posts: 178
    ISEMPTY does not select the actual fields from SQL.
  • ex1720ex1720 Member Posts: 23
    EvR wrote: »
    ISEMPTY does not select the actual fields from SQL.

    I dont understand what do you mean .Could you explain it?.... I know ISEMPTY returns only a boolean.
  • ex1720ex1720 Member Posts: 23
    vaprog wrote: »
    ex1720 wrote: »
    in TRUE and FALSE cases NewReservEntry has the same value.
    EvR wrote: »
    ISEMPTY does not select the actual fields from SQL.

    The values of the entry does neither influence the result of the function, nor are they changed by it. What matters is filters only.

    I'm still confused, Yes, the matter is filters...okay....But the filters of the both records (when return true and return false) are not the same, but the record filtered yes. And ISEMPTY ask for the same record (with the filters of the record), so, If with this filters...the return the same record ??.

    An example attached to the explanation could be interesing.

    Thanks!!
  • Jan_VeenendaalJan_Veenendaal Member Posts: 206
    ISEMPTY simply does NOT return the record, is does NOT 'ask for a record'!
    So whatever the filters are, the content of NewReservEntry will not be changed by ISEMPTY.
    Jan Veenendaal
  • ex1720ex1720 Member Posts: 23
    edited 2017-07-06
    ISEMPTY simply does NOT return the record, is does NOT 'ask for a record'!
    So whatever the filters are, the content of NewReservEntry will not be changed by ISEMPTY.

    Sorry I thought I was been clear enough explaining myself....
    Hi, I'm experiencing a strange behaivour.

    In one case the ReservEntryExist function (EXIT(NOT NewReservEntry.ISEMPTY);) returns TRUE (NOT FALSE) and another FALSE (NOT TRUE).....
    and when the ISEMPTY evaluates the record, both has the same content (not exactly same filters).


    If not, I will reformulate the question.
  • ex1720ex1720 Member Posts: 23
    Ok, to rephrase myself:
    The content of the record that is supplied has NO effect on the result of the ISEMPTY function.
    The Filters on the record are making the difference.

    Yes. Okay, it's clear.

    Thanks.
Sign In or Register to comment.