cancel
Showing results for 
Search instead for 
Did you mean: 

validation expression - flat tables

Former Member
0 Kudos

I have 2 flat tables:

Subdivision table and a Country table.

Goal:

if field 'Abbr IND' in Country table is set to 'Y'

then 'Subdivision Abbr' in Subdivision table should be filled.

Here is my validation expression in Subdivison table:

IF(Country[Abbr IND]="Y" AND

IS_NOT_NULL(Subdivision Abbr),TRUE)

Subdivision table has a field 'Country' defined as a Lookup[Flat] to Lookup table Country.

In the Validation Expression box under "Fields", it lets me choose the Country table.

If I run this, it tells me No Validation errors. I purposedly change the values to make it fail, but it still gives me the same message.

Any clues...

with best regards

O

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Orlando,

You do not need TRUE or Flase at all!

All you need is, IF(Country[Abbr IND]="Y",IS_NOT_NULL(Subdivision Abbr).

By saying this, you are essentially saying that if your country.abbrind is Y, then Subdivision abbreviation should NOT be null. The "TRUE' nature is implicit. It will return as soon as you enter a record that has NULL Subdivision abbreviation.

I implemented about 125 such expressions in my recent project on SP3 5.5.28.23.

Thanks

Savi

Former Member
0 Kudos

Hi Orlando,

Try:

IF(Country[Abbr IND]="Y" AND

IS_NOT_NULL(Subdivision Abbr),TRUE, FALSE)

You also need to consider when Country[Abbr IND]="N" or null, the express will return true.

So try:

IF(Country[Abbr IND]<> "Y" OR (Country[Abbr IND]="Y" AND

IS_NOT_NULL(Subdivision Abbr)),TRUE, FALSE)

Regards,

David