Expand my Community achievements bar.

Help with form scripting

Avatar

Level 1

Hello,

I am a newbie in LiveCycle form designing, and I have a job, that has been made i Excel, including calculations and variables. The client would like to have it coded in LiveCycle. Is there anywhere I can find a helping hand to do the neccessary scripting?

Best regards

Henrik

9 Replies

Avatar

Level 3

There are lots of places that you might be able to discover.

I do recommend that you first ask specific questions and everyone will try to help.

OR post your project and even if you can upload the Excel file.

If you only want to explore the scripting by yourself you can start with

The LC help, or simply search the internet for LC script or LC javascript..

Avatar

Level 1

Ok, thank you, I will try that. :-)

You can find the prototype excel fil here:

http://bohemian.dk/kunder/pensiondanmark/Prototype_beregning.xlsm

I need to create a similar calculation in LiveCycle. The bits that are causing me trouble are the dropdown function that has influence to other form fields.

It is the yellow fields the user can fill out.

Thank you in advance.

Avatar

Level 3

Ok, all the files containing in your zip file are xml files.

Which means, you need to create a form in LC and create a connection to these xml files.

Go to Acrobatuser.com and search for Data connection. You'll find tutorials and examples.

Avatar

Level 1

Actually it is not a zip file, but it seems that Windows wants to rename it to .zip when downloading. And this gives a strange result when you unpack it. Instead you should rename the extension from .zip to .xlsm and then open it in Excel.

Then you should be able to see the meening of it.

My main challenge is the combo list part of this. I have looked through a lot of examples and tutorials of this, but I must admit it is getting me confused.

I would appriciate if you could have another look at it.

Thanks again :-)

Avatar

Level 1

After spending a lot of time with this (yes, I am a newbie) I have found out the most of this form. All I need help with now is to write the Javascript for this, and I hope I make sense:

If I have three fields A, B, C

C is where I need the result, so this is the field containing the script.

What I want it to do is this:

If 0,2*(A+B) <= A then value of field C should be 0,2*A

If A-B < 0 then value of field C should be - (dash)

I don't believe this is very tricky if you know how.

Can you help me how thsi complete code should be written :-)

Thanks

Avatar

Former Community Member

Using javascript and assuming the field name are A, B and C

Hope that helps

Paul

Avatar

Level 1

Hi paul,

Thank you for your help, but it does not seem to work properly. I have attached the form so you can see.

What have I not done correct?

Thank you very much

med venlig hilsen/best regards

henrik hauge, art director

bohemian a/s

skudehavnsvej 17

2100 københavn ø

t 39 311 113

f 39 311 115

d 39 474 472

m 5199 1999

Fra: pguerett

Sendt: ti 20-04-2010 23:09

Til: Henrik Hauge

Emne: Help with form scripting

Using javascript and assuming the field name are A, B and C

if (.2 * (A.rawValue + B.rawValue) <= A.rawValue){

C.rawValue = .2 * A.rawValue

}

if ((A.rawValue - B.rawValue ) < 0){

C.rawValue = "-"

}

Hope that helps

Paul

Avatar

Former Community Member

There is no attachment here .....can you email it to LiveCycle8@gmail.com instead and I will have a look when I get a chance?

paul

Avatar

Level 1

Certainly, I will do that.

Thank you.

med venlig hilsen/best regards

henrik hauge, art director

bohemian a/s

skudehavnsvej 17

2100 københavn ø

t 39 311 113

f 39 311 115

d  39 474 472

m 51 991 999

www.bohemian.dk