Text or Code to behave like a filter

engsiong75engsiong75 Member Posts: 143
Hi

I was trying to design a text field in a new table to behave like the filter.
1) It must have a lookup form.
2) When the user selects the data from the Lookup form, it must automatically flow to the field.
3) If I enter a & or a |, I must be able to select another row.
Ex. XXX|YYY

I am able to get the first 2 things working but I am constantly frustrated by the 3 option. I find that I cannot enter more than 1 selection from a text field with a lookup form. Does anybody have an idea how to fix this?

Thanks

Eng Siong

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    i think 3 step can be done at the time of filtering(reports etc)

    but we cannot enter values into table like a|b

    correct me if i am wrong.
  • krikikriki Member, Moderator Posts: 9,110
    Something like:
    txtFilter as text1024

    In the OnLookup-trigger on txtFilter, put this code:
    IF FORM.RUNMODAL(0,recYourTable) = ACTION::LOOKUPOK THEN BEGIN
      Text := Text + recYourTable."The Field";
      EXIT(TRUE);
    END;
    EXIT(FALSE);
    

    PS: "Text" is the parameter of the function.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • engsiong75engsiong75 Member Posts: 143
    Thank folks for all your contribution. Crack the problem myself. There is a propery called ClearOnLookup in the Text fields in the Reports and Form. If it is set to No, it will not delete the previous entries.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    David Singleton
Sign In or Register to comment.