+ Start a Discussion
lburnslburns 

Required Field for Date Field

I would like to make the following rule: 

 

If (addendum #) >0 (problem is that this was created as a text field; afraid I'll lose information if I change the data type) than both the following fields need to be required:

 

Date Field

Text Field

 

Thanks...

 

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

There's a couple of ways that you could approach this depending on what sort of data you have in your Addendum field.

 

You could use a formula to convert the value to a number, then evaluate it in a formula like this:

 

AND(
VALUE(Addendum) > 0,
OR(
LEN(Text) < 1,
ISNULL(Date)))

 or you could just evaluate it as a text field and check to see if it is blank

 

AND(
LEN(Addendum) > 0,
OR(
LEN(Text) < 1,
ISNULL(Date)))

 

 or if you're on EE or UE and are comfortable with the Apex Data Loader you could export the field (with Record ID to Excel, change the datatype of the field in SFDC to a number, then reload the fields using the data loader, and then evaluate it as a straight number.

 

 

 

Message Edited by Stevemo on 12-08-2009 11:07 AM

All Answers

Steve :-/Steve :-/

There's a couple of ways that you could approach this depending on what sort of data you have in your Addendum field.

 

You could use a formula to convert the value to a number, then evaluate it in a formula like this:

 

AND(
VALUE(Addendum) > 0,
OR(
LEN(Text) < 1,
ISNULL(Date)))

 or you could just evaluate it as a text field and check to see if it is blank

 

AND(
LEN(Addendum) > 0,
OR(
LEN(Text) < 1,
ISNULL(Date)))

 

 or if you're on EE or UE and are comfortable with the Apex Data Loader you could export the field (with Record ID to Excel, change the datatype of the field in SFDC to a number, then reload the fields using the data loader, and then evaluate it as a straight number.

 

 

 

Message Edited by Stevemo on 12-08-2009 11:07 AM
This was selected as the best answer
lburnslburns
thank you!