locked
Concatentate two fields, Lookup and Normal Field RRS feed

  • Question

  • I have 2 fields I want to concatenate into one field.

    Field 1: Abreviation (This is a lookup field)

    Field 2: Name (This is a normal text field)

    and I want to put the results into Field 3: UASI

    I tried to combine two pieces of code two different ways without luck receiving an error message stating "crmForm"is undefined

    Here are the two pieces of code I attempted to use:

    var lookupItemAbrevID = new Array;
    lookupItemAbrevID = crmForm.all.new_abreviationid.DataValue;
    var vlookupItemAbrevID= (lookupItemAbrevID[0] != null) ? lookupItemAbrevID[0].name : "";
    var lookupItemUrbanArea = crmForm.new_name.DataValue; 
    CrmForm.all.new_uasi.DataValue = vlookupItemAbrevID + ", " + lookupItemUrbanArea;
    
    ----------And I tried:
    
    
    var lookupItemAbrevID = new Array;
    lookupItemAbrevID = crmForm.all.new_abreviationid.DataValue;
    var vlookupItemAbrevID= (lookupItemAbrevID[0] != null) ? lookupItemAbrevID[0].name : "";
    CrmForm.all.new_uasi.DataValue = vlookupItemAbrevID + ", " + crmForm.new_name.DataValue;
    
    
    
    

     

    What am I messing up here?

    Thursday, August 5, 2010 3:30 PM

Answers

All replies