Condition verification in java script on Adobe form.

Hello Experts,
I am using a interactive forma text element on my view. (java web dynpro)
It's a simple application. I am trying to figure out how it works with java script.
I have a text field. which displays employ is sales or production dept
the values in the data view and its the output element of a BAPI which returns XF,TF,HF and XK,JK,HK
(record.dept)
if its XF, TF, HF on the text field in the adobe form should print sales else production.
I have never used java script on adobe form.
I figured the strip above the form in adobe designer is used for java script.
can any one, let me know how I can manipulate.  the record value
Here is what I am trying record.dept = XF |TF|JF . but i dont know how to run the java script or its syntax.
Your help is highly appreciated.

James,
xfa.host.messageBox should show you an alert dialog box to check data you are getting.
And yes you are right. You can set the value of textfield using code you mentioned.
if(record.dept.equalsIgnoreCase("XF")
             || record.dept.equalsIgnoreCase("TF")
                      record.dept.equalsIgnoreCase("JF"))
   xfa.host.messageBox("The value is Sales");
   <Text-field id>.value = "Sales";
else
   xfa.host.messageBox("The value is Production");
  <Text-field id>.value = "Production";
You can even set the texfields to be readOnly, hide some of them etc. But for that I would suggest you going thru the LiveDesigner help. It would solve most of your doubts :-).
Chintan
Edited by: Chintan Virani on Feb 19, 2008 3:37 PM

Similar Messages

  • How to Debug Java Script in Adobe Form

    I have used an alert for empty fields . I have used Check button control for this.
    But the button click is very inconsistent. Some times it triggers the event sometimes it doesnt. Is there anyway to debug the java script. I have installed Script editor for IE but I am unable to use it for Adobe Forms.
    Any help is appreciated.
    Thanks,
    Vasu

    Hi Vasu,
    i think that maybe is the check sequence is not very correct.. and maybe you can try to code it one check for empty fields at a time..
    example
    Name.
    Address.
    Tel.
    Hp.
    Email.
    so u can try to code for one item at a time then slow try to debug it... as last time i use to insert the javascript inside each component then after it i implement into a button and slowly check for the check sequence which one need to be 1st and etc.
    hope it help you. if not maybe u can give more information. maybe i can help you out at myside.
    Regard,
    Ng Jia Jun

  • Regarding usage of java script in adobe forms

    Hello experts,
                    Please any body help me out with what events i should use in java script / formcalc .
    send links for java scripting and formcalc.
    Thanxs,
    adi.

    The reference for Formcalc is available inside you designer installation directory.
    Like this one C:\Program Files\Adobe\Designer 7.1\Documentation\EN\FormCalc.pdf
    There you can also find general LifeCycle Designer Documentation (Designer.chm)
    In this file goto Creating Calculations and Scripts -> Events -> List of events
    As for JavaScript - reference is not in the package, so you have to search a bit. Something is available:
    Like this one: http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
    Hope this helps!
    Regards,
    Petr Perstnev

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • Can't add java script to Adobe 7.0 PDF document

    Hi, ran into a small problem using Adobe Pro 7.0. Created a interactive form in Adobe Designer 7.0. Want to add Java script to run when a user selects certain fields on the forms. However, when I try and use the advanced editing tools to gain access to the Java script properties for that object, the toolbar is greyed out. No document security has been configured. Can this be done? Should it be done in Adobe Prof or in Designer? Can't figure out how to add the java script to the forms.
    Any help would be appreciated.
    Thanks Michael

    Once a form is started in LiveCycle Designer, it has to be edited in LiveCycle Designer. There are very few Acrboat features that can be used.

  • How to use Java Script in Oracle Forms 10g

    Hello,
    Appreciate if anyone could help me using Java Script in Oracle Forms 10g?
    Thanks
    GM

    Thank you for your reply. I was reading on the metalink that we could use the to call the java script from oracle Forms 10g (Doc ID 265863.1)
    Example:
    WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.oracle.com","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
    I tried it but it did not open the any window as it claims. Am I missing anything? Is there any IE related setting which I need to modify for the above to work?
    Regards
    GM

  • Where Web Dynpro Java version of Adobe Forms are used in ESS MSS

    Hi, SDN Expert.
    I am working on research the use of Adobe Interactive Forms in the current processes of HCM ESS MSS.
    We are on ECC5.0, EP7.0, and ESS MSS SP21. We are in the midst of upgrading to ECC6.0.
    Do you know where Web Dynpro  Java version of Adobe Forms are used in ESS MSS are used? OR are they all in Web DYnpro ABAP version in ECC6.0?
    Thanks,
    KC

    Sergio,
    FYI.
    I am trying to see how the form I design/modify in TCode: SPF are working together to these piece of codes I found in NWDI WD4J pcui_gpisrsap.com --> VcISRShowForm DC --> ShowForm view:
    public void wdDoInit()
        //@@begin wdDoInit()
              InteractiveForm form =
                   (InteractiveForm) ((View) wdThis.wdGetAPI()).getElement("IsrForm");
              form.setDynamicPDF(true);
              form.bindPdfSource((IWDAttributeInfo) null);
        //@@end
    public static void wdDoModifyView(IPrivateShowForm wdThis, IPrivateShowForm.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
              logger.pathT("Entering: wdDoModifyView");
              // Dynamic context generation
              // Bind context
              if (wdContext.nodeNewGenericChildNodes().size() > 0) {
                   if (wdContext.currentContextElement().getContextToBeReset())
                        wdContext.nodeData().getContext().reset();
                   IWDNodeInfo genericNode = wdContext.nodeData().getNodeInfo();
                   IWDNodeInfo origNode =
                        wdThis
                             .wdGetVcISRShowFormController()
                             .wdGetContext()
                             .nodeGenericNode()
                             .getNodeInfo();
                   IWDNodeInfo childNode;
                   IWDNodeInfo deepChildNode;
                   for (int i = 0;
                        i < wdContext.nodeNewGenericChildNodes().size();
                        i++) {
                        childNode =
                             origNode.getChild(
                                  wdContext
                                       .nodeNewGenericChildNodes()
                                       .getElementAt(i)
                                       .getAttributeValue("name")
                                       .toString());
                        deepChildNode = childNode.getChild("DATA");
                        genericNode.addMappedChild(
                             childNode.getName(),
                             null,
                             childNode.isSingleton(),
                             childNode.isMandatorySelection(),
                             childNode.isMultipleSelection(),
                             childNode.getPathDescription(),
                             false,
                             true);
                        genericNode.getChild(childNode.getName()).addMappedChild(
                             deepChildNode.getName(),
                             null,
                             deepChildNode.isSingleton(),
                             deepChildNode.isMandatorySelection(),
                             deepChildNode.isMultipleSelection(),
                             deepChildNode.getPathDescription(),
                             false,
                             true);
                        genericNode
                             .getChild(childNode.getName())
                             .getChild(deepChildNode.getName())
                             .addAttributesFromDataNode();
              // Avoid another context generation - all context have been generated
              wdContext.nodeNewGenericChildNodes().invalidate();
              InteractiveForm form = (InteractiveForm) view.getElement("IsrForm");
              //Set the template source of the form (if necessary)
              if (wdContext
                   .currentIsrParamsElement()
                   .getSetTemplateSourceNecessary()) {
                   form.setTemplateSource(
                        wdContext.currentIsrParamsElement().getTemplateSource());
                   wdContext.currentIsrParamsElement().setSetTemplateSourceNecessary(
                        false);
              logger.pathT("Exiting: wdDoModifyView");
        //@@end

  • Migrating SAP Scripts to Adobe Forms

    Hi All,
       We are going for a new Rollout in US based on our European implementation in 2001 which was on
       4.6b. Eventually this system was upgrated to ECC 6.0 recently however all the outputs are still using
       SAP Scripts.
       For the new Rollout in the US, we are planning to migrate all these outputs to Adobe Forms. Does
       anyone know if there is an easy way to migrate Scripts to Adobe Forms or else the  migration is more
       or less like fresh development.
       Please share your experiences/knowledge if anyone has worked similarly. Thank you all.
    Regards,
    Vamsee

    Hi,
    migration from script to adobe is a big problem.
    dont go for that.
    many problems will come after migration, the time to take rectification is more than the development directly.
    Thank U
    Jay----

  • Scripting in ADOBE forms

    Hi,
    I need information regarding scripting in adobe forms.
    please help me out.
    Thanks And Regards
    Shruti

    Hi,
    for hiding the fields go thru this link.........
    Adobe Form Fields Visibility
    Regards,

  • Com.sap.pcuigp.xssfpm.java.FPMRuntimeException: No Adobe Form Is Assigned

    Hi Portal Experts,
    We are using Interactive Adobe Forms for an ISR Scenario running on  EP7.0 NW04s, SAP R/3--ECC6.0
    It is working fine from longtime but suddenly i dont know why it is not working now.throwing an FPM Runtime Exception, Recently our R/3 server was refreshed and we found that J2EE stack is down on the R/3 which is used by ADS to run the adobe forms, then our Basis team up the J2ee engine but still we are  facing the FPM Runtime Exception as mentioned below, when the user clicks on the task/workitems in the UWL.
    Initially I followed the SAP Notes: 959462, 944221, 915399, 836174. But still we are unable to resolve the exception.
    Exception:
    com.sap.pcuigp.xssfpm.java.FPMRuntimeException: No Adobe Form Is Assigned to the Scenario
    at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
    at com.sap.pcui_gp.isr.isrprocessevent.FcISRProcessEvent.raiseExceptions(FcISRProcessEvent.java:1948)
    at com.sap.pcui_gp.isr.isrprocessevent.FcISRProcessEvent.callRFCIsrGetFormUrl(FcISRProcessEvent.java:1042)
    at com.sap.pcui_gp.isr.isrprocessevent.FcISRProcessEvent.setTemplateSource(FcISRProcessEvent.java:459)
    at com.sap.pcui_gp.isr.isrprocessevent.FcISRProcessEvent.callRFCIsrProcessEvent(FcISRProcessEvent.java:798)
    at com.sap.pcui_gp.isr.isrprocessevent.FcISRProcessEvent.callIsrProcessEvent(FcISRProcessEvent.java:380)
    at com.sap.pcui_gp.isr.isrprocessevent.wdp.InternalFcISRProcessEvent.callIsrProcessEvent(InternalFcISRProcessEvent.java:1234)
    Please share your valuable ideas----your help would be highly appreciated.
    Regards
    Phani

    Log on to visual Admistrator.
    Click on Services->Security Provider->User Management.
    Hi Hauck,
    I already checked in the Tcode QISRSCENARIO, that the corresponding Form is attached to the scenario.
    Finally I resolved in the following way after all attemps
    In the Visual administartor>Security Provider>Usermanagement
    Search for ADsuser and click on it.
    Switch on to Edit mode for editing ADSUSer.
    Change its password to xxxxxxxx. then select (Check) No Password Change Required.
    Save it. Then again reach 'com.sap.tc.webdynpro.adsproxy.AdsProxy/ConfigPort_Document' and retype the new password.
    Now it is working fine.
    Cheers
    Phani

  • Can I use "Adobe X Pro" to debug the java code in adobe forms?

    HI,
    Can I use "Adobe X Pro" to debug the java code in adobe forms?, if not how do i debug the java code written in the adobe form.

    I have the adobe acrobat x evaluation version installed, please find the print shot attached, I have pressed CTRL+J in the preview mode, but nothing came up.
    Am I doing something wrong..

  • How to Migrate SAP Scripts to Adobe form

    Hi,
    Can yo uplease tell me step by step how to convert/migrate SAP Script to Adobe forms.
    Thanks,
    Rajeev Gupta

    Hi
    Transforming SAP Scripts - > Smartform -> Adobe Forms is the right way.
    refer this thread...
    [Re: Convert SAP Scripts to Adobe PDF Forms|Re: Convert SAP Scripts to Adobe PDF Forms]
    Regards
    Raj
    Edited by: Rajasekhar Dinavahi on Dec 9, 2008 5:25 AM

  • How to make a condition check on footer text in adobe forms ?

    Hi all,
    I have a requirement where I need to change the existing footer text in the adobe form ( text is hardcoded in the layout ) .
    I need to put a condition where new text can be placed or the existing text . Is this possible in the layout only ?? Because the text is hardcoded . I dont want to do programming in the interface for such a small req . Its a urgent req . So please advise .
    Thanks
    Barun

    Hi Barun,
    Using Javascript in Adobe, we can hide the footer. Please find the document below.
    Using Java Script in SAP Adobe forms to dynamically select Logo / Image on the basis of a field value
    Regards
    Rajkumar Narasimman

  • Java Scripting in Adobe Acrobat Pro

    Company that I work for wants to create a form using Acrobat Pro with Java Scripting that allows access to data source. Is that possible? It is only being sent out to 350 people. Would we have to purchase LiveCycle still? Would really appreciate any input. Thank you

    Depends on a couple of things.
    Do you have Acrobat X Pro or Acrobat XI Pro?
    If you have Acrobat X Pro then you also have Adobe LC Designer and can use an XFA based form with OLEDB to connect to your data source.
    If you have Acrobat XI Pro then Adobe LC Designer is no longer included and you would be creating an AcroForm.  In that case then "No"  an OLE database source would not be directly available.  But you could use a webservice to achieve similar results with Acrobat JS if you were using a web server.

  • Using Java Script in Adobe Acrobat

    I am attempting to create input forms using Adobe Acrobat. I've got the form created, and most of the functionality works. The only issue I'm having is that my end users need to be able to fill out the form, click the Submit button, and the form data needs to be sent to an e-mail address for processing. I don't need the form to be saved and sent as a PDF attachment, I just need the form data to be submitted as the BODY of an e-mail. I was told I needed to write a Java Script for this, but I don't know the first thing about that. Can anyone help me out with a Javascript they already use? I've got a week to make these forms work.

    Most web hosting services will have a mailform type script installed and available for use. If you're running your own web server, such scripts are freely available. The form just needs to be configured correctly to work with the server script. When the form is submitted to the web server, the server-side mailform script reads the incoming data and generates an email that includes the name/value pairs in the body of the email. There are literally thousands of such scripts available, to you'd have to refer to their documentation for information on setting up the form to submit to the script you want to use.
    No scripting is necessary in the form in order to submit to the web server, thought the submitForm method can be used and offers a bit more flexibility. For example, you can use a script to check the form for completeness/correctness before submitting and abort if something is wrong.
    A major advantage of submitting to a web server is it is generally far more reliable than the alternative of relying on the user's system to send the email. It can also be secured relatively easily with HTTPS/SSL, though that just covers the form submission and not when the server sends the email.

Maybe you are looking for