Skip to Content
avatar image
Former Member

Validation expression help

Hi All,

I have requirement like having two fields

Status(Lookup) and Date (Literal Date)

Business rules as follows

1) If "Status" = "Draft" then Date value should be equals to 09/09/9999

2) If "Status" <> "Draft" then Date value should not be equals to 09/09/9999

I tried with validation Expression Has_Any_Values, but no use.

Can any one please help me on this....

Thanks

Anil

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Sep 17, 2010 at 01:29 PM

    Hi Anil,

    You can use the below expression in your Assignment:

    IF(HAS_ALL_VALUES(Status.[RECORD],Draft),"09/09/9999",''enter the second date here")

    Assignment Field = Date Field

    Note: Validation will not assign a value to the field. need to use Assignment for it

    Get the value Draft from the option "Lookups" in the expression box.

    Thanks,

    Priti

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Anil,

      IF(Status.Name Not equals to "Draft", LEFT(Date, 4) Not equals to "9999" AND MID(Date,6,2) Not equals to "09" AND MID(Date,9,2) Not equals to "09"),

      In the above condition use OR operator instead of AND operator in between conditions.

      Thanks,

      Narendra

  • Sep 17, 2010 at 12:47 PM

    Anil,

    Your second business rule is not clear... please can you explain again.. thanks

    ~ Shiv

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 20, 2010 at 10:31 AM

    I found the solution...

    Thank you All...

    Add comment
    10|10000 characters needed characters exceeded