Windows USERNAME in Adobe Form?

I am creating a form in LiveCycle. I would like to capture the windows username of the form creator. The following javascript works, but not embedded in my Adobe form. Any advice? Thanks for the help.
var ws = WScript.CreateObject("WScript.Shell");
var un = ws.ExpandEnvironmentStrings("%USERNAME%");
TextField1.rawValue=un;

The folder level JavaScript can be:
// folder level JavaScript to allow access to the identity object properties
// application variable to hold the properties of the identity object
var Identity = new Array();
// loop through the properties of the identity object
for (i in identity) {
// place each property of the identity object into an element of the same name in the Identity array
Identity[i] = identity[i];
LiveCycle Designer JavaScripts run on client to access the elements of the Identity array or the properties of the identity object:
// loginName:
$.rawValue = Identity.loginName;
// name:
$.rawValue = Identity.name;
// corporation:
$.rawValue = Identity.corporation;
// e-mail:
$.rawValue = Identity.email;
Acrobat Forms JavaScripts to access the elements of the Identity array or the properties of the identity object:
// loginName:
event.value = Identity.loginName;
// name:
event.value = Identity.name;
// corporation:
event.value = Identity.corporation;
// e-mail:
event.value = Identity.email;

Similar Messages

  • Hiding a window in the adobe form

    Hello all,
    I have maintained a counter in the program I_CLASS....iF i_class is space I need to hide a window in the adobe form....can any one tell me the process to do it. we have tried a script to hide it...
    if ( $.I_CLASS.rawValue == "X" ) then
    $.Send_invoice.Street.presence == "INVISIBLE"
    endif
    It is not working...I have taken all fields in the window to a sub form and the aain the main window in to an another sub form...I have moved the i_class counter to this main sub form...then I have tried the given script....Can any one suggest me any solution for this....................Thanks in advance

    Hi,
    You have code in Formcalc scripting language, if its ok for you try the below java script code on formready event of I_Class.
    Send_invoice.Street.presence = (I_CLASS.rawValue == "" || I_CLASS.rawValue == null) ? "hidden" : "visible";
    make sure you are referencing street & I_Class with the correct heirarchy paths often this was the mistake most people do.
    have a try and let me know for any queries ...
    Cheers,
    Sai.

  • Hiding Windows, fields in adobe forms

    Hello,
    I am new to adobe forms and presently working on one requirement.
    My form got 3 pages, on first page i have one table. i) If the table contains only one row i have to hide the entire page.
    ii) On the second page i have Po details and on third page I have SO and FI details. If the tables for PO, SO or FI are empty i need to hide the windows.
    iii) Current Page/ total Page no : This field needs to be displayed from second page and once the form repeats for another input value these two needs to be initialized and start counting based on the data extension to multiple pages. Presently printing starting from 1st page.
    I have all the flags First_page_flag, Second_page_flag, third_page_so and third_page_Fi flags controlled from print program and are available in the context menu but not on the LAYOUT.
    I also tried the following code to hide the page but it didn't work out: (Initialize)
    var pdisplay = xfa.resolveNode("Table_PO[*]");
    if(pdisplay.value == NULL)
    pdisplay.presence = "hidden";
    I could able to hide the windows, subforms and fields with out the flag check via java scripting.
    this.presence = "hidden"; but don't know how to use these flags in script editor to hide all these.
    Can any one help me to achieve these functionalities for which i will be so thankful to you.
    Best Regards,
    Naresh.

    Hi Vibhav, Hi Aravind,
    I closed my layout and run the program. But still getting the same error.
    For Tables in PAGE 2 and PAGE 3
    Anyways I could able to hide the TABLES (Sub forms - Page 2 & 3) now by including and hiding the flags(WV_SDISPLAY, WV_FDISPLAY) in the respective subforms. I have used the following JAVA scripting to achieve this in initialization event:
    if(this.WV_SDISPLAY.rawValue = "X")      
    this.presence = "hidden".
    For PAGE hide:
    But, in my requirement i have to hide the FIRST PAGE and not the TABLE, if the table(subform) containes one row. I set a flag wv_idisplay in the program. Now if i include this flag under this table and follow the same JAVA scripting mentioned above it is not working.  
    if(this.WV_IDISPLAY.rawValue = "X")
    this.presence = "hidden".
    Also, from some of the threads and by the comments of Gold Otto, I could understand that, to hide a Master page, i need to put the condition on it's associated subform and i am proceeding with this logic. 
    Could you please help me if this is not the correct approach. Also, request you to send me some sample Java Script to hide a PAGE.
    Thank You,
    Regards,
    Naresh.

  • Adobe Form in Modal Window

    Hi all,
    I am displaying an Adobe Form in a pop up modal window. The display type of the Adobe form is native. However when the popup window shows up, the adobe form is not shown properly.
    There is no problem if i set the displayType of the adobe form on the view as ActiveX. However there is a constraint that the displayType should be native.
    Has anyone encountered such problem before?

    Only in popups, in SP19 forms were displayed in popups in firefox and IE, in SP21 only in IE. I know about this note, but in SP19 everything was working OK, so I think on SP21 should this popup functionality remain :). Or what is the reason to remove this functionality for firefox in SP21?
    Many thanks for reply

  • How to close the adobe forms in popup windows once.

    hi,expert..
    i show a adobe form in a popup windows in my webdynpro program...but i find out that i at least click twice on the "CLOSE" button on the right top of the window.....how can i modify my program to  close the window once..
    the original codes are as follow:
    method onactionprint .
       data lo_nd_zhrhap_vp_app_01 type ref to if_wd_context_node.
      data lo_nd_zhrhap_t_document type ref to if_wd_context_node.
      data lt_zhrhap_t_document type wd_this->elements_zhrhap_t_document.
      lo_nd_zhrhap_vp_app_01 = wd_context->get_child_node( name =
    wd_this->wdctx_zhrhap_vp_app_01 ).
      lo_nd_zhrhap_t_document = lo_nd_zhrhap_vp_app_01->get_child_node(
    name = wd_this->wdctx_zhrhap_t_document ).
      lo_nd_zhrhap_t_document->get_static_attributes_table(
        importing
          table = lt_zhrhap_t_document ).
    DATA lo_nd_zhrhap_s_app_leader TYPE REF TO if_wd_context_node.
    DATA lo_el_zhrhap_s_app_leader TYPE REF TO if_wd_context_element.
       data ls_zhrhap_s_app_leader type
    wd_this->element_zhrhap_s_app_leader.
    lo_nd_zhrhap_s_app_leader = lo_nd_zhrhap_vp_app_01->get_child_node(
    *name = wd_this->wdctx_zhrhap_s_app_leader ).
    lo_el_zhrhap_s_app_leader = lo_nd_zhrhap_s_app_leader->get_element(
    lo_el_zhrhap_s_app_leader->get_static_attributes(
       IMPORTING
         static_attributes = ls_zhrhap_s_app_leader ).
    DATA lo_nd_zhrhap_s_dates TYPE REF TO if_wd_context_node.
    DATA lo_el_zhrhap_s_dates TYPE REF TO if_wd_context_element.
       data ls_zhrhap_s_dates type wd_this->element_zhrhap_s_dates.
    lo_nd_zhrhap_s_dates = lo_nd_zhrhap_vp_app_01->get_child_node( name
    *= wd_this->wdctx_zhrhap_s_dates ).
    lo_el_zhrhap_s_dates = lo_nd_zhrhap_s_dates->get_element(  ).
    lo_el_zhrhap_s_dates->get_static_attributes(
       IMPORTING
         static_attributes = ls_zhrhap_s_dates ).
    采集表名称和日期
      data lo_nd_if_data type ref to if_wd_context_node.
      data lo_el_if_data type ref to if_wd_context_element.
      data ls_if_data type wd_this->element_if_data.
      lo_nd_if_data = wd_context->get_child_node( name =
    wd_this->wdctx_if_data ).
      lo_el_if_data = lo_nd_if_data->get_element(  ).
      lo_el_if_data->get_static_attributes(
        importing
          static_attributes = ls_if_data ).
      ls_zhrhap_s_dates-valid_begda = ls_if_data-begda.
      ls_zhrhap_s_dates-valid_endda = ls_if_data-endda.
    DATA lo_el_zhrhap_vp_app_01 TYPE REF TO if_wd_context_element.
       data ls_zhrhap_vp_app_01 type wd_this->element_zhrhap_vp_app_01.
       data lv_description like ls_zhrhap_vp_app_01-description.
    lo_el_zhrhap_vp_app_01 = lo_nd_zhrhap_vp_app_01->get_element(  ).
    lo_el_zhrhap_vp_app_01->get_attribute(
       EXPORTING
         name =  `DESCRIPTION`
       IMPORTING
         value = lv_description ).
    REPLACE ALL OCCURRENCES OF '类别:' in lv_description with ''.
      lv_description = ls_if_data-stext.
      data l_is_ok    type boole_d.
      data pdf_source type xstring.
      data l_msg      type ref to cl_hrpa_message_list.
      create object l_msg.
      call method zcl_hr_appraisal_utility=>print_contract_direct
        exporting
        form_type           = 'COD'
          zhrhap_t_document   = lt_zhrhap_t_document
          zhrhap_s_dates      = ls_zhrhap_s_dates
          zhrhap_s_app_leader = ls_zhrhap_s_app_leader
          description         = lv_description
        job_description     =
          message_handler     = l_msg
         importing
          is_ok               = l_is_ok
          pdf_xstring         = pdf_source
      check l_is_ok is not initial and pdf_source is not initial.
      data lo_nd_pdf type ref to if_wd_context_node.
      data lo_el_pdf type ref to if_wd_context_element.
      data ls_pdf type wd_this->element_pdf.
      data lv_source like ls_pdf-source.
      lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
      lo_el_pdf = lo_nd_pdf->get_element(  ).
      lo_el_pdf->set_attribute(
        exporting
          name =  `SOURCE`
          value = pdf_source ).
    *-->ADOBE View embeded to ViewContainer UI
      data: lr_view               type ref to if_wd_view_controller,
            lr_api_main           type ref to if_wd_component,
            lr_window_man         type ref to if_wd_window_manager,
            comp_usage            type ref to if_wd_component_usage,
            l_title               type string value '打印合同',
            lr_window             type ref to if_wd_window.
      lr_view = wd_this->wd_get_api( ).
      lr_api_main = wd_comp_controller->wd_get_api( ).
      lr_window_man = lr_api_main->get_window_manager( ).
    l_title = wd_colr_mp_controller->model->get_text( '006' ).
      call method lr_window_man->create_window
        exporting
          modal        = abap_true
          window_name  = 'POPUP'
          title        = l_title
          button_kind  = if_wd_window=>co_buttons_yesno
         message_type = if_wd_window=>co_msg_type_none
          default_button = if_wd_window=>co_button_yes
        receiving
          window       = lr_window.
      lr_window->open( ).
    endmethod.
    looking forward to your help....thanks in advance

    Ping,
    1st, see the Markup formatting options over on the right part of the screen - if you wrap your code between the code tags it will read MUCH better.
    2nd, I can't replicate this issue - we have several PDFs opening in new windows & we only need to click once on the clost 'X' - how are you calling the PDF in a new window?
    If you can't find a final resolution, an alternative would be to place a LinktoAction on your web dynpro application somewhere that makes sense which would close the window for you.
    We do this on Sucess Message Views...
    You can simply add the link to action to the screen, and in the event handler use
       data : l_view_cntr type ref to if_wd_view_controller,
           l_win_cntr  type ref to if_wd_window_controller,
           l_window    type ref to if_wd_window,
           l_parameter_list  type wdr_event_parameter_list,
           l_parameter       type   wdr_event_parameter,
           l_val type ref to data.
    field-symbols <fs> type any.
    l_view_cntr = wd_this->wd_get_api( ).
    l_win_cntr  = l_view_cntr->get_embedding_window_ctlr( ).
    l_parameter-name = 'CLOSE_WINDOW'.
    create data l_val type c.
    assign l_val->* to <fs>.
    <fs> = 'X'.
    l_parameter-value = l_val.
    insert l_parameter into table l_parameter_list.
    l_win_cntr->if_wd_view_controller~fire_plug(
    exporting plug_name = 'EXIT_PLUG'
               parameters = l_parameter_list ).
    Make sure you have an Exit plug on your Window with Plug Type EXIT.

  • Adobe form window disappears

    Hi,
    I am using Adobe form, webservices with Javascript.
    I am using simple javascript like xfa.host.messageBox and looping on response objects. I have 2 buttons on Adobe form with many input fields/dropdowns & Listboxes.
    The form first displayed one input field and a Search button, after input isprovided and click on Button, it normally shows 2 xfa.host.messageBox
    messages and then fetches the response from webserivce and displays the rest of the form.
    The issue is that when click on the button and move open another IE/other application window, later when I want to see the result in form, the window doesnt appear.
    When I open the Task Manager, the form is there, so I select the Form and click on "Switch to" to open the form and work further. My user will not want to have such a scenario.
    Please advice as what can be done.
    Thanks in advance for your advise
    Regards
    Karthika

    Hi Experts
    Need your help.
    Please reply with your suggestions.
    Thanks

  • Adobe form opened in separete window

    Hi all
    We developed an AWD application which contains an Interactive form element.
    When we execute the application via SAP GUI (Right click -> Test on application) everything is OK and the adobe form appears embedded in the browser.
    If we copy the path of application and paste it on address bar of browser (if we don't execute it via SAP GUI) the adobe section of screen will open in separate window (won't be embedded into the application).
    Please advice.
    Thanks in advance

    Hi...
    It means, when we test the application, it is displaying adobe in new window.
    Form GUI if you test, it will create one window, and displays the same in that window.
    And the same application if you paste it in other browser window, internally it will again trigger one window, in that window it will display the adobe.
    Hope you understand a bit concept at least . 
    Am unable to explain clearly with words.
    Regards
    Srinivas

  • Adobe Form - Change default Window measurement Configuration

    Hi All
    I 'm a new in SAP and am learning how to use Adobe Form (I know a bit about SmartForm but M manager wants me to write report using Adobe Form) and I need help.
    I'd like to know how to change the default setting of the window measurent from inches to mm. At the moment, all my window dimensions are in inches - and i don't know how to switch them to mm - Please tell me how - Thanks

    I found it

  • Adobe forms: Displaying work area data in different windows

    Hi,
    I have a requirement of showing work area data in different windows i.e work area which has sent from program needs to come in different windows of the form. I have created a smartform which will perfectly doing the above logic. The above work area also contains amount fields. I am also passing language 'English' or 'French', based on this i am displaying some texts also.
    But Client wants to see the same requirement in Adobe forms. Ao i am new to Adobe forms, I need some help for performing the above scenario. I am doing my research on this. But i want to know the steps which will not reduce the performance.
    In smartform, first window contains personnel no from work area and the second window contains address from work area. Then i have created a template with employee premium amount column, company premium amount column and total of that, all these from work area. So work area will contain only one row which i have to show in different window and on template.
    In Adobe forms, How can i do the same this which i have done in smart forms.
    Please suggest me any one in doing this. I appreciate your answers.
    Thanks,
    s.vikgnesh

    Hi,
    Yes as Santoosh said there is no such wiondow option in Adobe forms.
    But if you use webdynpro java/Abap we can acheive this.
    think something like this below, if it works.
    have 2 views 1st for the adobe form, 2nd view in a new window for the work area screen.
    in the adobe view have a button for the work area and respective event handler.
    in the event handler call this window, and then reload the same adobe form.
    if from the work area form if you need value to be passed to this adobe form. have a event handler for this.
    when purpose is done, close that window and set value to the required context field on the form. and reload that adobe form.
    this is a fuzzy process and time consuming, unless business has no other option we dont go this approach.
    but for sure this works, we did the same for a EHS process.
    Cheers,
    Sai

  • Activating Full window size Adobe forms

    Hi, We are implementing ESS/MSS. Most of the Adobe Interactive Forms are opening in Small windows. But We need them to be pop-up in full size so something similar. I could not find any direct settings related to it. Anyone has an idea of how to do it?
    Thanks in Advance

    Hi,
    Note 1143512 is what causes the small window.  The way to get back the full window to view your Adobe Forms is to Load the Web Dynpro ABAP component HRASR00_PROCESS_EXECUTE in the Web Dynpro Explorer of transaction SE80.   Then click on "asr_form_display" under Web Dynpro Applications,and change the parameter "DISABLE_ADOBE_RESIZING" from blank to "X".  Do the same thing for "asr_process_execute". 
    This will give you your full window back. The only problem is that this then gives you multiple verticle scroll bars.  Pick your poison.

  • Getting Windows Username In A Page

    Hello,
    I am currently developing an application that requires to know the Windows username, these are generic and will be used as a terminal. I was wondering if it is possible to get this information? I know I can use javascript and a active x control but I don't really want to go down that route.
    Our technology stack is:
    Apex 4.2.2.00.11
    Apex Listener 2
    Oracle 10g, 10.2.0.4.0
    Thanks,
    Paul.

    Here's a barebones script that you can call from a script in your form to retrieve the login name of the user:
    // Folder-level JavaScript function
    var getLoginName = app.trustedFunction(
        function () {
            // Get and return the user's login name
            app.beginPriv();
            return identity.loginName;
            app.EndPriv();
    This needs to be included in a JavaScript file that's installed in the correct location. It's just a text file, so you can create/edit it with a text editor, but make sure the extension is ".js". For more information about how to determine where to place the file, see: http://acrobatusers.com/tutorials/2006/folder_level_scripts
    More information on all of this is in the Acrobat JavaScript reference: http://www.adobe.com/devnet/acrobat/javascript.html
    To populate a text field with the login name, do something like:
    // Populate field with loginName
    getField("text1").value = getLoginName();
    Change "text1" with the actual name of the field in your form. You can place this code in a document-level JavaScript so it executes when the form is opened.
    Note that all of this code is the bare minimum, and you may want to expand it to check for errors, etc.

  • Error When Activate Adobe Form?

    hi,
              When i save layout and come out from there and than when i am save adobe form and trying to activate form it ask me in the dialog window,
    Enter your user name and ID
    Resource     AdobeDocumentServices/Con
    User name   
    Password
    if i enter my logon id & pwd it shows me status message,
    SOAP Framework Error ; SOAP Runtime Error : CSoapExceptionTransport : HTTP Send returned with status code (100,101).
    Please try to resolve and get back to me ..
    Thanks,
    Saurin Shah

    Hi,
    Please check below link
    http://help.sap.com/saphelp_nw70/helpdata/EN/4f/a00d41921bf023e10000000a155106/content.htm
    Regards
    Jana

  • Displaying Adobe Form through CRM WEB UI

    Hi Experts,
    Currently I am working on CRM Technical which is very new to me. I've got a requirement to display the Adobe form through CRM WEB UI. The requirement is like this.
    In a screen of WEB UI there is a option of OUTPUT preview. When i select the specific billing document and when i click on OUTPUT Preview tab it should display the Adobe Form which was developed in SAP GUI using txn SFP. I have done some R&D on it and i found that an ACTION Profile need to be created for this kind of requirements. But in my research i found only Smartforms can be displayed using the ACTION point.. Could anyone help me out how to display the Adobe Form using the Action......
    Regards,
    Aarthi.
    Moderator message: please have a look in the dedicated forum for "Adobe Interactive Forms".
    Edited by: Thomas Zloch on Jan 11, 2011 1:51 PM

    Hi Robert,
    I came across this post after implementing the same solution.  It works fine for me in SAPgui, i.e. it creates an entry in the spool which I can priview or print, but when I use the webUI it just opens a new window with a white background and the message 'Error in smartform'.
    Nitin, did you manage to come up with any solution?  Or did this work for you?
    Regards,
    Simon

  • Communication problem between Adobe Form and WebDynpro

    Hi all,
    I have the following problem and am thankful for any help I can get from you in order to solve it:
    I created an Adobe Form in WebDynpro. In both the WebDynpro as well as in the Adobe Form, I created a Submit Button (which I binded to the same method) as well as a text field (which I binded to the same context attribute). When I do changes in WebDynpro, everything works fine and the changes are displayed in the Adobe Form as well.
    But when I do changes in the Adobe Form, these changes are not submitted. Also the Submit button in the Adobe Form is not working.
    I send the project to a colleague and she could deploy and run my project without any problems. So I think it is a problem with my settings or installation. I already did a reinstallation of the NW Developer Studio as well as the Adobe Lifecycle Designer. But it did not help.
    Did anyone have a similar problem or has a suggestions what else I could do?
    Thanks in advance,
    Thorsten

    Hi Thorsten,
    If the submit button doesn't do anything, it usually means there's something wrong with your client software.
    Are you using NW04s or NW04? NW04 only supports ACF (Active Component Framework) forms, whereas NW04s also supports ZCI (Zero Client Installation) forms (there're different Submit buttons in Adobe LiveCycle Designer). Reader 7.0.9 should definitely work in all cases, but Reader 8.0 (and Reader 8.1, released yesterday) doesn't work properly with ACF forms (there's an SAP note on this subject).
    To use ZCI forms, all you need is Adobe Reader at client side. To use ACF forms, you also need some other client software: either (the correct version!) SAP Active Component Framework (stand alone software that you can download from SAP Marketplace; it's part of some SAP note; search for xACF and select the correct version of the note). A better option is not to install xACF manually (uninstall it if present, using Control Panel > Add/Remove programs), but to use the ActiveX control instead (reinstall it in your case because of the problem you have). First kill the AcroRd32.exe process, if it is running. Then go to "C:\WINDOWS\Downloaded Program Files" and delete the file AdobeControl(s) (NW04) or AcfControls (something similar; NW04s) if present. Then access your form in your Web Dynpro application using IE (Firefox doesn't support ActiveX; the only option is to use ZCI forms with non-IE browsers). If all goes well, prior to displaying the form, IE should ask to install an ActiveX control (it will only be asked if you have sufficient privileges, that is belong to the local Administrators group).
    Kind regards,
    Sigiswald

  • How to display line items corresponding to Header  adobe form

    Hi ,
    As I am new to Adobe Form, So struggling with below problem related with Adobe Form.
    For example, I have data in an internal table :
    Stage      item
    100         A
    100         B
    100         C
    200         D
    200         E
    Here you have for field 'Stage'  value '100' , I have 3 line items, for value '200' , it is 2 line items and so on.
    My requirement is , I have to show Stage field at top and corresponding line items should be displayed in table.
    Stage: 100
    item
    A
    B
    C
    Stage: 200
    D
    E
    I have used Nested table concept to achieve it but didn't get expected output.
    Please help me out.

    Hi,
         If all of your line items are getting displayed in different pages, to my knowledge, there may be two possibilities.
    1) May be the size of the main window can accomodate only one line item. If one item data fills up the window, then there wont' be any space for the next line item data to be accomodated in the same window in the same page, so, the system triggers the next page. Like-wise for each item data. If this is the case, increase the height of the main window to display items in same page.
    2) Check the driver program. Find the Write_form block, which is written inside an item loop. May be there is a Form-control Function module( Control_form with parameter 'NEW-PAGE' ) being called after the write_fom block, within the loop. If this is the case, remove the control_form FM section to make the data display in same page.
    Best Regards,
    Kumaar.S

Maybe you are looking for

  • Problem with installing brushes?

    Hello~ I'm trying to install smoke brushes, and I can load them/get them to work, but every time I click off them (i.e. onto another brush type), they disappear, and I have to reload them. Is there a maximum number of brushes the program can hold, be

  • Any file dragged onto desktop of 2nd screen are moved to main screen

    I have a dual monitor setup. When I drag an item (file/folder/app) from a folder to the desktop of the 2nd screen, the item is automatically moved to the top right of my main screen. When I drag an item onto the main screen, the item stays where I pu

  • IMessage - a ghost in the machine?

    Something happened to me last night, and it was very disturbing.  I was having an iMessage conversation with a friend and suddenly he was responding to things I hadn't typed.  On my screen, the messages looked like they came from me (i.e., they were

  • Regarding table join in SQVI

    Experts, I  want to develop one query in SQVI. My requirement is as below. I want to develop a query in SQVI, which will show me for which materials( of material type ZPRT in my case) for which source list doesn't exist. For this, I am developing a q

  • "Sliding" Desktop

    Don't know how but recently my desktop has some new "slide" feature. I can't see both my menu bar and dock at the same time. I have to move the mouse way up or way down to get to either of them. It's also the same way horizontally. I've checked my re