home products news downloads documentation support gallery online maps resellers search
TNTmips Downloads Menu

HOME

CONTACT US

CURRENT RELEASE
  TNT 2013

DEVELOPMENT VERSION
  TNT 2014

TNTmips Pro
PRIOR RELEASES
  TNT 2012

FREE SOFTWARE
  TNTmips Free
  TNTatlas
  TNTsdk

MORE DOWNLOADS
  HASP Key Driver
  Screen Recorder
  TNT Language Kits
  Sample Geodata
  TNT Scripts

DOCUMENTATION
  TNTmips Tutorials
  Tutorial Datasets
  Technical Guides
  Scripts
  Quick Guides

MORE INFO
  Download FAQs
  FTP
  Download Managers
  Find Reseller

SITE MAP


replace_field_values.sml


# Searches the specified Table.Field for a specified value
# replaces that value with a different given value
#
vector V;
PopupMessage("Select /litedata/sf_data/HAYWSOIL/hsoils");
GetInputVector(V);
 
numeric numRecords = NumRecords(V.poly.Wildlife);     # apparently table name isn't replaceable
 
string oldName$ = "Fair";    # field value that will be replaced
string newName$ = "NewFieldName";    # field value to replace it
string fieldName$ = "Grasses_Legumes";    # variable field name
 
numeric i;
for i = 1 to numRecords  # loop through records
{
    if(V.poly.Wildlife[@i].(fieldName$)$ == oldName$) # if fieldValue found
    {
        V.poly.Wildlife[@i].(fieldName$)$ = newName$; # store new Value
    }
}

Back Home ©MicroImages, Inc. 2013 Published in the United States of America
11th Floor - Sharp Tower, 206 South 13th Street, Lincoln NE 68508-2010   USA
Business & Sales: (402)477-9554  Support: (402)477-9562  Fax: (402)477-9559
Business info@microimages.com  Support support@microimages.com  Web webmaster@microimages.com

25 March 2009

page update: 26 May 11