Expand my Community achievements bar.

SOLVED

Why is only one action working

Avatar

Level 1

Hi guys. Hope someone can help.

I have set up a form in LiveCycle designer ES4 and I have 4 drop down boxes where 4 selections keep some extra fields hidden and one selection makes the extra fields visible. This is set up 4 times on the form and all drop downs and fields are set up in separate subforms with different names.

Select from list - hidden

Danish - hidden

Finnish - hidden

Norwegian - hidden

Swedish - hidden

Other - visible

My problem is that the action I ask for will only work in one set. And it doesn't matter which one I choose first.

If I for example choose Finnish in the first and Other in second and Other in the third and Danish in the fourth, the extra fields are only visible in option 2, not in option 3.

If I for example choose Other in the first and Swedish in second and Norwegian in the third and Other in the fourth, the extra fields are only visible in option 1, not in option 4.

I have copied the setup from another form that works, and I just can't see whats wrong.

I found a support thread saying that you can't have more than 15 actions. I tried deleting some of the actions, but it still doesn't work

Script is:

  1. NordicPowerOfAttorney.#subform[0].Names.Person1.R23-1::change - (JavaScript, client)

//+ GENERATED - DO NOT EDIT (ID:3CFF7375-218F-4F8B-A342-6144FEFF644F CRC:1111680950)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].Person1other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].R23-1[0]

//+ Condition1: ListField("$Node1","textselected","Select from list")

//+ ActionName: R23-1.change

if (xfa.event.newText == "Select from list") {

this.resolveNode("Person1other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:29B50E0C-9FF6-42DB-AB10-344E63B30C1B CRC:2792243199)

//+ Type: Action

//+ Result1: SetPresence("$Node2","visible")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].Person1other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].R23-1[0]

//+ Condition1: ListField("$Node1","textselected","6")

//+ ActionName: R23-1.change

if ($.boundItem(xfa.event.newText) == "6") {

this.resolveNode("Person1other").presence = "visible";

}

//-

//+ GENERATED - DO NOT EDIT (ID:E2E05269-D5B2-46F4-8362-BB64CC326402 CRC:2663976027)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].Person1other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].R23-1[0]

//+ Condition1: ListField("$Node1","textselected","5")

//+ ActionName: R23-1.change

if ($.boundItem(xfa.event.newText) == "5") {

this.resolveNode("Person1other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:42DBF824-EBAE-486A-BC58-C350F2618AA9 CRC:2178998507)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].Person1other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].R23-1[0]

//+ Condition1: ListField("$Node1","textselected","4")

//+ ActionName: R23-1.change

if ($.boundItem(xfa.event.newText) == "4") {

this.resolveNode("Person1other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:4E4BFA03-CD8D-41FA-951C-00301E507CBD CRC:3695011835)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].Person1other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].R23-1[0]

//+ Condition1: ListField("$Node1","textselected","3")

//+ ActionName: R23-1.change

if ($.boundItem(xfa.event.newText) == "3") {

  this.resolveNode("Person1other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:875EF474-2D3D-40EB-A80C-BC2D839A6590 CRC:3272903499)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].Person1other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person1[0].R23-1[0]

//+ Condition1: ListField("$Node1","textselected","2")

//+ ActionName: R23-1.change

if ($.boundItem(xfa.event.newText) == "2") {

  this.resolveNode("Person1other").presence = "hidden";

}

//-

NordicPowerOfAttorney.#subform[0].Names.Person2.R23-2::change - (JavaScript, client)

//+ GENERATED - DO NOT EDIT (ID:9CD50AB9-4B44-4CB7-BC21-9A67EDD353D0 CRC:3158333294)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].Person2other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].R23-2[0]

//+ Condition1: ListField("$Node1","textselected","1")

//+ ActionName: R23-2.change

if ($.boundItem(xfa.event.newText) == "1") {

this.resolveNode("Person2other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:FDE59646-8A75-4A26-8F91-A733E160F008 CRC:1810306949)

//+ Type: Action

//+ Result1: SetPresence("$Node2","visible")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].Person2other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].R23-2[0]

//+ Condition1: ListField("$Node1","textselected","6")

//+ ActionName: R23-2.change

if ($.boundItem(xfa.event.newText) == "6") {

this.resolveNode("Person2other").presence = "visible";

}

//-

//+ GENERATED - DO NOT EDIT (ID:434A9464-5DD5-4ED1-A507-FF99B54F8842 CRC:3236423086)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].Person2other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].R23-2[0]

//+ Condition1: ListField("$Node1","textselected","5")

//+ ActionName: R23-2.change

if ($.boundItem(xfa.event.newText) == "5") {

this.resolveNode("Person2other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:FE5128A3-AF21-454A-A96C-6396D6629C78 CRC:3754821918)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].Person2other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].R23-2[0]

//+ Condition1: ListField("$Node1","textselected","4")

//+ ActionName: R23-2.change

if ($.boundItem(xfa.event.newText) == "4") {

this.resolveNode("Person2other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:DF5661F8-B218-4553-9856-A5A8561C3B4B CRC:2182319630)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].Person2other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].R23-2[0]

//+ Condition1: ListField("$Node1","textselected","3")

//+ ActionName: R23-2.change

if ($.boundItem(xfa.event.newText) == "3") {

this.resolveNode("Person2other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:66D1F0AB-8600-4330-8D94-0B7DFC8B4AF5 CRC:2637849278)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].Person2other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person2[0].R23-2[0]

//+ Condition1: ListField("$Node1","textselected","2")

//+ ActionName: R23-2.change

if ($.boundItem(xfa.event.newText) == "2") {

this.resolveNode("Person2other").presence = "hidden";

}

//-

NordicPowerOfAttorney.#subform[0].Names.Person3.R23-3::change - (JavaScript, client)

//+ GENERATED - DO NOT EDIT (ID:C0BBA692-055E-41FF-8CDF-A5441727920D CRC:2309353533)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].Person3other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].R23-3[0]

//+ Condition1: ListField("$Node1","textselected","1")

//+ ActionName: R23-3.change

if ($.boundItem(xfa.event.newText) == "1") {

this.resolveNode("Person3other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:25ED8CC8-9214-4505-808E-F5CE4EB79857 CRC:2578510444)

//+ Type: Action

//+ Result1: SetPresence("$Node2","visible")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].Person3other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].R23-3[0]

//+ Condition1: ListField("$Node1","textselected","6")

//+ ActionName: R23-3.change

if ($.boundItem(xfa.event.newText) == "6") {

this.resolveNode("Person3other").presence = "visible";

}

//-

//+ GENERATED - DO NOT EDIT (ID:740F3228-D4E9-4BC2-B57E-31EF456228F1 CRC:4110566141)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].Person3other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].R23-3[0]

//+ Condition1: ListField("$Node1","textselected","5")

//+ ActionName: R23-3.change

if ($.boundItem(xfa.event.newText) == "5") {

this.resolveNode("Person3other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:1381D104-47AF-407C-A097-1BAE50358625 CRC:3928731213)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].Person3other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].R23-3[0]

//+ Condition1: ListField("$Node1","textselected","4")

//+ ActionName: R23-3.change

if ($.boundItem(xfa.event.newText) == "4") {

this.resolveNode("Person3other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:D942DB88-86B2-4C65-A0EF-1938162272A3 CRC:3086362973)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].Person3other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].R23-3[0]

//+ Condition1: ListField("$Node1","textselected","3")

//+ ActionName: R23-3.change

if ($.boundItem(xfa.event.newText) == "3") {

this.resolveNode("Person3other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:2EA0BAC5-7C6D-4E91-8E8F-BBAEDA62229C CRC:2833237485)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].Person3other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person3[0].R23-3[0]

//+ Condition1: ListField("$Node1","textselected","2")

//+ ActionName: R23-3.change

if ($.boundItem(xfa.event.newText) == "2") {

this.resolveNode("Person3other").presence = "hidden";

}

//-

NordicPowerOfAttorney.#subform[0].Names.Person4.R23-4::change - (JavaScript, client)

//+ GENERATED - DO NOT EDIT (ID:EE1352F2-9208-41B5-99DA-33CA8811C11D CRC:1934468)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].Person4other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].R23-4[0]

//+ Condition1: ListField("$Node1","textselected","1")

//+ ActionName: R23-4.change

if ($.boundItem(xfa.event.newText) == "1") {

  this.resolveNode("Person4other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:033FB4E2-0756-4921-880E-7623E5D76B0D CRC:560443732)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].Person4other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].R23-4[0]

//+ Condition1: ListField("$Node1","textselected","2")

//+ ActionName: R23-4.change

if ($.boundItem(xfa.event.newText) == "2") {

this.resolveNode("Person4other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:03444CB3-6BBF-4828-82BD-90E9740C769C CRC:1045323236)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].Person4other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].R23-4[0]

//+ Condition1: ListField("$Node1","textselected","3")

//+ ActionName: R23-4.change

if ($.boundItem(xfa.event.newText) == "3") {

this.resolveNode("Person4other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:0376D644-63D6-44E2-93E6-2C16DB036F34 CRC:1670634228)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].Person4other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].R23-4[0]

//+ Condition1: ListField("$Node1","textselected","4")

//+ ActionName: R23-4.change

if ($.boundItem(xfa.event.newText) == "4") {

this.resolveNode("Person4other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:AA56811B-5B5C-4810-9066-50AD348BD960 CRC:2092578372)

//+ Type: Action

//+ Result1: SetPresence("$Node2","hidden")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].Person4other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].R23-4[0]

//+ Condition1: ListField("$Node1","textselected","5")

//+ ActionName: R23-4.change

if ($.boundItem(xfa.event.newText) == "5") {

this.resolveNode("Person4other").presence = "hidden";

}

//-

//+ GENERATED - DO NOT EDIT (ID:1B69100E-0FB3-4CE8-802A-8F21460933B2 CRC:730087728)

//+ Type: Action

//+ Result1: SetPresence("$Node2","visible")

//+ Node2: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].Person4other[0]

//+ Node1: NordicPowerOfAttorney[0].#subform[0].Names[0].Person4[0].R23-4[0]

//+ Condition1: ListField("$Node1","textselected","6")

//+ ActionName: R23-4.change

if ($.boundItem(xfa.event.newText) == "6") {

  this.resolveNode("Person4other").presence = "visible";

}

//-

Anyone?

Best regards

Camilla

1 Accepted Solution

Avatar

Correct answer by
Level 1

It seems that there was a problem in the original document on which the present was built. Used another form and now it works.

View solution in original post

3 Replies

Avatar

Level 7

The first item in the top combo is missing some code ($.boundItem), not sure if that is an issue.

if (xfa.event.newText == "Select from list") {

this.resolveNode("Person1other").presence = "hidden";

}

if ($.boundItem(xfa.event.newText) == "Select from list") {

this.resolveNode("Person1other").presence = "hidden";

}

Also, all the combos look for numbers, are you listing numbers or names in the combo?

ie. instead of:

if ($.boundItem(xfa.event.newText) == "6") {

this.resolveNode("Person1other").presence = "visible";

}

can you use?

if ($.boundItem(xfa.event.newText) == "Other") {

this.resolveNode("Person1other").presence = "visible";

}

Avatar

Level 1

Hi MinusZero

Tried putting in the missing code. Did not make any difference (but thanks for the tip ;-) )

The numbers are the set values for the options. I tried changing all of them to text, but it didn't make any difference. But thanks for the suggestion.

Avatar

Correct answer by
Level 1

It seems that there was a problem in the original document on which the present was built. Used another form and now it works.