3 Replies Latest reply: Mar 21, 2018 9:31 AM by Sunny Talwar

# Required expression

Hi Community,

I have an requirement:

1. I have fields OPU, Draft 1, Draft 2, Draft 3.
2. based on this 4 fields , want do describe 5 th field "Required Result".
3. comparing to OPU , NULL Draft number requiredd to display.
4. I want to require a expression .
5. when two fields null then those both fields required to display

 OPU Draft 1 Draft 2 Draft 3 Required Result ABC 14 01 2015 05 01 2015 20 06 2015 Null PPTSB 10 03 2017 - 15 04 2017 Draft2 VPSB 20 04 2017 25 05 2017 - Draft3 PLMMSB 17 07 2017 - 25 08 2017 Draft2 PMTSB - 10 04 2017 02 04 2017 Draft1 VSKP - - 04 02 2018 Draft 1 & Draft 2

Thanks,

Ravi.

• ###### Re: Required expression

Only one of the Drafts can ever be null? If that is true, then may be this

If(Len(Trim([Draft 1])) = 0, 'Draft1',

If(Len(Trim([Draft 2])) = 0, 'Draft2',

If(Len(Trim([Draft 3])) = 0, 'Draft3', 'Null'))) as [Required Result]

• ###### Re: Required expression

Hi Sunny,

when Draft 1 , Draft 2 both null means required Result: Draft 1 & Draft 2

Thanks,

Ravi.

• ###### Re: Required expression

May be this

If(Len(Trim([Draft 1])) = 0,

If(Len(Trim([Draft 2])) = 0,

If(Len(Trim([Draft 3])) = 0, 'Draft1 & Draft2 & Draft3', 'Draft1 & Draft2'),

If(Len(Trim([Draft 3])) = 0, 'Draft1 & Draft3', 'Draft1'),

If(Len(Trim([Draft 2])) = 0,

If(Len(Trim([Draft 3])) = 0, 'Draft2 & Draft3', 'Draft2'),

If(Len(Trim([Draft 3])) = 0, 'Draft3', 'Null'))) as [Required Result]