Alpha Video Training
Results 1 to 4 of 4

Thread: Action Scripts

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

    Default Action Scripts

    I've now read the books but I still cannot get into the scripts, which is very frustrating as I am only trying to mimic the scripts from the A4V6 version of the database I am working on.
    Does anyone know of a User Group over here in the UK?

    Perhaps to get me started could someone show me how to do the following:

    if "Field1" is blank then set "Field2" to blank
    if "Field1" contains a value then use a lookup table to find value for "Field2".

    if "Field1" contains a value set "C3" to "W".

    This is really bugging me. I have all the sets,tables and forms setup, I have a Database of 390,000 entries ready to go. I just cant seem to get the hang of this.

    Someone please help, otherwise I will have to go back to Alpha 4 V6 which would be a shame as Alpha 5 has so much more to offer.

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Action Scripts

    Set up field rules for field2:

    case(isblank("field1"),"") blanks field2 when field1 is blank (assumes field2 is character, "" could be 0 for number, {} for date)

    not experienced with lookups

    case(isnotblank("field1"),c3="W")

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

    Default RE: Action Scripts

    Thanks Stan, I'll gie that a try. :)

  4. #4
    Member
    Real Name
    Richard Drabik
    Join Date
    Apr 2000
    Posts
    136

    Default RE: Action Scripts

    Graham,

    Under field rules, Lookup tab, there is the option to use a conditional table lookup. Have you taken a look at that?

    Again in Field Rules, if your field is a calculated field, you might also try

    IF(Isnotblank("Field1"),Lookup expression,Alternative entry)

    Since we don't know what you want to look up and where, and also don't know what goes in the field if Field1 is blank, I can't be more specific. Sorry.

    There are several forms of lookup functions (see the the Xbasic manual or the help file), each depending on the conditions you need to make the correct lookup. You may have to read the explanation for each carefully to understand them and to determine which parameters must be enclosed in quotes. I know I do. I have a printed copy of the manual heavily laden with notes in the section detailing the lookup functions.

    If you get stuck, you can post your expression on this board and someone will help you with it.

    Good luck.

Similar Threads

  1. Action Scripts Not Deleting?
    By Mike O'Connor in forum Alpha Five Version 5
    Replies: 1
    Last Post: 12-27-2003, 07:00 AM
  2. Maximum # of Action Scripts
    By Alan Lucas in forum Alpha Five Version 5
    Replies: 7
    Last Post: 06-30-2003, 03:17 PM
  3. Action Scripts
    By Birol Gezici in forum Code Archive
    Replies: 1
    Last Post: 04-28-2002, 03:44 PM
  4. Action Scripts
    By Bernard Rolfes in forum Alpha Five Versions 2 and 3
    Replies: 1
    Last Post: 01-07-2002, 05:22 PM
  5. ACTION SCRIPTS
    By Noble Bell in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-03-2000, 09:59 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
  •