Removing trailing spaces in eScript

26
Feb/07
6

At the moment in Siebel, there is no trim function in eScript available to remove leading spacing in a string. In Vbscript, this function is available but not in eScript. A change request has been created to add this function to eScript.
After searching in supportweb, i came acros a piece of code provided by Siebel to replace the Ltrim() function. The code looked like this:

function trim(source)
{
var beginOfString = 0;
var endOfString = 0;

for(var index = 0; index < source.length; index++)
{
if(source.charAt(index) != " ")
if(beginOfString == 0)
beginOfString = index;
else
endOfString = index;
}

return(source.substring(beginOfString, endOfString + 1));
}

At first, it looked like the code did what it had to do, remove trailing spaces. But then I noticed that when there are no leading spaces, the code also removes the first letter in the string. Since this is unacceptable, I tried to wrote my own code and it turned out to be very simple.

My code looks like this:

function trim(source)
{
while(source.charAt(0) == ” “)
{
source = source.substring(1);
}
return(source);
}

Just a few lines of code but it does the work without removing letters if they are not spaces. Feel free to use the code whenever you need it.

VN:F [1.8.2_1042]
Rating: 3.0/5 (1 vote cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Filed under: Siebel behaviour, eScript
1,492 views

Blocked after export

11
Feb/07
0

A common bug in the Siebel client is that a user gets blocked after exporting data to a csv file.

When the users chooses ‘Export’ from the menu and saves the file to the harddrive, the hourglass symbol doesn’t change back to the mouse pointer. Strangely enough this only happens when doing a save and not when you open the csv file.

The solution to this problem is very simple. To change the hourglass back to the mousepointer just use the combination ctrl+8 or ctrl+shift+8 (use the 8 on the alphanumeric part of the keyboard, not on the numeric part).

VN:F [1.8.2_1042]
Rating: 0.0/5 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Filed under: Siebel behaviour
355 views

Siebel reports and Acrobat Reader

8
Feb/07
1

On my current project, we were facing some problems with reporting. When the users try to print a report, they got the pop-up where they could select there printer and press ok to start the print job. However, the job wouldn’t start. Afterwards, if they click on the print icon in Acrobat Reader the reports gets printed.

After opening an SR on Support Web, we where told that our version of Acrobat Reader is not supported by Siebel. We are using version 7.0.1 but Siebel is only supporint version 6.0.1. Although Acrobat recently launched version 8 of there PDF read software, Siebel still supports version 6.

When asking if they know when Acrobat Reader 7.0.1 will be supported, the support guy respond to me that he couldn’t tell and that even Siebel 8 is only supporting version 6.

So if you are facing a simular problem, you best downgrade your Acrobat Reader to version 6.0 (which can be found here) or try the workaround solution. Maybe – with a lot of luck – printing reports might work with version 8, but that is still something I need to test.

VN:F [1.8.2_1042]
Rating: 0.0/5 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Filed under: Siebel behaviour
430 views

Symbolic strings

31
Jan/07
1

Since I’m still in the Siebel learning phase, everything is new to me. So today I found out something strange about symbolic strings.

I had to change the spelling of a word in the entire application. Since we used symbolic strings for this, I thought it was enough to change the symbolic string and everywhere in the application the correct spelling would be applied.

But no, apparently, you have to compile every object where you use the symbolic string. For me, this comes as a chock. I thought the purpose of symbolic strings was to simplify the use of titles and such in Siebel. But I guess I was wrong.

VN:F [1.8.2_1042]
Rating: 3.0/5 (1 vote cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Filed under: Siebel behaviour
565 views

Siebel converts special characters

20
Dec/06
0

Today I was working on the dataload from a Siebel 6 environment to a Siebel 7.8 environment. When I try to import the attachments into the new environment, I found that a lot of attachments where partially imported.

A look at the logfile learned me that those attachments could not be found. After a closer look, it seemed that all the attachment had special characters in the filename. With special characters I mean characters like é, è, à % and so on.

After comparing some of the attachments I noticed that Siebel converts these characters in other characters. So far I made this list of converts. The list is not yet complete but maybe it can be helpful:

ô –> (
é –> T
è –> F
ï –> n
û –> v
à –> a
ê –> O
î –> á
² –> ¦
ö –> ÷
ç –> t
% –> blank
€ –> Ç
’ –> Æ
« –> ½
» — > +

VN:F [1.8.2_1042]
Rating: 0.0/5 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Filed under: Siebel behaviour
456 views