* Find matching field name in Data Dictionary SET EXACT OFF seekid = ALLT(formdbfs.db_name)+UPPER(ALLT(CtrlSrce)) USE datadict IN 0 SHARED SELECT datadict SET ORDER TO db_field SEEK seekid IF FOUND() * Find HelpContextID and replace its value STORE "HelpContextID =" TO gcString3 SELECT form_file ALINES(WorkArray,properties) SET EXACT OFF IF ASCAN(WorkArray,gcString3) > 0 gnPos = ASCAN(WorkArray,gcString3) HlpCntxtID = WorkArray(gnPos) HelpCntxtID = SUBSTR(HlpCntxtID,17,Len(HlpCntxtID)-16) WorkArray(gnPos) = "HelpContextID = " + ALLT(STR(datadict.help_num)) ELSE * Did not find HelpContextID in array. * Need to insert HelpContextID row after Height row in array. * Expand array by one row. * Insert HelpContextID row. * Move rest of array rows down one. STORE "Height =" TO gcString3 IF ASCAN(WorkArray,gcString3) > 0 gnPos = ASCAN(WorkArray,gcString3) Ht = WorkArray(gnPos) ***** Not sure what code goes here to make above comments happen ***** WorkArray(gnPos) = "HelpContextID = " + ALLT(STR(datadict.help_num)) ENDIF ENDIF FOR i = 1 TO ALEN(WorkArray,1) lcProperties = lcProperties + WorkArray(i)+CHR(13)+CHR(10) ENDFOR IF INT(VAL(HelpCntxtID)) <> datadict.help_num IF nAnswer2 = 6 REPLACE form_file.properties WITH lcProperties ELSE nAnswer = MESSAGEBOX("Form field HelpContextID=" + ALLT(HelpCntxtID) + ; " does not match Data Dictionary Help Number " + ALLT(STR(datadict.help_num)) + ; ". Do you want to replace it?",4+32+256,"Data Dictionary") IF nAnswer = 6 REPLACE form_file.properties WITH lcProperties ENDIF IF nAnswer2 = 0 nAnswer2 = MESSAGEBOX("Do you want to replace all HelpContextIDs from Data Dictionary?",4+32+256,"Data Dictionary") ENDIF ENDIF ENDIF ELSE MESSAGEBOX("Field " + UPPER(ALLT(CtrlSrce)) + " not found in Data Dictionary. " + ; "You may add the field later using the Form to Data Dictionary form.",64,"Data Dictionary") ENDIFI can find where to insert my line into the array, but not sure about shuffling the other array entries down one from the insertion point and how to find the end of the array without going past it causing an error. Your help is appreciated. Thanks.