cancel
Showing results for 
Search instead for 
Did you mean: 

formula help please

Former Member
0 Kudos

Hi All,

Simple code not working for me.

Please help.

I need suppress a section based on below condition.

if {HederDetails.transaction_type_id} <> 11

then

(

if (isnull({HederDetails.supplier_name}) or {HederDetails.supplier_name} = '' )

then  false else true

)

else true

Now the typeid =16 and suppliername= '"" .So it should hide the section.But not.

I think red color part is failing.

Please help

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Divya,

The code you've written above will suppress when the type_id <> 11 and supplier is NOT null or NOT blank.

Change the code to:

{HederDetails.transaction_type_id} <> 11

AND

(

{HederDetails.supplier_name} = "" OR isnull({HederDetails.supplier_name})

)

Also, makes sure 'Default Values for Nulls' is selected in the formula editor.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

My requirement is like this.

1st it should check typeID <> 11 .

if it is true then it should check next condition for nulls and blanks.

Please suggest

I did like this not working.

if {HederDetails.transaction_type_id} <> 11

then

(

if not isnull({HederDetails.supplier_name}) or {HederDetails.supplier_name} <> ''

then false else true

)

else true

raghavendra_hullur
Active Contributor
0 Kudos

Hi,

Check this:

if {HederDetails.transaction_type_id} <> 11

    then

    (

        if (isnull({HederDetails.supplier_name}) or {HederDetails.supplier_name} = '' )

        then  true

    )

Thanks,

Raghavendra

abhilash_kumar
Active Contributor
0 Kudos

You don't need to write an if-else logic with true false etc.

If you want to suppress the section when type_id <> 11 and when supplier_name is blank, the you can use the code I provided above along with the 'Default values' option.

If this is not the condition you're trying to suppress the section on, please provide an example when the section should be suppressed vs not suppressed.

-Abhilash

Former Member
0 Kudos

Hi Divya,

Try to interchange True and False in nested if condition.

-Mustafa

Former Member
0 Kudos

Sorry Abhialsh,

Actually I gave reverse condition.

I need to suppress the section by checking type id first then nulls .

Suppose if If type id <> 11 then it should also suppress the section.

if typeid = 11 then only it should check blanks and nulls for supplier name.If nulls are there then suppress the section

abhilash_kumar
Active Contributor
0 Kudos

This should work:

{HederDetails.transaction_type_id} <> 11


OR

(

     {HederDetails.transaction_type_id} = 11

     AND

     (

     {HederDetails.supplier_name} = "" OR isnull({HederDetails.supplier_name})

     )

)


-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thanks its working fine.Also Raghavendra's formula also working fine.Is both are same ?

Please suggest

Former Member
0 Kudos

Hi Divya,

Try this

if {HederDetails.transaction_type_id} <> 11

then True

else

(

if (isnull({HederDetails.supplier_name}) or {HederDetails.supplier_name} = '' )

then  True else False

)

The above condition will suppress type id <> 11

and also

if  typeid = 11 and supplier name is blank or null

The only lines you will get which has typeid = 11 and supplier name is not be null or blank.

-Mustafa

abhilash_kumar
Active Contributor
0 Kudos

Both are the same - just another way of coding!

-Abhilash

Former Member
0 Kudos

Hi Mustafa,

Your solution also working fine.

Thank you.

Answers (0)