QuerySave with Lotus Script

I have a hidden calendar field called ‘MExpiryDate’, this field is hidden only if the ‘MContract’ YES check box is not checked. My problem is that this calendar field must be mandatory. I want this ‘MExpiryDate’ field validation to be optional if its hidden, I need to avoid validation in this case. Here is the section of my code :

FieldsToValidate("Category") = "Format"

FieldsToValidate("Title") = "Name"

FieldsToValidate("Number of licenses") = "NumLicenses"

FieldsToValidate("Owner") = "Owner"

FieldsToValidate("Renewal Date") = "MExpiryDate"

Any help would be appreciated.

Thanks

Levi

Subject: QuerySave with Lotus Script

Since you indicated this is in the QuerySave I wrote it using Source.

I assume when you say YES is NOT checked, that is the value and it doesn’t have an alias. You said “check” which may mean this is a checkbox instead of a radio button so you may need to check all values instead of just the one value I currently assume is in there.

FieldsToValidate("Category") = "Format"

FieldsToValidate("Title") = "Name"

FieldsToValidate("Number of licenses") = "NumLicenses"

FieldsToValidate("Owner") = "Owner"

if UCase(source.FieldGetText("MContract")) <> "YES" Then

	FieldsToValidate("Renewal Date") = "MExpiryDate"

end if

Subject: RE: QuerySave with Lotus Script

Hi Stephen,

Thanks for the quick response, your answer soled my problem, works fine now.

Thanks again!:slight_smile: