Normal Topic Mass Update Lookup Table (Read 963 times)
bstone30
Member
*
Offline


No personal text

Posts: 28
Location: USA
Joined: Dec 16th, 2003
Mass Update Lookup Table
Jul 6th, 2004 at 8:14pm
Print Post Print Post  
How do you mass update/program an existing value in a lookup table?  I need to multiply existing entries in Table Entry Level 4 by 4% to arrive at a new monthly pay rate for each employee position.
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Mass Update Lookup Table
Reply #1 - Jul 6th, 2004 at 8:38pm
Print Post Print Post  
You many want to make a backup of the file before you do any Mass Update.  Here is a brief outline of the steps:

Open the form for the lookup table.
Retrieve all records to be Mass Updated.

Select the Mass Update tools on the Lower Left section.
Go to any field, (DO NOT USE use the Global Code section) and insert your Mass Update programming specs that should look something like this:

IF NOT @ISBLANK(Salary) THEN {
     Salary = Salary * 1.04
     }
================
You may want to save the spec for future use:
Close the Editor.
Click on Open Other Specs,  highlight Mass Update. and Click on the SaveTab/Button.  Give the specs a name and Save them.
================
Double click on Mass Update on the tree to run the Mass Update routine..

This assumes that the element name is "Salary" and you want to increase the value by 4%.  I will leave you to handle the rounding and decimal places.
===============================
Subsequent edited comment:  I have modified a reference I made to Global Code section.  Erika points out that Global Code will not run on every record in Mass Updates.


« Last Edit: Jul 6th, 2004 at 10:37pm by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Mass Update Lookup Table
Reply #2 - Jul 6th, 2004 at 8:46pm
Print Post Print Post  
You don't want to use the Global Code section. Global Code only runs once when the Mass Update first starts. It does not run for each record. Use any element other than Global Code.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
bstone30
Member
*
Offline


No personal text

Posts: 28
Location: USA
Joined: Dec 16th, 2003
Re: Mass Update Lookup Table
Reply #3 - Jul 8th, 2004 at 2:14pm
Print Post Print Post  
Ok, I updated the lookup table using the information you provided. Now, the lookup command won't lookup the revised data.  What am I doing wrong?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Mass Update Lookup Table
Reply #4 - Jul 8th, 2004 at 2:26pm
Print Post Print Post  
Quote:
Ok, I updated the lookup table using the information you provided. Now, the lookup command won't lookup the revised data.  What am I doing wrong?


If you only updated the data, there should have been no effect. However, if you renamed any of the elements or the form or the database, Lookup and @Lookup will no longer work.

The Lookup commands are only provided for backward compatibility with translated Q&A databases. They require things to be named just so, or they can't find the right stuff. There is actually no difference in Sesame between the Lookup table and the databases you build yourself. The translated Lookup table must keep its translated name, or Sesame can't tell which of the databases is "the Lookup table". Under the hood, it's just another database, which can be accessed using XLookup.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged