Dropdown field Validation quesion for a web application

I have dropdown field which contain Location names. The requirement that came to me recently is Location Names need to be modified ,deleted and add new.

Adding new location names is not a problem

But deletion or changing the field names is effecting already existing documents:

What is the effecct:

When I try to save the existing document its asking to enter the value for location field(because the exisiting name is no longer there as its modified to new one or deleted).

Here is the java script code for validation:

function CheckKeyword(fieldname, fieldtitle)

{

if(fieldname.selectedIndex==0)

{

	alert("Field '" + fieldtitle + "' is required. Please select a value.");

	//fieldname.select();

	fieldname.focus();

	return true;

}

else

{

	return false;  

}

}

What can I do in order to delete the location names or changing the location names?

Subject: Dropdown field Validation quesion for a web application

I don’t think the validation is the problem here;Just change the formula for the dropdown:

If a new documant: Your current formula

If existing document: Lookup all locations from all existing docs (@Unique-ed)

HTH,

Simeon

Subject: RE: Dropdown field Validation quesion for a web application

Hi SimeonThank yiu very much for u r reply. This idea didn’t came to my mind. Thanks for the suggestion. After progrmmed for so many years I g=forgot the basics!!!

Viswa.