Character Counter in Siebel

One of the admirable features of Siebel is its GUI, which allows us to accomodate all the frills and fancies of user. Recently i was asked by one of my colleague to implement i-want-this type of functionality which involved character counter for TextArea field, which should display count of remaining characters which could be filled, in standard siebel eService application. After hours of hit and trial, i came up with one dirty solution.

Lets consider we need to have character counter in place for Description(Maximum 250 characters) in form applet. A basic solution is to have a control below the Description which will display the count of characters left. The document Id for Description is 's_1_1_11_1' and Counter is 's_1_2_45_1'. We can obtain the document ids by richt click on the page. Now comes the key part where we need to add logic to count the characters in Description and populate the counter. This could be accomplished by HTML Attributes property of Description control with below code:

onKeyDown="function fn(){ document.getElementById('s_1_2_45_1').value = 250 - document.getElementById('s_1_1_11_1').value.length; }setTimeout(fn,100);"

The main thing here is on every keydown we are calling a function which will set/reset the counter. Get the length of Description and populating the counter with 250 - length. The issue with this approach is that counter can't be read only. If we make Counter field read only we will not be able to access it in function. Request all siebel champions here to use their fire fighting skills and suggest any other solution.

Happy Counting!!

תגובות

  1. I found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article. https://charactercount.org

    השבמחק

הוסף רשומת תגובה

פוסטים פופולריים מהבלוג הזה

FINS Data Transfer Utilities

SBL-BPR-00191: The rowId of the active row of the primary buscomp '%1', '%2', does not match the Primary Id

Profile Attributes and Open UI