Alpha Video Training
Results 1 to 2 of 2

Thread: Help with "onWroteField" in a field rule

  1. #1
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    786

    Default Help with "onWroteField" in a field rule

    Hi,

    trying to embellish a table lookup:

    work_file_prod_list:MSN:OnWroteField (Using "Logging" as the lookup table)

    if work_file_prod_list->reg <> logging->reg then
    work_file_prod_list->old_id = if(isblank("work_file_prod_list->old_Id"),logging->reg,work_file_prod_list->old_id-","-logging->reg)
    end if
    after having done the lookup, I want to compare the "REG" field in both tables. If they differ I want to add the logging->Reg to the end of the work_file_prod_list->Old_Id field.
    I can get it to do what I need, but have to manually select the field and then save the record each time. Is there a way to make the field rule re-save the record?
    Last edited by Graham Wickens; 09-08-2019 at 01:43 PM.
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,618

    Default Re: Help with "onWroteField" in a field rule

    As I recall those field rules are for data entered by the user. Hence you can "manually select the field and save the record".

    I'd use the trace window, debug(1), or an msg() to see if the event is firing when you expect it to.

    I recall writing my own lookup code and calling it from a button to look like a field rule to add some additional functionality to a 'lookup'

    You may also want to use another event like a cansave or onsave.
    Last edited by Al Buchholz; 09-09-2019 at 01:55 PM.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

Similar Threads

  1. Error on executing field rule lookup: "Call was Canceled"
    By mronck in forum Alpha Five Version 11 - Desktop Applications
    Replies: 33
    Last Post: 11-26-2012, 06:30 AM
  2. "Previous values" field rule.
    By CALocklin in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 03-19-2009, 10:55 AM
  3. Field Rules "OnWroteField" events
    By enstorms in forum Alpha Five Version 9 - Desktop Applications
    Replies: 4
    Last Post: 02-02-2009, 09:12 AM
  4. Field rule lookup - select "A"; enter "X"
    By CALocklin in forum Alpha Five Version 8
    Replies: 5
    Last Post: 01-24-2008, 04:45 PM
  5. Frustrated with "Browse Layout to Display" field rule
    By smrogers in forum Alpha Five Version 7
    Replies: 3
    Last Post: 03-20-2006, 01:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •