cancel
Showing results for 
Search instead for 
Did you mean: 

One Validation Rule for multiple fields

Former Member
0 Kudos

Hi,

Is there a way to create one validation rule for all fields of the transaction or I have to create 1 rule for every field?

EXAMPLE (all string field mandatory):

EQSTR

<value field> (I have no idea how to do this from Validation Rules Panel of Transaction)

<Application.Blank>

Accepted Solutions (0)

Answers (3)

Answers (3)

sudhiranjan_lenka
Contributor
0 Kudos

Hi,

If you want to put a validation for mandatory fields, I would recommend to make it mandatory at the object level.

i.e. set the minimum length of the property of that Transaction  to 1. 

It will be more user friendly as it highlights in red.

Thanks,

Sudhir.

Former Member
0 Kudos

Hi,

You don't need to create multiple validation rules.

You can write one validation rule to check all the fields.

For example...

AND

     NOT

          EQSTR

               field1

               Blank

      NOT

          EQSTR

               field2

               Blank

Regards,

Abhishek Wajge

Former Member
0 Kudos

// Use an And to make sure all the sub checks are true

AND

// To make sure it set to a set value
- EQSTR
- - Field Name

- - <Value>

// This is a way to check to make sure the field isn't blank

- NOT
- - EQSTR

- - - Field Name

- - - <<Application.Blank>>

// Use a OR, to make sure that at least one of the conditions is true

- OR

- - EQSTR

- - - Field Name

- - - <Value 1>

- - EQSTR

- - - Field Name

- - - <Value 2>

Former Member
0 Kudos

I have a lot of field, so instead of using your solution I was thinking to use a more "dynamic" approach, like using the function SCREENFIELDNAME, SCREENFIELDVALUE or TRANSACTIONPROPERTYNAM. Do you think is this possible?

Former Member
0 Kudos

When using the SCREENFIELDNAME and SCREENFIEDLVALUE you still need to state the Screen field you want to check,