Using Siebel Iff function without ELSE part in Applet or BC Search Spec

Let’s thing you have a requirement that if Login name is DUMMY, show only records in which name field equal to “3Com” otherwise show all the records which means you don’t want to make a filtering if Login Name is not equal to DUMMY.

You can not use “IIf” function without else part like below becasue of it is giving syntax error.

IIf((LoginName() = “DUMMY”), [Name]=”3Com”)

But you can not use “IIf” function like this below which is giving syntax error.

Instead of this you can do a trick this using “Id” column which is always not null and active.

IIf((LoginName() = “DUMMY”), [Name]=”3Com”,[Id] IS NOT NULL)

Sure, it has some performance impact but i can not find better way :( What about you?

Yayınlandı: on 5 Şubat 2009 at 8:42 pm Yorum Yapın
Tags: ,

Bu yazının geri izlemesini yapmak için URI: http://ersin.wordpress.com/2009/02/05/using-siebel-iff-function-without-else-part-in-applet-or-bc-search-spec/trackback/

Bu yazıya yapılan yorumlar için RSS beslemeleri.

Leave a Comment