Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Autopopulate fields from a background table

Avatar

Former Community Member

I am trying to figure out how to insert this functionality. I would like the user to select a value from the drop down "Name Field" and have it populate the "ID" and "Job Position" field based on a table. I do not want the table to be visible. I know I can do this through actions, however I have 60+ Names and there must be a better way.

Thank you

6 Replies

Avatar

Former Community Member

Where is the information about the names and the ID and job position going to reside?

paul

Avatar

Former Community Member

I would like to information to reside in the form (Background, not visible), not an external resource if at all possible. The information will never change.

Avatar

Former Community Member

Then I suggest that you create an array to hold the information in a scripting object. This means that the array will be created each time the form loads and the array will be available to you at all times. There is an example using an array like this in the samples. Under the Help/Samples there is a dynamic purchase order sample. The country and states/province dropdowns get populated this way.

Start there and if you need more help don't hesitate to ask.

paul

Avatar

Former Community Member

Thank you, I found the samples, but not a step-by-step. I believe this will be beyond my ability.

Avatar

Level 2

How are the arrays created?  Are they scripted in the initialized event?

Just reviewing the Purchase Order sample doesn't show you the details on what to do.  It does confirm that it is what you want to do.

Any details you can provide will be very helpful.

Thank you.

Avatar

Former Community Member

There is a scripting object that is used and a function within that object to create the arrays.

Paul