It is very common in business scenario where we need to copy the content of one field to another, highlighting field , set focus on field, validations of fields, mathematical calculations to calculate subtotal and grandtotal. To achieve all these functionality we need to use either Java script or Form Calc which is completely integrated into the Adobe Livecycle Designer.

In this blog I will try to cover some of the most common scenario where we need to write either Java Script or Form Calc in Adobe Form.

Highlighting the boundary of field and focusing the cursor on that field if the field is empty using Java script.

Here we will check the value of the field if it is empty we will color the boundary of the field and also focus the cursor on that field.

JS

When user click on the button it will check all the fields on the form, if any of the field is empty then java script will color the boundary and set the focus on that field.

JS2

Below is the script snippet by which we can achieve this functionality.

JS3

Calculating the Net Price and Total Price on Calculate event using Form Calc.

Here we will calculate the Net price of single product and Total price of products purchased by user on Calculate event using Form Calc. Here both Net Price and Total Price fields are in ‚ÄėDisplay Mode‚Äô.

JS4

When user enter the Price/Unit and Quantity values the Form Calc Script automatically calculate the Net Price and Total Price. Below Image Demonstrate the Same.

JS5

JS6

To achieve the above functionality put the below code inside the calculate event of respective field.

Form Calc Script to calculate the Net Price:

JS7

 

Form Calc Script to calculate the Total Price:

JS8

So, in this way we can say that Java script and Form calc are an important part of an Adobe Interactive Form to achieve different business functionality.

 

Need Help:

In case you need assistance on SAP Support Services, please contact us. Please send us your questions, comments or assistance request and our team would be glad to assist you.

By Gopichand Panghate (on behalf of SAP Consulting Team)


Apprisia
SAP :: Streamlined

We offer variety of services including SAP ECC ,SAP HR,SAP BW,SAP CRM, SAP SCM,SAP BPM, Business Objects, SAP ABAP Development, SAP BASIS and SAP NetWeaver consulting. We have expertise in providing implementation,development, SAP Migration and SAP support services to SAP customers across diverse industries at a global level.

Have a question on SAP? Write to our SAP Architect : AskTheArchitect@Apprisia.com

(We promise a no-obligation consulting reply)