Intercept Manual Modification

BeliasBelias Member Posts: 2,998
Hi everyone, i am trying to intercept if the user modifies the record manually or if the record is modified by a process.

This is useful because i have a field "document status" which is automatically updated by some processes.
the possible values of this field are (" ", error, checked, created, posted). If the user modify the record, the status must be set back to " ", but my processes are free to change this status.
Moreover, the OnModify Trigger of the table have always to be called (both from process and from user interaction).
For this reason, i can't put the code for blanking the "document status" in the onmodify trigger of the table, because it would overwrite the value set by the process (e.g.: "Check" function set the status to Checked and then do a MODIFY(TRUE)).

I solved it putting the code for blanking the "document status" in the OnModifyRecord trigger of the page, but i was wondering if there's another way to solve it (i personally like this solution, but i was wondering if there's a different one).

Thanks in advance
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog

Answers

  • kapamaroukapamarou Member Posts: 1,152
    I'm thinking about Change log functionality if Nav.

    It monitors changes made by the user but not by code. Could this be a starting point? :-k
  • BeliasBelias Member Posts: 2,998
    1st: i've never used it :oops:
    2nd: i only need this functionality for this page...isn't the change log too much? (i repeat that i've never used it)
    Should my customer buy another granule for the change log?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • kapamaroukapamarou Member Posts: 1,152
    Belias wrote:
    1st: i've never used it :oops:
    2nd: i only need this functionality for this page...isn't the change log too much? (i repeat that i've never used it)
    Should my customer buy another granule for the change log?


    To be honest I don't know about the granule and I don't have the documents with me.

    If it were used then it would require customization to some degree...

    Look in codeuint 1 the GlobalInsert / GlobalModify triggers and the changelog objects to see how it works...
  • BeliasBelias Member Posts: 2,998
    I'll take a look (when i've some time to do R&D), thanks!
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • kapamaroukapamarou Member Posts: 1,152
    Belias wrote:
    I'll take a look (when i've some time to do R&D), thanks!

    You're welcome.

    Keep us updated with your findings if you have the time. :D
  • matttraxmatttrax Member Posts: 2,309
    If you need to know whether it was changed manually or not then put the code on the form. The Form's validate trigger should only be called when a user is actually changing the value and moves to another field. Then the table validation takes place. Usually in code the first does not happen.
Sign In or Register to comment.