Updating Boolean Field in a Form

IrishGiri
IrishGiri Member Posts: 61
Hi all,

I have a form which shows the records from a table. Each record has a boolean tick box which the user currently has to click on to select the record for further processing. I would like a user to be able to select records from the form by <CTRL> and <SHIFT> clicking the records in a form he wants and automatically the boolean field for the selected records converts to its opposite value and I want the form to update instantaneously and show these changes. Can anybody help me out with how to code this (SETSELECTIONFILTER??)? In which trigger should I put the code? Any help would be very welcome!

Thanx

Comments

  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Setselectionfilter is your friend for this.

    What I usualy do is add a function to a menuiten and use a shortcut key for this.

    A user can then select a couple of records and press Fx.

    Good luck.
  • kine
    kine Member Posts: 12,562
    From on-line help for SETSELECTIONFILTER:
    Use this function to have the system note the records the user has selected on the form, mark those records in the table specified, and set the filter to "marked only".

    it means that on the record variable you will pass as parameter will be set filter which select just the records marked on Rec (on Form) by user. After that you can perform for example MODIFYALL(MyCheckField,TRUE) to modify the records.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.