cancel
Showing results for 
Search instead for 
Did you mean: 

Populating Dropdown B depending on value chosen in Dropdown A in Adobe Form

Former Member
0 Kudos

Hello All,

I have a requirement for my adobe form in which I have two dropdowns A & B. Based on the value chosen in dropdown A, the values in dropdown B should be populated.

This form is going to be utilised both in an online & offline scenario for diff entities. Hence I cant use the Webdynpro context (Submit button) to accomplish this. I have to do this validation in the adobe designer itself either using Formcalc or Javascript. Also note that both the dropdowns are custom tables.

Please let me know as to how I can make this possible.

Thanks for your help!

Regards, Liz.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

solved using web services method

Former Member
0 Kudos

I am going to try the Web Services option and then close this thread.

thks, liz

NoJo
Active Participant
0 Kudos

look for "Populating one Drop-Down list from the selection of another Drop-down list ", it's the same problem solved!

br

norbert

chintan_virani
Active Contributor
0 Kudos

The solution mentioned in the said thread would work for Online scenarios but not work for offline cenarios I feel.

The reason being the data in offline form in dropdown2 still needs to be dynamic and needs input of dropdown1.

For eg: I have a dropdown1 as Material Type & dropdown2 as MaterialSubTypes When I select say MatType1 in DD1 all material types such as MatSub1,MatSub2 should get displayed.

If I create an offline form with these values and just read them, if someone makes changes in backend with a new value like MatSub3, the form will not get updated with it and it would be not be a good approach of creating form once again.

Chintan

NoJo
Active Participant
0 Kudos

your answer is just dealing with the question if offline is the right way. I hope that the developer/keyuser/application manager and so on have discussed all advantages/disadvantages of online/offline forms. or perhaps to do it without forms.

If they want to realize it in an interactive offline form and they decide to store data in the document and just display values dependant on other selections, they can realize this way.

your answer with web services is a good answer but you have a lot of things to think about and a lot of things more to do (SICF, which user, how do you check if the system is online and so on) and it's tricky to realize because the dataconnection stores the path of the webservice of the first system you created it (how do you handle this? develop in the Prod-system?) but this could be a very long discussion, you will have to do with each company and perhaps with each form.....

br

norbert

chintan_virani
Active Contributor
0 Kudos

No no, I think you got me wrong. I did not answer whether to have an online form OR an offline form.

My understanding was that Liz wants only one form to be developed and wants the same to be used in Online / Offline manner.

So if I create a WD application and access it from WD URL it would be become Online, I save the form the WD application onto my desktop, that becomes an Offline form. So now in offline form if I want to have dynamic values then WS would be the only way and the same would help in Online scenario as well.

Basically it would reduce the efforts of maintaining seperate Online & Offline forms. Yes I agree WS transports are little complicated so the WSDL URL will need to be changed manually.

Chintan

NoJo
Active Participant
0 Kudos

If I can access WS why do I not use the online form?

If I store all material subgroups in the form i can just display the correlating subgroups to the main group.

If new subgroups are maintained i can deliver a new form.

but i agree to you that WS are a nice possibility and your answer is more than satisfying for that point of view, but the scripting is just another independant solution.

norbert

Edited by: Norbert Prager on Jan 8, 2010 4:41 PM

chintan_virani
Active Contributor
0 Kudos

If I can access WS why do I not use the online form?

Because I can be outside network where I do not have access to the Online application.

If I store all material subgroups in the form i can just display the correlating subgroups to the main group.

The form performance would take a hit if we have large dataset.

If new subgroups are maintained i can deliver a new form

For me that would be an overkill for the developer.

Nice to have discussion but let's close this and wait for Liz to respond now

Chintan

NoJo
Active Participant
0 Kudos

Because I can be outside network where I do not have access to the Online application.

i cant't understand how you can access the WS of the system but not be able to access the online solution via web? perhaps you can explain to me!

If I store all material subgroups in the form i can just display the correlating subgroups to the main group.

The form performance would take a hit if we have large dataset.

Did you ever try? what do you think, how many items can you use? how many subgroups do you have? 1000?

give it a try

>

>

If new subgroups are maintained i can deliver a new form

> For me that would be an overkill for the developer.

depends on the frequency of change, but it's not more work for the developer! just download it again if you need the additional subgroups

>

i agree, let's close it

Edited by: Norbert Prager on Jan 8, 2010 4:54 PM

Former Member
0 Kudos

Thanks Chintan and Norbert for your helpful answers. As Chintan has mentioned, my requirement is that the same form needs to be used for both online/ offline purposes. There are many users who work in places out of the network and cannot log into the portal.

I am going to give Chintan idea of WebServices a shot and then close this thread.

I would again like to thank you guys for your quick replies. I will get back to you soon.

Thanks, Liz

OttoGold
Active Contributor
0 Kudos

Hello,

Chintan´s answer is just superb, but this question was asked many times in this forum. Next time search first, ask later,

Otto

chintan_virani
Active Contributor
0 Kudos

Web Services is the only way I can think off for having dependent dropdowns in Offline scenarios unless you want hard code the values in form itself. WS would also be helpful for your online scenario as well.

Some high level steps would be:-

1. Create a RFC whcih can fetch Dropdown1 and Dropdown2 values.

2. Expose both RFCs as Web Services and download the WSDLs from server.

3. Create data connections from WSDL in your project and generate fields. Check the necessary bindings.

4. Since you want Dropdown1 to be initialized as soon form opens up then in the form:ready of top level main subform enter followinng JavaScript:-

var cURL = "server:port/sap/bc/srt/....";    // Your complete WSDL URL
var service = SOAP.connect(cURL);
xfa.connectionSet.<NameOfYourDataConnection>.execute(0);

5. Now in the change event of dropdown1, get the current selected value, pass this as input paramter to the Dropdown2 Web Service and execute it by writing similar code for WS2.

Points to note:-

1. You will have to create a form in Online scenario using WD first, test it and once successful just use the Save option from Adobe Toolbar. This will become your Offline form for same application. This step is needed so that Reader Rights are added to the form else you would not be able to execute the Web Services from Adobe Reader.

2. You will need a public IP of your ECC server hosting the Web Services if the offline form will be accessed by users outside your intranet/organization. You may need to check this with your Network Team for opening up port, security risk etc issues.

Help links regarding your requirements:-

Authotizations needed for WS -->

Chintan