Disable filter

AlkroAlkro Member Posts: 115
Is possible to disable filters in a Form.

With code, i apply one filter and i want Users can't apply other filters only in this form.

How?

:(

Answers

  • bostjanlbostjanl Member Posts: 107
    Alkro wrote:
    Is possible to disable filters in a Form.

    With code, i apply one filter and i want Users can't apply other filters only in this form.

    How?

    :(

    Use FILTERGROUP.

    FILTERGROUP(0) is standard user editable filter set.
    FILTERGROUP(2) is used for forms

    Check C/Side oniine help for more.

    Example:
    OnOpenForm:
    FILTERGROUP(2);
    // set your filter here
    FILTERGROUP(0);


    bostjanl
  • bostjanlbostjanl Member Posts: 107
    Alkro wrote:
    Is possible to disable filters in a Form.

    With code, i apply one filter and i want Users can't apply other filters only in this form.

    How?

    :(

    Whed I read your post for second time i realize, that I misread your post. :oops:

    My first answer was how to prevent user to change your filter.

    But you are asking, how to prevent user to use filters in general.

    It is not nice, but you can use OnTimer and RESET ](*,)
  • ebsoftebsoft Member Posts: 81
    Alkro wrote:
    Is possible to disable filters in a Form.

    With code, i apply one filter and i want Users can't apply other filters only in this form.

    How?

    :(

    Simply...

    put a "RESET" on OnAfterGetRecord trigger of the form! :)
    Regards,
    Federico

    MBS Specialist since NAV 2.0
    My experiences on Linkedin
  • bostjanlbostjanl Member Posts: 107
    ebsoft wrote:
    Alkro wrote:
    Is possible to disable filters in a Form.

    With code, i apply one filter and i want Users can't apply other filters only in this form.

    How?

    :(

    Simply...

    put a "RESET" on OnAfterGetRecord trigger of the form! :)

    Nice and simple =D>
  • AlkroAlkro Member Posts: 115
    Simple!

    thanks!!
  • garakgarak Member Posts: 3,263
    if you type this in OnAfterGetRecord the filter is set and the command is send to SQL Server. So the filterstatement was carried out on Server.
    Better, use the following source
    Form - OnFindRecord(Which : Text[1024]) : Boolean
    reset; //or setrange(NotAllowedFieldsToFilter);
    EXIT(FIND(Which));
    

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.