Set property from the code...

dyn45
dyn45 Member Posts: 67
Is there any chance to set property from the code in the SourceTableView in the form?

Answers

  • kriki
    kriki Member, Moderator Posts: 9,132
    No, that is not possible.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    According to the online help the FILTERGROUP(2) shoud contain the SourceTableView property
    2 Form Used for the filtering actions that result from the SETTABLEVIEW function; from the SourceTableView property; and from the DataItemTableView property.
  • kriki
    kriki Member, Moderator Posts: 9,132
    According to the online help the FILTERGROUP(2) shoud contain the SourceTableView property
    2 Form Used for the filtering actions that result from the SETTABLEVIEW function; from the SourceTableView property; and from the DataItemTableView property.
    :oops: Didn't read the post well. I didn't see the "View" in "SourceTableView" :oops: :oops:
    Mark is right, changing filtergroups, you can change the filters in it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • dyn45
    dyn45 Member Posts: 67
    thanx,
    but to be more specific, how to set filter on OnActivateForm() on the table and how to disable the button "show all" from the toolbar which resets filters that are set in the code?
  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    To achieve this you can add code to the OnOpenForm trigger and use the FILTERGROUP to hide the filters from the users.
  • kriki
    kriki Member, Moderator Posts: 9,132
    To achieve this you can add code to the OnOpenForm trigger and use the FILTERGROUP to hide the filters from the users.
    Meaning:
    FILTERGROUP(6); // the filtergroups lower than 6 are reserved for Navision
    SETRANGE(.... // put your filters, the user may not see or change
    FILTERGROUP(0); // filtergroup 0 is the group in which the user can play
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
  • dyn45
    dyn45 Member Posts: 67
    Problem solved.
    Thanks for the help