Form text item truncate

Hi,
My form emp has to show the employee names in a single text field, using this
select query
SELECT dept,
RTRIM
(XMLAGG (XMLELEMENT (e, emp_name || ',')).EXTRACT ('//text()'),
) emp_name
FROM emp
GROUP BY dept;
multiple records are now coming in single text field but my "emp_name" data type is varchar2(150) so in form
in getting emp_name text field have records in this format
" Andrew "Big gap",roger"Big gap" ,John"Big Gap",fletcher
i guess this problem becoz of the data type length, how to truncate this length in forms text field?
Edited by: Veekay on 07/02/2011 09:41 م

Hi
i believe u r using the right function as u can see here
http://techonthenet.com/oracle/functions/rtrim.php
rtrim('tech '); would return 'tech' if i got ur problem then may be ur data length property of ur the text item if u minimize the spaces of displasying ur data
guess this problem becoz of the data type lengthyesss, i guess this too :)
Hope this helps
Regards,
Abdetu...

Similar Messages

  • Copy a Forms text item? [Solved]

    In Forms 10g is there any way for a user to highlight a text item and do a Windows copy to clipboard function without navigating to the text item?
    Turns out that the form in question had the mouse disabled and only the keyboard was allowed.
    Message was edited by:
    [email protected]

    When you highlight text you have to use the mouse or keyboard cursor to select the desired text in the item. If you don't navigate to the item to select the text, how is Forms suppose to know what item to use to get the text? You can't select text from an item unless you make it the current item.
    What are you trying to do that wants you to highlight text without navigating to the item containing the text?

  • How to make form text item nullable?

    I created an Apex form using wizard.
    It had a text item which was not null column in database. Now I made the column nullable in database.
    However, in Apex form, it still refuses to accept any null value in that text item.
    Where do I need to change in form to make it nullable?
    Thanx

    Hi,
    Has the wizard created a not null validation for the column that was originally not null. Check validations and remove the entry.
    Regards
    Paul

  • Form text item initial value not taking effect

    Hello,
    Sorry for the simple question, but I'm at a loss.
    I'm trying to present a system date on my form using $$DATE$$ as the initial value of a text item. The form will not display it. Am I running up against a bug, or is there a block setting that might be getting in the way? Possibly an OAS issue? The item is in a control block, and the form is insanely simple. It makes use of menu as well.
    Any help is appreciated,
    Jim

    I tried setting the initial value to $$DATE$$ in a control block item in Forms 10g (9.0.4), and it worked fine. I think the online help is referring to creating a record in a block (not the database), which happens in a control block as well as a base table block.
    Not sure what version of Forms you are using, but in the unlikely chance that you're still on 6.0, there are some bugs (1046279, 2970983) filed on 6.0 about the initial value not displaying when the text item is subclassed from an object library. If that's what you're experiencing, you should be able to fix it by upgrading to 6i.

  • Dynamic Page truncating html form text item

    I have created a dynamic page that displays the system date on a form. When the
    page displays, the date truncates after the space or comma. ie.
    instead of displaying "Monday, December 30" it displays "Monday". If i remove
    the comma or spaces from the format, it will display ok. Is there some type of
    URL encoding I need to to.
    <FORM action="stars3.star_portal.process_student_att" method="post">
    <TABLE border="0" cellspacing=0 cellpadding=2>
    <TR BGCOLOR="#000063">
    <ORACLE>
    BEGIN
    htp.p('<TD ALIGN="CENTER"><FONT COLOR="WHITE">' );
    htp.p('<input type="text" name="T1" size="30" value=' ||
    to_char(sysdate,'Day, Month DD') || '>' || '</FONT></TD>');
    END;
    </ORACLE>
    </TR>
    </TABLE>
    </FORM>

    Hi,
    Yes, it is an encoding problem. You can make use of htp.formText to overcome this. The spaces and commas are interpreted properly with formText.
    Here is an example.
    <ORACLE>
    declare
    l_date varchar2(100);
    BEGIN
    select to_char(sysdate,'Month, Day, DD') dt
    into l_date
    from dual;
    htp.p(l_date);
    htp.p('<TD ALIGN="CENTER"><FONT COLOR="WHITE">' );
    htp.formText(cname => 'T1',
    cvalue => l_date,
    csize => 30,
    cmaxlength => 30);
    END;
    </ORACLE>
    Thanks,
    Sharmila

  • Using jar to change functionality of forms text item: possible?

    Hii..I'm using Oracle Forms 10g Rel 1 and DB 10g with AS 10g. The requirement is to have a text field that is able to format text like word processor (e.g. MS Word) and must support image drag drop facility. To facilitate all these, I have written a executable jar. It works fine when run standalone, but I cannot implement it in the forms.
    I am successfully using oracle rollover button, getclientinfo, and other jars. But none of them have a main method. Can anybody give me any clue how can i implement this in the form?

    Hii..I'm using Oracle Forms 10g Rel 1 and DB 10g with AS 10g. The requirement is to have a text field that is able to format text like word processor (e.g. MS Word) and must support image drag drop facility. To facilitate all these, I have written a executable jar. It works fine when run standalone, but I cannot implement it in the forms.
    I am successfully using oracle rollover button, getclientinfo, and other jars. But none of them have a main method. Can anybody give me any clue how can i implement this in the form?
    My another question is that is it possible or not to initialise my jar file in the orcale form without packaging my class file ? E.g.
    //Not available packag in my java code
    //package oracle.demos.......
    class
    that means i have no package.

  • Read a barcode(including line feeds) into text item

    When I scan a bar code from a text item, I am unable to retrieve line feeds that are in a barcode. I need line feeds to retrieve various values encoded in the barcode. When I scan the same code on a notepad, I get output in multi-lines. But, oracle forms is removing the line feeds when I scan barcode in a text item. Please advice. Forms Version is 10g

    It gave me output of 10.
    Original string looks like this with control charactes <LF> and <CR>.
    @<LF><CR>ansi 636049030002dl00410466zn05070057dldcabcde<LF>dcbbcdefjklmw
    I have to get hold of <LF> character because it is used as delimiter for data values in barcode. But, when I scan it in oracle forms item, it is not reading <LF> character. Based on what you suggested, using dump and ascii, it ilooks like it is reading carriage return <CR> as CHR(10) and not <LF>. There is one more <LF> in the string and forms text item is not recognizing it. Dump output is shown below:
    @,^J,A,N,S,I, ,6,3,6,0,4,9,0,3,0,0,0,2,D,L,0,0,4,1,0,4,6,6,Z,N,0,5,0,7,0,0,5,7,D,L,D,C,A,B,C,D,E,D,C,B,B,C,D,E,F,J,K,L,M,W,
    Thanks

  • Is it possible to intialize a text item with Global Variable

    Hi,
    I have forms10g, I want to initialize text item with current hour for this purpose I have defined one global variable and initialize text item(for hour) with this global variable.
    Defination of global variable
    :GLOBAL.my_var := TO_CHAR(sysdate,'hh24');
    Initial Value of form text item as
    :Global.my_var
    but when I run the form it raise error " ORA-01403 no data found " error
    I already check this global variable intialize properly with the current hour.
    Thanks and Regards.
    Khawar

    Hi Francois,
    Thanks for reply, but when I removed initial value property of text item from Global variable to other or Null form starts running, I have one Poplist and it populate with a procedure at form startup I remove it but no success.
    Thanks and regards.
    Khawar

  • How to populate sequence in a text item in a form

    I have a text item in a form.I want that the doc_id i.e the text item should be automatically populated with the help of sequence.I have created sequence named seq_doc_id.on which trigger i should write the code so that everytime the doc_id gets incremented by one. What should be the code.Can anyone gv me some hint.Do i have to use the loop for this?Please help

    Hi,
    I implemented a when-new-block-instance that does just that,
    however due to navigation problems the trigger fires when it should not
    the result is I got holes in the sequence.
    Is there a system variable status to check with an If test
    to make sure the sequence is called only at inserting time?

  • Forms (V10G) - RunTime Text  Item -- Editor

    Hello:
    What are the available options to enhance forms runtime SYSTEM/DEFAULT editor for Text Items? We like to add spell checker, text format features in to field editor.
    I am sure there are Java based editors out there that Forms could invoke. I am hoping I am not the fist one with this requirement and someone may have done this. Perhaps could provide some input.
    Forms V 10G. (This posting is NOT about PL/SQL editor in Developer)
    Thanks

    Hello,
    You can use Webutil.You can call MS Word checkspell function.
    Check this:
    http://sheikyerbouti.developpez.com/webutil-docs/fichiers/Webutil_store_edit_docs.pdf
    Cheers,
    Suresh

  • How to find the ID of the text item of the column in an tabular form

    Hello,
    I have created a tabular form report on emp table and made ONE OF THE COLUMN department_id as an text item using APEX_ITEM.TEXT APIs.
    My select query is
    select
    "EMPLOYEE_ID",
    "EMPLOYEE_ID" EMPLOYEE_ID_DISPLAY,
    "FIRST_NAME",
    "LAST_NAME",
    "HIRE_DATE",
    "JOB_ID",
    "SALARY",
    "MANAGER_ID",
    APEX_ITEM.TEXT(3,department_id,20,50,'readonly=true') department_id
    from "#OWNER#"."OEHR_EMPLOYEES"
    now how can i find the item ID?
    one more thing is that how would i reference this item in an javascript function.
    anyone plz help me out with this.
    thanks.

    Hi,
    Firstly, your link must include "this" to ensure that any javascript knows which link has been clicked. So, change:
    onclick="javascript:report();"to
    onclick="javascript:report(this);"Next, your javascript code must take this value and find the related DEPTNO item on the same row. The URL must pass to the popup page the name of the ID that needs to be updated - this is held in the f10 variable in the following script. This means that you popup page must be able to receive this value so that it can use it to update the DEPTNO item when a value is selected. Your popup page seems to be page number 4, so I will assume that you have a P4_ITEM_ID hidden item on that page for this purpose. So, the javascript on the main page would be something like:
    function report(x)
    var f10;
    var p = x.parentNode;
    while (p.tagName != "TR")
      p = p.parentNode;
    var inputs = p.getElementsByTagName("INPUT");
    var zz;
    for (zz = 0; zz < inputs.length; zz++)
      if (inputs[zz].name = 'f10')
       f01 = inputs[zz].id;
    var url;
    url = 'f?p=&APP_ID.:4:&APP_SESSION.::::P4_ITEM_ID:' + f10;
    var w = open(url,"winLov","Scrollbars=1,resizable=1,width=450,height=600");
    if (w.opener == null)
       w.opener = self;
    w.focus();
    }So, when the user clicks a link, the report() function is called and the object clicked is passed as a parameter. The script then starts from this object and goes up to the TR tag that the link is on. From here, it finds all INPUT items and then looks at those to find one that has a name attribute of "f10". When it finds it, it stores the ID of that in the "f10" variable. It then constructs a URL using this variable which is set into the P4_ITEM_ID hidden item on the popup page.
    I don't know what your javascript is on the popup, but it would need to get the value out of P4_ITEM_ID to see which main page item needs updating. This could be something like:
    function passBack(val)
      var id = $v('P4_ITEM_ID');
      opener.document.getElementById(id).value = val;
      window.close();
    }This script looks in the P4_ITEM_ID hidden item and gets its value - this will be the ID of the item to update on the main page. It then does the update and closes the popup.
    Andy

  • Display Hint Text in Oracle Forms 6i at Text Item

    Dear all seniors
    I want to show Hint text at Text Item in Oracle Forms 6i.
    when my cursor Focus goes at that item. I mean when I go with Tab key or Enter button then it show display text.
    even though my mouse is not on that item.
    please how it would be possible
    thanks.
    G.Y

    Please create a display_item(for eg. Disp_Mess) just below the text field (For eg:-MyField) where you want to show hint. And then assighn Hint text to "DISP_MESS" in NEW-FORM-INSTANCE or at Initial value. Then create a PRE-TEXT-ITEM and POST-TEXT-ITEM trigger for MyField.
    -- PRE-TEXT-ITEM trigger write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_TRUE);
    --POST-TEXT-ITEM write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_FALSE);
    It will work for you.
    Regards
    Ahamed Rafeeque Cherkala

  • How to make list item as text item  in oracle forms 6i

    Hello all,
    I created one form with one list item named "Country".. This list item shows country name for the particular employee in the employee table.I created this list item as database field. In the enter query mode i search an employee , This should act as item text.. Suppose i want to add an employee in enter query mode then i fill all the necessary fields,and
    when i click "country" list item it should display all the country names from "country_tab" table..So based on the situation
    this should act as list item and item text.. Can i Do this ?.. Pls help me.

    hai Andreas Weiden,
    I simply explain my requirement:
    I want to insert data and quering data by using single form...So, I created one form with data block. This form created from employee table.I have one text item in this form named country.This is database item.
    Ok ,Now the actual problem comes.I press "Enter query" in tools menu,Then enter one employee number in employee_no field.after i press
    Execute query In tools menu. It shows all the details corresponding to that employee..
    Note: here "country" text item also shows employees country.
    Right, Now i have another requirement. In the same form I want to insert a new employee. For that
    I planed to changes country text to list item [ because when  insert i can easily pick up one country .it
    reduces typing work ] . I have another table "COUNTRY". Using this table, i should populate country list item..
    So, the country item should act as both text item [When quering] as well as list item [ When inserting ]
    Is there any idea ti do this ?
    If this not possible then what is the alternative ?
    Pls suggest me..

  • Problem in copying a text item content in forms 10.1.2 to other application

    Hi all,
    I have just upgraded my Form server 6i in Windows 2003 to to Application server 10.1.2 in Linux.
    In previos version Application Users Used to Copy some texts from other Applications like Windows NotePad or Client/server Version of Application to webforms text items or vice versa.
    In Application 10g it doesnt work. whithin the webforms we can copy and past content of texts but within Applications It doesnt wirk at all.
    we are running Forms 10.1.2 on Windows XP, using windows IE as the browser.
    Does Forms 10.1.2 use its Own clipboard?
    does anybody know any workaround to solve the problem?
    thank you in advance.
    Alireza

    Hi Mark,
    Thanks for your attention,
    I Think it's not the certification mater, because in development environment I have Stand alone OC4j installed in Windows Xp witch uses the same version of Jinitiator and copy/paste functionality works fine.
    Surprisingly when I connect to application server 10.1.2 witch is installed in Enterprise Linux from the same PC the functionality does not work.
    I cheked windows clipbord before and after running the form application from and noticed that copy/paste mechanism of form doesnt effect windows clipbord ant it somehow uses a private clipboard within itself.
    Any solution would highly be appreciated.
    Thank you in advance.
    Alireza.

  • How to call another form ,if option is entered in a text item object ???

    hi ,
    I am created an application ,where in i press a button which call another form having a menu .
    I select any one of the option from the menu ....i enter a number in the text item object of this form ....depending upon what option i have typed .....i would like to call another form ...
    My questions are
    1) Which trigger of this text item should be enabled,and what code to i write in this trigger ?
    2) Since this form is not having any database insert,delete ,update or query (select)
    it should directly go to the new form,whose option i provide in the text item .
    Sunny

    hey bro, i am assuming that ur text item contains the form name, any relevant trigger can be used for user action, like key-enter, post-change or key-next-item.
    to run a form u can use functions call_form or open_form with proper paramters.
    if u want to forward the entered text in the item, use global variable for the session.
    it doesnt matter if the form contains database items or blocks, all u have to do is run the form.
    e.g,
    declare
    VAR VARCHAR2-------;
    begin
    /* u can use the variable to concatinate or modify too, also can use global variable
    var:=:urblock.uritem;
    /* use ur own relevant parameters */
    open_form(VAR,ACTIVATE,NO_SESSION);
    exception
    when---------
    end;

Maybe you are looking for