Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Newbie scripting question- dropdownlist

Avatar

Level 4

Hi there,

I'm very new to livecycle and am tasked with creating fillable forms for our company. I've got a form pretty much designed and I am working now on making the various fields interactive based on the user input and selections.

I've read a bunch so far but am having some difficulty figuring out how to do something with multiple dropdown lists.

I have 2 dropdowns that are related. The items in the second are defined by the selection in the first dropdown.

I did find reference to a formcalc solution if the user selects an item in the first it defined the list in the second and I have that working but in my situation, the user can select 1 of 5 items in the first dropdown and it would define the same 3 selections in the second dropdown.

Basically, can a sepcifiy a range of values for the first dropdown that I caould then define for the 2nd dropdown?

What I have been trying so far is this:

 

if (form1.Account_Client_Information.Owner_subform.recipiant_type == 2 )then

$.clearItems();

$.setItems("TA- Tax Letter, Bunch of stuff")

endif

What I'd like to do is if the recipiant_type is 1 or 2 or 3 or 4 then setItems to one set of values,

Then if recipiant_type is 5 or 6 or 7 then setItems in the 2nd dropdown to another set of values.

Any tips on how this can be done would be appreciated! Thanks!

2 Replies

Avatar

Level 7

You are almost there. All you need to do is this:

if (form1.Account_Client_Information.Owner_subform.recipiant_type >= 1 and  form1.Account_Client_Information.Owner_subform.recipiant_type <= 4) then

$.clearItems()

$.setItems("TA- Tax Letter, Bunch of stuff")

elseif (form1.Account_Client_Information.Owner_subform.recipiant_type >= 5 and  form1.Account_Client_Information.Owner_subform.recipiant_type <= 7) then

$.clearItems()

$.setItems("other stuff, Bunch of other stuff")

endif

Avatar

Level 4

Thanks for the response! I did figure a longer solution but like yours suggestion better!