Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:25:47+00:00 2026-05-31T21:25:47+00:00

For example I have a dropdown box that gets a town from the table

  • 0

For example

  • I have a dropdown box that gets a town from the table
  • I want a textbox below it to find the county when a town is selected.

It will look this up from a table

e.g the table will look like this so using the townID it should be able to find the county.

TownID || Town || County ||

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:25:48+00:00Added an answer on May 31, 2026 at 9:25 pm

    Here is a very simple example using the DEPT table: demo page.

    When you select a DEPTNO from the list, the associated DNAME value is displayed in the text field. This is done using an “advanced” dynamic action defined like this:

    Dynamic Action properties

    The “True Action” is defined like this:

    "True Action" properties

    This works by performing an AJAX round-trip to run the select statement. Note that we need to tell Apex to submit the current value of the P25_DEPTNO field so that it gets the right data back.

    UPDATE

    Of course, when possible it is best to avoid using AJAX as each action involves a round-trip to the server. In this case it could be avoided by getting all the required data into the select list return value and then parsing it on the client. To do that you could define the select list LOV like this:

    select deptno d, deptno||':'||dname r
    from dept
    order by 1
    

    Then use a dynamic action that uses Javascript expressions to parse the return value and populate the other items:

    Javascript expression to set value

    Of course, the select list no longer returns (just) the DEPTNO value, so I also need to parse that out into a separate field if I need the value (which I probably do). That requires a second True Action in the dynamic action definition.

    The result (see new demo) uses no AJAX so is more efficient, but somewhat more complex to code – you need to know a little Javascript. Also you may need to handle the case where one of the data values includes your chosen delimiter (the colon in my example).

    Which way to go depends on your particular circumstances: if the related data is expensive to obtain (e.g. uses a complex function call) it may be better to use the AJAX method and only get the data if really needed; but if it is inexpensive to get it up-front, the saving in round-trips may be worth while.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dropdown box which is populated from a mysql table. When viewing
For example I have a dropdown box and I want to see the javascript
Example: I have an class that inherits from UIImageView. An object creates an instance
I currently have a dropdown box which enters an integer into a table. It's
I have a loop that displays a list of variables in a dropdown box
I have a dropdown box that is being populated by a filtered list of
I have a dropdown box that allows users to select how many inputs they
I have a simple dropdown box and jquery to get value from what i
I have an MVC application. Say for example if we have a dropdown Cars
Question: Does anyone have an example of a filter as you type dropdown control

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.