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…
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?
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…
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.
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…
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.
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.
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)
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:
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)
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