Dynamic dropdown based on user selection of another dropdown on the same page

hi all, ok, I have a table which contains use data, a name,
and a userID. for the example lets say "Simon Bullen" and my userID
is "999".
on a form I have, there is a dropdown box, which is dynamic
from this table, and allows me to select Simon Bullen, however, I
have a hidden field on the form, which when the user selects "simon
bullen" the hidden field populates with the appropiate U number
from the same table.... no i thought this would do it:
<cfquery name="userNumber" datasource="userList">
SELECT userNumber FROM dbo.Users WHERE Name =
<cfqueryparam value="#form.Name#">
</cfquery>
and then my dynamic form field (hidden) would reference to
this query....
but it doens't work, could somebody please enlighten me? I'm
hoping its something silly
Thanks in advance

You could make the value of the option the UserID and the
option display the name.
If that isn't what you need, I think you'll need some
javascript to populate your hidden field based on what is chosen in
the select.
I think you can modify this:
http://www.javascriptkit.com/javatutors/selectcontent2.shtml
...to populate your hidden field instead of a new select
list.
If there's a way to do that without JS I'm not aware of it.
A third possibility: look up the UserID (based on the name
chosen) after the form is submitted then do with it whatever you
need to.

Similar Messages

  • Displaying user selected value during PFR() in th same page again.

    Hi,
    I have search/Results both in the same Page.
    Hence initially Results(Advance table will be empty).
    Once user provides search conditions and clicks 'Go'.I perform VO query which is associated with the Advanced Table.Hence Results get populated automatically in the table.
    I need to display one of the search condition values as the Advanced Table header.Ex :Currency chosen (USD,Euro,INR etc)
    My Issue is
    I receive input conditions in the PFR().
    Once I query the VO i assume that OAF invokes PR() for the page.
    How can I pass the Currency unit received in PFR() to PR() to programmetically edit the Header of Advanced Table.
    Thanks,
    Gowtam.

    Gowtam,
    Set the values which you want to show as header as parameters when you are in PFR handling the search Go button request. In PR make sure to set the set the text for the header bean dynamically at each execution. If you get the parameter values, set them as header text as required and in case the parameters are null i.e. when you come to page for the 1st time, put your default text or null as required.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Filtering a Report on the active record of another Report on the same page

    Hello,
    I have a Form and Report on the same page in an APEX app. The interactive report is used for sorting/filtering etc. and the Form is used to present the data for one record at a time, as well as allow updates in selected fields. This was done using the wizards, the little 'edit' button is clicked to change the form to the selected record.
    I also have (or want to have) a second non-interactive report on the page, which displays some records based on the record of the main report that is currently selected and appearing in the form.
    I tried doing a simple 'SELECT fields WHERE link field is equal to main report', but it always says no data found.
    Basically, I need to be able to have a query for the second report that says 'SELECT these fields WHERE the site is equal to the site currently being displayed in the form'.
    When the little pencil/paper 'edit' button is clicked on a report, does this set some ActiveRow or something like this that I can use to filter the second report?
    As you can tell from this post, I am in my database skill infancy, and any literature/pointers on how to achieve this (outside of MS ACCESS...) would be appreciated.

    Okay, I have somewhat got my head around Column Links, and have put the key link field into the URL:
    The value is P4_MDF, and in this URL example it has taken the value of 'WLAH01'
    f?p=880:4:3924084145794812::NO::P4_MDF,P4_ESA_CODE,P4_SITE_NAME:WLAH01%2CWLAH%2CWYRALLAH
    Now I just need to work out how to use this value in the URL to filter the classic report.
    I have used this query:
    SELECT *
    FROM
    "MACHINE_INFO"
    WHERE CCP = :P4_MDF
    As CCP in the report im trying to filter is the same as MDF in the IR that I am clicking the Column Link
    This is the Debug for the 2nd 'filtered' report (which filters everything)
    0.09: show report
    0.09: determine column headings
    0.09: parse query as: EXPAT
    0.09: binding: ":P4_MDF"="P4_MDF" value="WLAH01"
    0.09: print column headings
    0.09: rows loop: 15 row(s)
    I'm slowly getting the hang of this, any assistance would be great!

  • Trying to set attribute value based on user selection of another attribute

    I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
    RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
    RowEditor.useEditField("OracleId");
    RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
    RowEditor.useEditField("AreaId");
    RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
    RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
    RowEditor.useEditField("RgnId");
    RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
    RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    %>
    </jsp:useBean>

    ok, sorry everyone for making it confusing; this is what I am
    trying to acheieve;
    I would like the user to populate my database with thier
    username AND userID. I have a dropdown box with thier username
    dynamicly populated already, what I am trying to achieve, is a way
    of when the user selects thier username either another dropdown or
    a hidden field is automatically populated with the appropiate
    userID (to match thier username). Now I could just have two
    dropdowns and they select both, but i'd rather avoid the
    possibility of mismatches, and that is why I would like it to be
    automatic and based on thier username selection...
    Does that make sense....?

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • Using Link from one region as parameter to another region on the same page

    I have a page with two regions.
    Region 1 has a list of items that are dispalyed as links
    Clicking on a specific item I need to have a calendar report displayed using the value of the link for eg
    Region 1 Region 2
    abc Calendar based on the link selected in region1
    def
    xyz
    How is this possible

    I spent quite a few hours after this was posted trying to figure it out and I did.
    Select Mailbox > Export Mailbox.  This asks you a location to export the mailboxes to.  It just uploads the exported mailboxes into Dropbox. 
    Then change the User that I want to import the mailboxes into. Select Import and select the location of where you placed the folder in Dropbox. This then imports the mailbox into a folder called Import. You then drag and drop the copied mailboxes from the Import folder to the folder in the structure you have.  If you decide to delete the folders from the import folder list, do this.  You can also delete the copied folders from Dropbox if you wish.
    Took a while, but I got there and I'm happy now....

  • Showing content in another region on the same page using url

    Hello Experts,
    I have a page with two region, say region A and region B. Region B is a sql based report that shows rows of information about a set of files with the first column rendered as an URL for the actual file itself. On clicking this url the file content is displayed in the same window replacing the existing content. I would like for this file content to be shown in the region A, without replacing the entire window. Is this possible?. I tried assiging a static id to region A and use it in the url, however that is not working and i am still in the process of figuring this out.
    thanks
    Seetharaman

    When you click on the link , get the URL and show the link in an iframe
    Suppose your report links are rendered like(HTML code of the report)
      &lt;td[headers=&quot;FILE_LINK&quot;]&gt;&lt;a href=&quot;http://myurl:8080/blah/blah&quot;&gt;Blah&lt;/a&gt;&lt;/td&gt;*Have an onload JS which causes clicking on the file link to generate an iframe and load it inline (I would have chosen a jQuery modal dialog over an inline display)
    $('td[headers="FILE_LINK"] a').each( function(){
      url = $(this).attr('href');
      $(this).attr('href','javascript:void(0);');
      t = $(this);
      $(this).click( function(e){
        e.preventDefault();
        t.after('<iframe src="'+url+'"> </iframe>');
    });<i>Note: modify the link field selector to match your report column links</i>
    As an additional comment: Showing an entire html page(or a file) inline in a report might not be visually appealing, try opening it as a modal popup.

  • Html Portlet links displaying in another portlet on the same page

    I have seen similar posts but no detailed explaination of how this is done.
    I have an html portlet with links whose content I would like to display in an inline rendering portlet on the same portal page. How can I pass the link url from the html portlet to the inline rendering portlet?
    Thanks,
    Robyn

    If your environment is fairly static, you can handle this easily.
    The link in your HTML portlet must refer to the page URL of the portal page on which the HTML portlet resides (which changes from portal page to portal page), to which you need to append the parameter that your "inline" portlet (under which I'm not sure what you mean) reads:
    <a href="http://<portal_page_url>&my_param=value">click here</a>Is this close to what you're willing to do?

  • Radio group in classic report based on another column on the same row.

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Application Express 4.1.0.00.32
    How can I have a radio group column based on an LOV utilizing another column on the same row of the report?
    For example: what if I had a survey application and depending on the likert scale that was assigned to the question there would be different possible answer choices:
    Question 1 on row 1 of the report: The class instructor was friendly?
    Likert scale choice is Agreement.
    Choices on Radio Group: Strongly Agree, Agree, Undecided, Strongly Disagree
    Question 2 on row 2 of the report: The class offered good materials?
    Likert scale choice is Quality.
    Choices on Radio Group: Excellent, Below Average, Average, Above Average, Excellent
    The radio group can change per row depending on the Likert scale assigned to the question which is assigned to a different column on the row.
    Can LOV utilize the column? :
    SELECT scale_text
    FROM scale_choices
    WHERE scale_category_choice_id = 2 <<= this would be the Likert scale identifier
    ORDER
    BY display_order

    Here is the answer:
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
    p_idx IN NUMBER,
    p_value IN VARCHAR2 DEFAULT NULL,
    p_query IN VARCHAR2,
    p_attributes IN VARCHAR2 DEFAULT NULL,
    p_show_null IN VARCHAR2 DEFAULT 'YES',
    p_null_value IN VARCHAR2 DEFAULT '%NULL%',
    p_null_text IN VARCHAR2 DEFAULT '%',
    p_item_id IN VARCHAR2 DEFAULT NULL,
    p_item_label IN VARCHAR2 DEFAULT NULL,
    p_show_extra IN VARCHAR2 DEFAULT 'YES')
    RETURN VARCHAR2;

  • How to open another iView in the same window

    Hallo,
    I user following code for opening iView:
    String iView = "http://server/irj/portal?NavigationTarget=ROLES://portal_content/example";
              this.getForm().addRawText("<SCRIPT>\n");
              this.getForm().addRawText("EPCM.doNavigate('" + iView + "',"
                             + "'1',"
                             + "'toolbar,menubar,resizable,scrollbars',"
                             + "'',"
                             + "'',"
                             + "'',"
                             + "''"
                             +
                        //","+
                        ");\n");
              this.getForm().addRawText("</SCRIPT>");
    ... but this open iView in new window. I'd like to open iView in the same window as the primary iView.
    Best Regards,
    Josef Motl

    Hello all:
    And... How could I show some i-views with another contents in the same page, like this?
    photo
    IVIEW
    photo
    IVIEW
    Thanks,
    Alejandro.
    P.D.: Excuse my poor English.

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Pre-Populate Dropdown based on information selected in another dropdown

    Hello,
    I hope this make since. I am working on building a form using Adobe Livecycle Designer. I have a dropdown list in multiple fields on the same form that will have the same information selected. I want the additional fields to automatically populate the information a user selects in the first dropdown list. Is this possible ??? If so, what would be the script/code necessary to do so ??? Thank you for your help.
    Example
    City, State appears in 4 different fields based on the selection in field 1, the additional 3 fields auto-populates the same information.
    Field/List 1: New York, NY <-- Selected City, State
    Field/List 2: New York, NY <-- Auto Populated based on field 1
    Field/List 3: New York, NY <-- Auto Populated based on field 1
    Field/List 4: New York, NY <-- Auto Populated based on field 1

    In the exit event of the first State field, using Javascript, something like this should work:
    State2.rawValue = this.rawValue;
    State3.rawValue = this.rawValue;
    State4.rawValue = this.rawValue;
    ...where "State2", "State3", etc. are references to the other dropdowns you want to populate with the same information from the first state field.
    Be sure to set the binding values in the BINDING tab of the dropdowns to the same in each dropdown,
    Brian

  • Creating report based on user selected Date Range

    Hello.
    I am trying to display an Apex report that selects data for the report based on a user entered date range.
    It's a simple page with two date picker fields (p18_start and p18_end).
    The report region SQL looks like this:
    SELECT *
    FROM prj_items
    WHERE LM_DT BETWEEN :p18_start AND :P18_end
    One table, one field on the table to search and two Apex variables.
    I thought this would be fairly simple, but I am obviously missing something.
    I not even sure what other information is needed to help me figure this out.
    -Jody

    Hi,
    You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
    When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
    Then your SQL would be:
    select * from PRJ_ITEMS
    where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
    AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
    SELECT * FROM PRJ_ITEMS
    WHERE (:P19_START IS NULL AND :P19_END IS NULL)
    OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
    OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
    OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
    Andy

  • Output different data based on user select

    Hi everyone,
    Quick question, I would like to output different report columns based on user select, eg., users would be presented with two choices in a radiobutton list, eg., 1 and 2.
    I have query results that contain columns A, B, C, D, E, F, G.
    If user selects 1 then the output should be columns A, B, C, D, E.
    If user selects 2 then the output should be columns A, B, C, F, G.
    I am sure this is possible and easy? If so, what topic should I be reading/searching internet on?
    Please advise.
    Thanks!

    I would say that this is most often something that your user interface should be dealing with (i.e. which columns should be shown).
    There is no way to do that in SQL.
    In PL/SQL it is a simple situation of creating two cursors and simply deciding which one to open.
    <pre>declare
    l_cur sys_refcursor;
    begin
    if :user_selection = 1 then
    open l_cur for select A, B, C, D, E from tbl;
    else
    open l_cur for select A, B, C, F, G from tbl;
    end if;
    -- use the cursor
    close l_cur; -- or return to user interface
    end;
    /</pre>
    Hope this helps.

  • [MDX] Define date range based on user selection

    Hi All,
    I'm trying to define date range (of 3 months) using mdx based on user selection.
    This is what I'm trying to do:
    - If user select 2013, I would like range to be: from
    1 Oct 2013 to 31 Dec 2013
    - If user select Aug 2013, I would like range to be: from
    1 Jun 2013 to 31 Aug 2013
    - If user select 15 Sep 2013, I would like range to be : from
    15 Jul 2013 to 15 Sep 2013
    It is not a problem to get the upper bound of the range like this:
    ClosingPeriod(
    [Date].[Calendar].[Date],
    [Date].[Calendar].CurrentMember
    But I'm not able to get the lower bound of the range:
    OpeningPeriod(
    [Date].[Calendar].[Date],
    ParallelPeriod(
    [Date].[Calendar].[Month Number],
    2,
    ClosingPeriod(
    [Date].[Calendar].[Date],
    [Date].[Calendar].CurrentMember
    Error:If user selection is
    15 Aug 2013, I get
    14 Jun 2013
    If user selection is Apr 2013, I get
    (null)
    And even more strange, if user selection is
    2013, I get 28 Oct 2013
    Any idea of how to solve this ?
    Thanks,
    Guillaume

    Hello Guillaume,
    Can you please check if the following works for you? By the way, the performance will suffer due to all these IIF, the solution is very complex in order to avoid null in ParallelPeriod.
    with member measures.high as MemberToStr(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    member measures.low as
    MemberToStr(
    iif(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ) IS ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ).Parent.LastChild  --last date of the month
    OpeningPeriod(
       [Date].[Calendar].[Date],
    Ancestor(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ), [Date].[Calendar].[Month]).lag(2)
    iif([Date].[Calendar].CurrentMember.level is
    [Date].[Calendar].[Date]
    and
    Right(CSTR([Date].[Calendar].CurrentMember.Properties("KEY0")),4)="0429" --take care of 4/29
    OpeningPeriod(
       [Date].[Calendar].[Date],
    Ancestor(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ), [Date].[Calendar].[Month]).lag(2)
    OpeningPeriod(
       [Date].[Calendar].[Date],
       ParallelPeriod(
          [Date].[Calendar].[Month],
          2,
          ClosingPeriod(
             [Date].[Calendar].[Date],
             [Date].[Calendar].CurrentMember
    select  {measures.low,measures.high } on 0
    from [Adventure Works]
    where
    --[Date].[Calendar].[Date].&[20070815]
    --get [Date].[Calendar].[Date].&[20070615]
    --[Date].[Calendar].[Date].&[20070530]
    --get[Date].[Calendar].[Date].&[20070330]
    --[Date].[Calendar].[Date].&[20070429]
    --get [Date].[Calendar].[Date].&[20070201]
    --[Date].[Calendar].[Calendar Year].&[2007]
    --get [Date].[Calendar].[Date].&[20071001]
    --[Date].[Calendar].[Month].&[2007]&[4]
    --get [Date].[Calendar].[Date].&[20070201]
    --[Date].[Calendar].[Month].&[2007]&[5]
    --get [Date].[Calendar].[Date].&[20070301]
    --[Date].[Calendar].[Date].&[20070228]
    --get [Date].[Calendar].[Date].&[20061201]
    --[Date].[Calendar].[Date].&[20070831]
    --get [Date].[Calendar].[Date].&[20070601]
    If this does not work for you, I would suggest opening a ticket with Microsoft Support, with an advisory type of request.
    Hope this helps.
    Thanks.
    Meer Al - MSFT

Maybe you are looking for

  • Sharing a Personal LaserWriter 320

    I know how to share the printer, but the support website here just has me going round and a round and a round in circles trying to download the LaserWriter Bridge CP. I can find the userguide and the installation instructions, but I have been searchi

  • WebAS - invalid property value

    Hi, I started to apply SP11 to WebAS 6.4 SP9 and now having problems starting the dispatcher-process. The developer-trace shows two errors: error => Invalid property value [box.number/J2EJC00MC00009304] [jstartxx.c 808] error => Invalid property valu

  • Option+Return does not work in applescript studio

    Fresh install of osx 10.4.6 Tiger, newest release of xcode. I start an applescript studio application project, when editing in Xcode Option+Return does not insert the continue line character. I can open the same .applescript in the Applescript Editor

  • Can't restart or shut down. Certain sites force quit browser.

    Just yesterday my mac was running fine but all of a sudden if i went to certain websites it force quits my browser. then i realized i can't restart or shut down unless it's a hard reboot. Also, i can't check "About this mac" when i click on it my scr

  • Audio chat with iChat (Mac) and Trillian (PC) not working

    I use iChat on my Mac (actually, we have tried two different ones with the same results) and the person I want to have an audio chat with is using Trillian Basic (just downloaded) for his PC. We tried using the AIM client on his PC and that didn't wo