How to populate USERNAME into a text field [SOLVED]

Hi all,
Forms 10g(10.1.2.0.2), Windows XP
In my form I have 2 blocks.
Block 1 with only one item, where we enter some value and hit enter(this will navigate to block2 and execute the query).
Block 2(tabular) will fetch the records. Now this block2 have 3 columns(caseid, userid, date).
Now when I insert a new record, I just need to enter the caseid only. And userid and date have to be automatically populated.
I'm able to populate date by setting Initial Value property to *$$DATETIME$$* for the date column.
And I tried many ways to populate USERNAME into userid column without any success.
I tired something like this
In *When-New-Item-Instance*
if :System.Cursor_Item is null then
     :BLOCK2.userid := Get_Application_Property(USERNAME);
else
     null;
end if;
/*In this case, I can navigate to to the last recrord w/o any changes in the fetced records
and while inserting the new record, USERNAME doesn't populate.*/
In *When-New-Record-Instance*
declare
     v_dummy varchar2(15) := null;
begin
     v_dummy := nvl(:system.cursor_value, null);
     Copy(to_char(v_dummy), :System.Cursor_Item);
     if :System.Cursor_Item is null then
          Copy(null, :System.Cursor_Item);
          :BLOCK2.userid := Get_Application_Property(USERNAME);
     else
          null;
     end if;
end;
/* Nothing populates into the userid item while inserting new record */Any help please...

Hi Ammad,
It is populating number 73 (which is not my username) into the field.
And when I changed it to :BLOCK2.userid:=GET_APPLICATION_PROPERTY('USERNAME');
I get FRM-40735 WHEN-CREATE-RECORD trigger raised unhandled exception ORA-06502
Also when the new record is inserting, the user shouldn't be able to edit userid and date fields. But this is also not working...
Edited by: Charan on Sep 20, 2011 11:26 AM

Similar Messages

  • Populate Username on a text field in seeded page

    Is it possible to populate some of the text fields in a seeded page with the username who is logged in and accessing the page.
    Harshad

    Hi Harshad,
    Extend the controller and in the processRequest method write this code-->
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String userName = pageContext.getUserName();
    OAMessageStyledTextBean bean = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("ButtonID*");
    System.out.println("Setting ViewAttr of CoverageVO");
    bean.setValue(pageContext,userName);
    *-->Button Id which you have created through personalization.
    Also attach this extended controller through personalization.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to put cursor in a text field

    hi,
    I have a text field in my jsf page.By default I want to put the cursor into this text field.when a letter is entered into this text field,the data table below this text field must change depending upon the value entered into the text field.After this change also,the cursor must be in the same text field.
    how it is possible.
    when I entered any letter in this field,there is a call to the server.the cursor must be in that textfield after the call.

    Use DOM+JS.
    With element.focus() you can set the focus on the desired element.
    With the 'onkeypress' attribute you can execute some piece of Javascript on every key press, for example submitting the form or doing an AJAX request.

  • How to populate values for a new field in target infoprovider

    Hi Experts,
    am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case,  i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
    Thank you,
    Chitra.
    Edited by: Chitra_BI on Jun 13, 2011 10:23 AM

    Debug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
    Regards,
    Lalit Mohan Gupta.

  • How to use CrossReference and DVM in ODI &how to populate data into Xref

    Can any one tell how to use Domain Value Maps and Cross Referencing in ODI?
    DVM or Domain Value Map are created and used in ESB console of SOA suite.
    My actual requirement is as follows:
    The below steps describe loading data from ERP Application 1 to ERP Application 2.
    1. The Source Application ERP APP1, populates the interface table using their native technology.
    2. A job scheduler invokes the Source side ODI Package.
    3. ODI then extracts the data from Source Interface table and populates the Target Interface table.
    4. After populating the Target interface table the ODI populates the X-ref table with App 1 ID and generated common ID.
    5. The ODI either deletes or updates the rows that were processed from the Source interface table.
    6. On the Target Application ERP APP2, the native application extracts data from target interface table and populates target database there by generating ERP Application 2 ID.
    7. A job scheduler on the Target application invokes the ODI package to populate the Application 2 ID onto the Xref table matching on the Common ID.
    I just want to know :
    1. How to populate data into the Xref table from Source datastore
    2. And if data is successfully laoded from target datastore to actual base table of target then how to populate the target id into the cross reference table.

    can anyone suggest me some answer, then it would be of great help?

  • Is there a way to import data from a specific text field in a PDF form directly into a text field in a different PDF?

    I know you can import form data from an .fdf file. Is there a way to import a specific value from that .fdf file into a text field in a separate pdf form?

    So I want the FDF to export every time the user saves or closes the PDF. Then I want the import to happen every time the user opens the PDF. That being said, this all has to work with Adobe Reader. If this is possible in anyway, I'd manage this would require some time of script. Any thoughts?

  • How to Add/Concatenate to a text field, values selected in a combo box

    I have a combo box form field that allows the user to select a value from a list and click on an Add button. The Add button should add/concatenate the vaue selected to a text field in order to create a list of values selected. I'm not sure how to do this using Javascript in Acrobat? I know I need to add the javascript to the Add button's Mouse Up action. Any help would be greatly appreciated. Thanks!

    Thanks so much - it works!
    >>> "Gilad D (try67)" <[email protected]> 9/25/2013 9:16 AM >>>
    Re: How to Add/Concatenate to a text field, values selected in a combo box created by Gilad D (try67) ( http://forums.adobe.com/people/try67 ) in JavaScript - View the full discussion ( http://forums.adobe.com/message/5712118#5712118 )
    Let's say the text field's name is "Text1", and the combo is called "Combo1". You can then use this code as the MouseUp script of the Add button:
    var f1 = this.getField("Text1");
    var f2 = this.getField("Combo1");
    if (f1.value=="") f1.value = f2.value;
    else f1.value = f1.value + ", " + f2.value;
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5712118#5712118
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5712118#5712118
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5712118#5712118. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in JavaScript by email ( mailto:[email protected].com ) or at Adobe Community ( http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=3286 )
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How to create pdf files with text field data

    how to create pdf files with text field data

    That looks like it should work, but it doesn't.
    I opened the PDF I had created from Word in Acrobat (X Pro). Went to File > Properties. Selected "Change Settings". I then enabled "Restrict editing...", set a password, set "Printing Allowed" to "none", "Changes Allowed" to "none", and ensured that "Enable copying of text..." was disabled.
    I saved the PDF file, closed Acrobat, opened the PDF in Reader, and I was still able to select text and graphical objects.
    I reopened the PDF in Acrobat, and the document summart still shows everything as allowed. When I click on "show details" (from File > Properties) it shows the correct settings.
    Any ideas?

  • How to create a custom shape text field?

    I have a diamond shape movieClip and I need add a text Field in the same shape format.
    Now how to create a diamond shape text field?
    Please help me!
    Thanks,
    Jafy

    there's no easy way to do that in flash.  that's an advanced task.

  • Split imported XML data into multiple text fields

    I should first describe my final project because it is very possible that I am going about this entirely wrong!
    I am trying to create an interactive PDF file which is the floor plan of our office, when you mouse over the office spaces it would popup the info for the person in that office, in fact when you click on the office space it would show additional info like computer MAC and jack numbers
    I placed the floor plan as a layer and them created a second layer with no fill/no stroke rectangles over the offices and made them buttons (office01, office02)
    I then made text fields with the info for the people, one for regular info and one for extra info (office01-data, office01-Xdata) I made these text fields buttons as well and had them "hidden until triggered"
    These info fields are all on top of one another, as in the are all the same size and in teh same location
    Then I went to the office buttons and created events "On Roll Over" "Show/Hide Buttons and Forms" and changed the visibility of the corresponding info button.
    This works like a charm!
    I hope I am clear up to this point.... my problem now is I would like to import this data both regular and extra from an excel spreadsheet or an XML file.
    That way when we get new staff or people move offices or whatever I can update the spreadsheet or XML file, rerun my InDesign file and create a new interactive PDF
    I have created the XML file
    <staffMap>
         <staff>
              <name>John Doe</name>
              <computerName<gfth56df</computerName>
              <phoneMAC>00:08:00:AB:CD:EF</phoneMAC>
         </staff>
    <staff>
              <name>John Smith</name>
              <computerName<gfth06cb</computerName>
              <phoneMAC>00:08:00:11:22:33</phoneMAC>
         </staff>
    </staffMap>
    Created a new InDesign document
    Imported the XML and placed it in a text field
    saved as a template and closed it
    Reopen and import the XML data again... and it brings it all into the text field... wonderful and useful but not what I need.
    Is it possible to import the XML data into separate test fields, or into some other separate field that I can make into a button and show/hide?
    I may end up just entering all the data directly into InDesign as I know this will work, it just does not seem like the right way to do it.
    Thanking you all in advance 

    I am still looking to get some help with this.
    I would love to know if it is not possible or any ideas at all

  • How to get the field texts from abap dictionary into screen Text fields

    Hi SapAll.
    here i have got to modify one zscreen by adding 1 more field,when i added one field in teh screen by just writng the code in program as SELECT-OPTIONS ilart FOR CAUFVD-ILART.
    but iam unable to get the field text for the text field from teh table CAUFVD.
    CAN ANY BODY HELP ME IN THIS.
    regards.
    varma

    Hi Varma,
    Even if you want to personalise the Text also you can do without checking the DICTREF checkbox. Dirctly you can give the text in the Text elements by using the Menu GOTO -> Text Elemetns -> Selection Texts.
    Regards
    Thiru

  • Query a view w/data entered into a text field populated by 2 table fields

    Hello, Looking for advise!!! I have a tabular canvas thats datablock uses a view to populate. In this canvas I have a text field that has been populated with first_name || ' ' || last_name in the database node of the property pallate column name. The text field is not in the table or view. I have created it in the data block and make it a database item. However, I would like to have the user push a search button to go into ENTER_QUERY mode then the user would enter the criteria to search on in this text field. The user would then push button to EXECUTE_QUERY. The result is I retrieve all records. I want any search criteria entered into this field to be used against the last_name field to retrieve any records equal to the search criteria entered, for example A%. Does anyone know if this is possible?

    Hi!
    You have to use PRE-QUERY trigger to compose the search criteria. Below I put an example of it. You have to have at least one item in the block wich is true database item (e.g. it has to exist in table or view on which your block is based). In the following example EMP_DESC is your non-database search item and EMP_ID is the database one.
    Declare
    Dummy VARCHAR2 (2000);
    begin
    if :EMP.EMP_DESC IS NOT NULL and :EMP.EMP_ID IS NULL
    then
    Dummy := '#IN (SELECT emp_id FROM Employees WHERE Upper (emp_first_name)||'' ''||Upper (emp_sec_name) LIKE Upper (''%'||:EMP.EMP_DESC||'%''))';
    Copy (Dummy, 'EMP.EMP_ID');
    end if;
    end;
    Thats it. Note the # sign in the first position of the Dummy assignment. This is required by forms to glue your search criteria and block's where clause. You may analize LAST_QUERY property of your block in order to understand how this work. Remember also to set the QUERY_LENGTH property of the EMP_DESC item to the value that could contain the whole Dummy string (otherwise it will give you an error and cut the mar the query).
    Hope this helps.
    Sergey.
    P.S. And set your EMP_DESC database item property to NO.

  • How to populate values into a Listbox on selection screen

    Hi All,
    Please any one let me know how to populate values (for ex.01,02 and 03) in a list box of selection screen..
    Thanks,
    Vijay

    Try this code ...
    REPORT  ZLISTBOX.
    TYPE-POOLS: VRM.
    TABLES SPFLI.
    TABLES SSCRFIELDS.
    DATA flag.
    DATA: NAME TYPE VRM_ID,
    LIST TYPE VRM_VALUES,
    VALUE LIKE LINE OF LIST.
    PARAMETERS PS_PARM LIKE SPFLI-CARRID AS LISTBOX VISIBLE LENGTH 5
    USER-COMMAND fcodex.
    data: i_spfli type spfli occurs 0 with header line.
    PARAMETERS PQ_PARAM LIKE SPFLI-connid AS LISTBOX VISIBLE LENGTH 15
    USER-COMMAND
    fcodey.
    *DS AS CHECKBOX USER-COMMAND FLAG.
    INITIALIZATION.
    NAME = 'PS_PARM'.
    DATA T TYPE I VALUE 0.
    SELECT DISTINCT carrid into corresponding fields of table i_spfli FROM
    SPFLI.
    loop at i_spfli.
    VALUE-KEY = i_spfli-CARRID.
    VALUE-TEXT = i_spfli-CARRID.
    APPEND VALUE TO LIST.
    endloop.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    AT SELECTION-SCREEN.
    if sy-ucomm eq 'FCODEX'.
    REFRESH LIST.
    CLEAR LIST.
    PQ_PARAM = ' '.
    NAME = 'PQ_PARAM'.
    SELECT * FROM SPFLI WHERE CARRID = PS_PARM.
    VALUE-KEY = SPFLI-connid.
    VALUE-TEXT = SPFLI-connid.
    APPEND VALUE TO LIST.
    ENDSELECT.
    endif.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SY-UCOMM NE 'FCODEX' OR SY-UCOMM NE 'FCODEY'.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    START-OF-SELECTION.
    clear i_spfli.
    refresh i_spfli.
    select * into table i_spfli from spfli where carrid = ps_parm and connid
    = pq_param.
    loop at i_spfli.
    WRITE: / 'CITY FROM:', I_SPFLI-CITYFROM, 'CITY TO :',I_SPFLI-CITYTO,
    'DEPARTURE TIME :', I_SPFLI-DEPTIME.
    ENDLOOP.

  • How to populate username to database table automatically

    Hi Experts,
    I have a query that   how to populate the username like in every standard table we have field called 'created by'.
    so i want to populated that field to our database automatically when user make an entry through his/her userid.
    Can anybody help me out.
    Thanks & Regards,
    Vipul

    Hi,
    I understand that you had created a Ztable and when user enters USER ID, Username should automatically get populated into that field.
    You cfan achive this by creating an ew module.
    In PAI module at Chain and ENdchain create a new module. ex : Module Cust.
    Place a breakpoint and then try to execute it. If the cursor is triggering it then you can place a pice of code in that module.
    Ex :
    types : begin of ty_usr,
                      USERID
                       USERNAME
                end of ty_usr.
    data : t_usr type standard table of ty_usr,
              wa_usr type ty_usr.
       Select USERID
                  USER NAME
                  from XYZ table
                  into table t_USR
                  where USERID =  INPUT field (UserId) filled by the user in that table.
             Then you can populate the t_usr-USERNAME into the Field of the Ztable.
              In this way, if the user just put the User id and press enter it will automatically populate the Usrename into the Field.
    This will fix the issue.

  • How to add supercripts in a text field

    How to add superscripts symbols like copyright,trademark and registered symbols in a static text field in the Livecycle designer 8.2?

    You can copy-and-paste special characters directly into a text object from a text editor such as MS Word. Alternatively, you can insert the hex character reference into the XML source for the applicable text object instance. For example, to add a copyright symbol, go to the XML Source tab and insert the reference &#x00A9; into the XML node <value><text>Foobar&#x00A9;</text></value>.
    Steve

Maybe you are looking for

  • Oracle 8i and webdb

    Been looking for a WebDB discussion group but can't find it! Having searched, found most WebDB posts are in here. Currently using Oracle8I Stanadard Edition rather than Oracle8iLite but here goes... Oracle8i and WebDB What is cheapest solution for se

  • MIGO User Exit/BADI to disable field

    Hi, I would like to disable a specific set of fields in MIGO (fields under the GOITEM structure). Is there a BADI (or user exit) I can use to implement this functionality ? Thanks.

  • RO doesn't come out of 'provisioning' state even though tasks are Completed

    I'm having an issue where I provision a user to a RO. Both System Validation and Create User (which are the only two tasks marked as Required for Completion') are ok.. and both are marked Completed but instead of the resource object changing to a 'Pr

  • Converting signature

    hi, if i want to write a signature (DSA) to a file in string , how do i extract and convert it again to a signature in byte[] ??? thank

  • Remote Desktop Web Access Administration not in menu

    I am trying to figure out why RemoteApp is working and Remote Desktop connection isn't on my very simple installation. One thing I came across is that something seems to be missing from my Remote Desktop Services menu. According to the TechNet articl