Alpha Video Training
Results 1 to 4 of 4

Thread: Action Script in Field Rules

  1. #1
    Member
    Real Name
    Blake Watson
    Join Date
    Jan 2003
    Posts
    961

    Default Action Script in Field Rules

    This may be another newbie question: In studying A5 and Xbasic I often try to get the action scripts to do what I want, or at least close to what I want so I can steal the code.

    But, in the genie, if you select Record or Field operations, the first question you're asked is on what table or browse you want to operate. This is counterintuitive to me: I generally want to perform a field or record operation on a table or set.

    But, if I'm not mistaken, this makes the action scripting nearly useless in defining Field Rule event actions. Let's say you want to do the following things every time a record in a particular table, regardless of how the record gets changed:

    1. Test if a field is blank.
    2. If it is, put a value into another field.
    3. Test if the record's changed.
    4. If it is, put a value into another field.

    So you define some field rules. Thing is, I get to the "field operations" and get the "which form" question--and there aren't any, so I can't proceed.

    Am I missing something?

  2. #2
    "Certified" Alphaholic
    Real Name
    Ohlen Cartmell
    Join Date
    Apr 2000
    Posts
    1,599

    Default RE: Action Script in Field Rules

    I believe it's a matter of context. Not every Action Script command will make sense in field rules. Hopefully, others will have more insight.

  3. #3
    Alan Anthony
    Guest

    Default RE: Action Script in Field Rules

    I am also newbie but this is what I do. I create default form containing the table or set I want to use. Then, thru action scripting, I open that table (hidden), perform whatever field changes etc. and then close that hidden form. Let me know if this is what you are referring to or want to pursue further.

    Alan

  4. #4
    Member
    Real Name
    Blake Watson
    Join Date
    Jan 2003
    Posts
    961

    Default RE: Action Script in Field Rules

    Ugh.

    Yeah, I suppose I could do it that way. Action scripting's not worth it, though. The syntax for direct access should just be:

    Table->Field = value

    But I find when I assign values that way and test in the default browse, the browse behaves oddly (jumping from the record I'm on to the first record). I had thought it was a problem with my syntax but it doesn't appear to be.

Similar Threads

  1. Alpha Five Action Script: Script Create
    By debwelch in forum Alpha Five Version 5
    Replies: 1
    Last Post: 04-30-2004, 11:35 AM
  2. Need Help with Action Script
    By Gary Phillips in forum Alpha Five Version 5
    Replies: 4
    Last Post: 04-09-2003, 09:16 AM
  3. Action Script Set Vbl???
    By russ Boehle in forum Alpha Five Version 5
    Replies: 3
    Last Post: 12-19-2002, 04:01 PM
  4. action script
    By david dickie in forum Alpha Five Version 4
    Replies: 16
    Last Post: 03-11-2002, 02:54 PM
  5. ACTion script; Value get
    By eddysol in forum Alpha Five Version 4
    Replies: 2
    Last Post: 01-14-2002, 06:21 AM

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
  •