In this post I am going to discuss the most trivial issue you might have ever heard in Siebel
and most of you must be aware of the solution already.
I had been facing this issue from a long time but it is so trivial never paid attention on finding the solution. Before going into detail let me tell you the problem or issue that I am talking about.
Problem:
Let me explain this problem with help of an example. I have 4 Account records with name as “Test Account”, “Test Account 1”, “Test Account 2”, “Test Account 3”.
I want to query only for “Test Account” record. Normal Siebel behavior is to return all the records (4 in this case) with similar names if we query with term Test Account.
I tried querying with term Test Account in single quote (‘Test Account’) and also in double quote (“Test Account”) but it always used to return all the 4 records.
Solution:
Then I tried lot of combination and found that will return me only one record is as following:
= “Test Account”
When I query with an equal to sign in front of the “Test Account” it returned me only one record. Siebel has same behaviour to return all the records if we query in eScript but I have not tried this solution in eScript though.
Do you guys have anything else that works for the above mentioned problem. If yes then please do share with all.



(2 votes, average: 3.50 out of 5)






You can disable trailing wildcards for the BC
There’s a system preferences setting that will turn off the automatic addition of trailing wildcards to queries — i think Siebel even recommends it is turned off for performance purposes
I guess that should fix the problem – and make you a performance hero to boot!
Neel
Hope you are searching in UI or in eScript. If it is in UI then
we can search in UI as mentioned below
LIKE ‘Test Account’
There is one more option. We can use field name and value of field. But this option can only be used by developers as user don’t know the field name of corresponding list column and control
for eg:- [Type] = ‘NE_ATTR_PROD’
In case of escript we can use following way
bc.SetSearchSpec(“Type”, “‘” + “NE_ATTR_PROD” + “‘”);
This searchSpec will give the record which has type equal to NE_ATTR_PROD and not the records which has type NE_ATTR_PROD1 or NE_ATTR_PROD2
The Exact setting for disabling the above mentioned behaviour is:
AutomaticTrailingWildcards = FALSE
to be put in [InfraUIFramework] section of cfg in Siebel 8.0 and in [SWE] section in Sibel 7.8 and below
Hi Neel,
I had tried the same “Query” Operation through eScript.
But through escript, it is only returing one record.so there is no problem through escript.
Try using Query Assistant where Account Name is equal to “”.
Normal Query returns where it exists and Query assistant returns if it is exact.
You can use “Use Literal For Like”= TRUE, at the field level user property
if you don’t want to play with the “AutomaticTrailingWildcards” and “Use Literal For Like”, you must use SetSearchExpr instead of SetSearchspec:
bc.SetSearchExpr(“[Type] = ‘NE_ATTR_PROD’”);
No worries about the eScript queries, Neel. Although the query behavior from the UI is based on the AutomaticTrailingWildcards parameter, buscomp.SetSearchSpec in eScript assumes you want to do a literal search by default.
It’ll be smart about it and check for other hints like keywords (e.g. AND, OR) and special characters (e.g. quote, asterisk). In the absence of those, SetSearchSpec will do always do a simple literal search.
I Heard one of the bug in siebel,my friend also raised in support web regarding this……….
You can try this BC level solution
This user property allows you to disable automatic trailing wildcards in queries on a field-by-field basis.
Value – List of fields separated by commas.
Usage
To disable automatic trailing wildcards for individual fields, add this user property to the appropriate business component, with the value being a comma-separated list of fields. For example:
* Name: Disable Automatic Trailing Wildcard Field List
* Value: First Name, Last Name
Sushil
wonderful tips,thanks
Any where we can able to configure.
Hi All, I know its an old article but still hoping for a reply. I have set the “AutomaticTrailingWildcards = FALSE” in the appropriate cfg file, and all SQL queries generated while querying by first name, last name do not have the * as the trailing character which is good. But when I query for Home Phone #, the query generated is 1233456789* though I query for 1233456789. Which mean the parameter AutomaticTrailingWildcards is not applied for phone numbers. Any suggestion or approach is appreciated.
Thanks in Advance.