Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

If-and-then function in FormCalc

Avatar

Former Community Member

Dear friends,

Please be so kind to assist. I am creating a form in LiveCycle and need to insert a formula in a field

Basically I need that if the value in DropDownList2 is Great Park and in DropDownList3 is Big Water then the value in NumberField1 should be 250.

Could anyone be so kind to provide me a script in FormClac?

Thanks! Cheers!

1 Accepted Solution

Avatar

Correct answer by
Level 10

On your DropDownList 2 and 3, specify the item values by checking the checkbox Specify Item Values.

Now you should know what is the number according to the options in the dropdownlists.

From there, you should be able to write you statements...

IF your values Great Park and Big Water values are both 1 then it would be something like this:

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

On your DropDownList 2 and 3, specify the item values by checking the checkbox Specify Item Values.

Now you should know what is the number according to the options in the dropdownlists.

From there, you should be able to write you statements...

IF your values Great Park and Big Water values are both 1 then it would be something like this:

Avatar

Former Community Member

Hi, thanks for the answer, I guess it should work but it somehow does not.

I specified the item values as you suggested but when I try to see if it works in "preview PDF", I get the message that "Reference_Syntax.DropDownList2.rawValue" or "Reference_Syntax.DropDownList3.rawValue" is unknown.

I am kinda stuck...

Avatar

Level 10

You should not write Referen_Syntax, this only means that you must write the path to the object using the Reference Syntax....

The Reference Syntax is refering to the somExpression of an object, or a part of the somExpression

E.g. i want to access a field in a table inside a subform called frmPayment... My reference_syntax will be be something like:

xfa.resolveNode("Page1.frmPayment.Table1.Row1.txtValue")

Reference_Syntax = Page1.frmPayment.Table1.Row1

Avatar

Former Community Member

Great Answer!

It works fine!

Thank you so much!