BusinessObjects Board

Ability to search on criteria in prompts

Hi,
I have the requirement such that the user should have the ability to search a customer based on two criteria:
->Begins with
->Contain

Please help me in using this criteria in prompts…

If i choose Begins with, I should be able to enter either cust name or cust number but not both.
Similarly, if i choose contains then should be able to enter cust name or cust number but not both.

Any help or logic in achieving this will be greatly appreciated…


tsr_bo (BOB member since 2008-06-13)

Did you try using wild card character *? I didn’t get your other question. But to search for a customer that begins with AB, you can search for AB* and that contains AB, you can search AB. Does that help?


Jansi :india: (BOB member since 2008-05-12)

Jhansi, Thanks for the reply.

I did try with wild cards but i think it will not work for my issue. I will explain with an example…

Object i am trying to search is a combination of both cust name and cust number.
For example: ABC-1234 is the object i need to search, if i use begins with to search on cust name then i can say AB*,this is fine, but to search on cust number that begins with then i should give 12* and this will not work as the object is ABC-1234. So, it should have capability to search either on cust name or number…

Hope this helps…

Thank you all for helping me.


tsr_bo (BOB member since 2008-06-13)

If I understand your requirement (which I am not sure I really do) then you can’t use begins with for searching inside the string, it means searching for cust number.

So better not using your concatenated object for searching but use 2 individuals objects (cust name and cust number) instead.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Marek, Thanks for the reply.

I thought of using two individual objects for search criteria but the issue here is how can i make user to choose search criteria on Cust name or cust number?

I mean, user should select which object to search on…either cust name or cust number…

Please let me if there is any logic to get this…

Thank you again for the help.


tsr_bo (BOB member since 2008-06-13)

Dear tsr_bo,
A quick work around solution comes to my mind as of now goes as follows. Please see whether it resolves your issue till we get any other most preferrable solution.

I have assumed here that you are open to use two different prompts though you explained about one concatenated prompt at the beginning.

[list]-- Create two different prompts for CUST NAME and CUST NUMBER
– To implement (Or better saying INCLUDING) “All” values (Or you can name it as “NoSearch”) for LOV of both the prompts (Cust Name and Cust Number)
– Educate users to choose “ALL” (“NoSearch”)values in the prompt LOV of CUST NAME, while user is interested to search through CUST NUMBER and vice versa.[/list]

Please let us know whether it resolves your issue or if you have any confusion on the above resolution.

All The Best!!


adhow (BOB member since 2006-08-08)

Create the whole logic of the condition as a predefined filter in the universe. Users will then just drag&drop the condition into the query filters panel.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Adhow, Thanks for the reply…

Can you please tell me how to do step 2?
– To implement (Or better saying INCLUDING) “All” values (Or you can name it as “NoSearch”) for LOV of both the prompts (Cust Name and Cust Number)

Thanks a lot for the help.


tsr_bo (BOB member since 2008-06-13)

Dear TSR_BO,

There are multiple links available in this forum already explaining the process of including “ALL” values,
You may refer the following link for same:
[list]https://bobj-board.org/t/15227/2
https://bobj-board.org/t/15227/9[/list]
I am just giving you a quick summary of same as below:

  1. Create a universe object for CustName prompt
    Sample code for Cust Name prompt:
@Select(Class Name\Cust Name) IN 
@Prompt('CustName','A', ‘Class Name\CustName’, Multi,Free,Not_Persistent) or 'NoSearchRequired' in @Prompt('CustName','A', ‘Class Name\Cust Name’,Multi,Free,,Not_Persistent)
  1. Include ‘NoSearchRequired’ values in the LOV of Cust Name object as follows:
    [list]-- Click on the Cust Name object in universe
    – Press the SQL button in the query panel of the LOV
    – Add the phrase UNION SELECT ‘NoSearchRequired’ FROM DUAL. Final SQL code for LOV would be like:
SELECT Cust Name from <Table> UNION SELECT NoSearchRequired' from DUAL

– Please check the “Do not generate SQL before running” checkbox.[/list]
3. Please repeat the steps 1& 2 for Cust Number too with required changes in code as per cust Number

Please let us know if you face any issues.

All The Best!!


adhow (BOB member since 2006-08-08)

Also if you want, you can try the below method , for me it worked -


aniketp :uk: (BOB member since 2007-10-05)

Thanks a lot, Adhow & Aniket.

I will try to implement your logic.


tsr_bo (BOB member since 2008-06-13)