[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

115.0. "Changing key field??" by PMROAD::HOLT () Thu Aug 18 1988 16:23

    
    Hi FOCUS gurus -
    
    Question 1 - I have a simple, one-segment database.  It lists information
    on our projects by name.  The name is the key field.  Is there any
    way to change that key field name, or do I have to delete my record
    and re-input it (say it isn't so!!!)
    
    Question 2 - I can't get through to the FOCUS hotline (617-493-1994).
    Is there a new number?  What am I doing wrong?
    
    Thanks very much, Betsy, PMRV70::HOLT
T.RTitleUserPersonal
Name
DateLines
115.1Its not so bad...OFFPLS::RYANMon Aug 22 1988 18:4834
    In FOCUS, like any database (including keyed-RMS or Rdb-with unique
    indices) which uses key values, you CANNOT change the key value since
    the key (and all its decendents) are what make the record unique. The
    beauty of using FOCUS databases is that you can tag the record and
    perform some match logic: update, delete, reject, etc.. 
    
    There are, of course, tricks which make the whole process easier.
    Without writing a program, try these steps:
    
       - Identify the record to be updated via FIDEL or TABLE
       - Use match logic to delete the record (do this behind the
         scenes by logging the messages off)
       - Put up a slave FIDEL screen which allows fields to be changed
         keeping the original key value intact (on the screen).
    
    
    You can do the same thing in TABLE/MODIFY like this:
    
    TABLE FILE X
      IF KEY_VAR EQ 1 OR 2 OR 3
    PRINT KEY_VAR
    ON TABLE HOLD
    END
    
    MODIFY FILE X
      FIXFORM FROM HOLD
    MATCH KEY_VAR
      ON MATCH DELETE
      ON NOMATCH INCLUDE
    DATA ON HOLD
    END
    
    
    -RPR-
115.2Thank you!PMROAD::HOLTTue Aug 23 1988 13:224
    
    Thanks for the help - I'll give it the ol' college try!
    
                                           Betsy