Options

Filter Problem

MallyMally Member Posts: 128
I have 1 Field with Datatype DateFormula,I want to filter on that field that that field should not be blank.In other words, I want data of Table in which that(Dateformaula) field is not blank.My table is Employee I have taken Record variable EMP of Employee table.How can I filter?

Comments

  • Options
    navuser1navuser1 Member Posts: 1,329
    edited 2009-08-18
    EMP.SETFILTER(EMP.Field1,'<>%1','');

    Edit :

    EMP.SETFILTER(EMP.Field1,'<>'''''); // Thanks Garak
    Now or Never
  • Options
    MallyMally Member Posts: 128
    Its not working it gives me an error while compiling object:

    Type conversion is not possible because 1 of the operators contains an Invalid type.
    DtaeFormula := Text
  • Options
    garakgarak Member Posts: 3,263
    Try this.

    Example is based on Payment Terms.
    PaymentTerms.reset;
    PaymentTerms.setfilter("Discount Date Calculation",'<>''''');
    form.run(0,PaymentTerms);
    

    Regards
    Do you make it right, it works too!
  • Options
    MrinmayMrinmay Member Posts: 74
    hi,
    see if you don't put any value then it will return todays date. u can filter according to that.
    for filter you can try :
    Rec.SETFILTER(Rec."Field",'<>''''');
  • Options
    rranjanerprranjanerp Member Posts: 70
    "Type conversion is not possible because 1 of the operators contains an invalid type."

    Time:=Code

    THIS error comes when i try to insert a new field in the Gate entry header table.

    Actually i needed a field in the header to put the time manually , so i created field time with code ..

    where i m wrong plz suggest..now i can neither delete ,modify or even import previos object file..


    OnInsert()
    "Document Date" := WORKDATE;
    "Document Time" := TIME;
    "Posting Date" := WORKDATE;
    "Posting Time" := TIME;
    "User ID" := USERID;
    InventSetup.GET;
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,504
    rranjanerp wrote:
    OnInsert()
    "Document Date" := WORKDATE;
    "Document Time" := TIME;
    "Posting Date" := WORKDATE;
    "Posting Time" := TIME;
    "User ID" := USERID;
    InventSetup.GET;
    reason for error may not be from here.
    please activate the debugger and find the place exactly..

    to be sure, is USER ID field added by you?
    If yes, what is the datatype of field?
  • Options
    rranjanerprranjanerp Member Posts: 70
    Hi mohana,

    How can i display system time on the form Gate entry just after i press F3 for new entry.
    i HAVE TWO Fields named Posting Time where i want to display current system time . other field is TIME : WHICH NEEDS TO BE FILLED MANUALLY at the time of taking gross , tare weight.
    i have taken the data type of posting time as time.& 2ND ONE AS coDE.

    BUT AUTOMATICALLY TIME IS NOT DISPLAYED AT THE POSTING TIME FIELD. AS POSTING DATE IS DISPLAYED ..

    I HAVE SET POSTING DATE = DOCUMENT DATE.

    can i use timenow() function?? how?
  • Options
    rranjanerprranjanerp Member Posts: 70
    hi ,
    thanks . problem was solved after i renamed the second field &

    put this code in on validate trigger:

    "Posting Time" := TIME;
Sign In or Register to comment.