Pass hidden value through a form

Hi.  I'm trying to create a registration form in which users select an organization from a drop down list that is populated from a db table.  All I want the user to see is the origanization's name, but there is also an ID number for each organization in the table.  Is there a way I can submit the ID number for the origanization the user chooses as a hidden field?  I feel like it should be fairly simple, but I can't wrap my brain around it.
Thanks for any help!

What you've done here is ideal, you just need to make sure you pull back the person's organisation info at the same time as you get their base info to avoid you doing multiple database calls - from the sounds of it this is what you've done. If not, and for the purposes of anyone else who has similar requirements, you do something like this:
Table 1 - Organisations
  org_id     NUMBER
  org_name   VARCHAR
Table 2 - Users
  user_id       NUMBER
  user_org_id   NUMBER
                FOREIGN KEY onto ORGANISATIONS (org_id)
  user_name     VARCHAR
  user_password VARCHAR(32)
  etc etc
Then you get back all the info, a simple join will do:
SELECT      *
FROM        users,
            organisations
WHERE       user_org_id = org_id
AND         user_id = whatever
That way you're doing all the work at the database level - there is simply no faster way of doing this as databases will walk all over Coldfusion when it comes to speed and efficiency.
Good work, glad you've got it sorted!
O.

Similar Messages

  • How to retrieve the procedure value and pass the value to a form field

    How to retrieve the procedure value and pass the value to a form field?

    Set property for the field and the value is the actual procedure/function.
    Cheers

  • How to pass attribute values through variables in JSP  Custom TagLib

    Hi,
    Can anybody help me how to pass values through varuables in the jsp custom tag.
    i am using JSP custom tag. I am unable to pass attribute values through variables.
    <invitation:invdetails invid="<%=invid%>"/> The value is passing as <%=invid%> ,not value of the invid.
    But i am getting throuh the fllowing
    <invitation:invdetails invid='1' />
    Please anybody suggest me how to pass value by using the variable.

    Hi,
    It sounds like you need to set the <rtexprvalue> tag to true in the TLD for your tag. If you do this the tag will read in the value you are trying to pass to it.
    dapanther...

  • How to pass hidden values

    There is a row which has 2 fields
    <td >�Ticket No</td> <td >�Bill No</td>
    <td ><input type="text" name="<%= ticketNo+ %>" value="" size=10></td>
    <td ><INPUT TYPE="TEXT" NAME="<%=billNo+"%> value="" size=10></td>
    I want to pass the values entered in the row along with one hidden value called as rowId. The rowId is attached to the ticketNo and billNo values.
    How to do this???.........Plz Help
    Any idea , if there are many rows?

    Here is a basic servlet that reads three parameters from a form. One of the is hidden. You can see that its no different from reading non hidden form fields.
    -S-
    // The Servlet
    package sample;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    public class TestServlet extends HttpServlet {
         private final String CLASS_NAME = "TestServlet";
         public void init(ServletConfig config) throws ServletException {
              super.init(config);     
         public void doGet(HttpServletRequest req, HttpServletResponse res)
              throws ServletException, IOException {               
              doWork(req,res);
         public void doPost(HttpServletRequest req, HttpServletResponse res)
              throws ServletException, IOException {
              doWork(req,res);     
         private void doWork(HttpServletRequest req, HttpServletResponse res)
              throws IOException {
              String val1 = req.getParameter("Value1");
              String val2 = req.getParameter("Value2");
              String val3 = req.getParameter("Value3");
                    System.out.println("Val1: " + val1 + "\nVal2: " + val2 + "\nVal3" + val3);
    // JSP Page with hidden fields, posts to our Servlet
    <html>
    <head>
         <title>Test Page</title>
    </head>
    <body>
    <form action="/Test" name="" method="Post">
    <input type="text" name="Value1" value="This is value 1">
    <input type="Hidden" name="Value2" value="This is hidden value 2">
    <input type="text" name="Value3" value="This is value 3">
    <br>
    <input type="Submit" value="Submit Form">
    </form>
    </body>
    </html>
    // web.xml servlet entry and mapping
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
        <servlet>
            <servlet-name>TestServlet</servlet-name>
            <servlet-class>sample.TestServlet</servlet-class>
        </servlet>
         <servlet-mapping>
              <servlet-name>TestServlet</servlet-name>
              <url-pattern>/Test</url-pattern>
         </servlet-mapping>
    </web-app>   

  • Pass a value to a form to be used as a label/readonly

    I have a link between a report and an update form. I want to pass the value of a report column to the form to be used as a label. The report column does not exist in the table that the form is based on. How can I do this? I added an item to the form, but that item does not show up in the link details for assignment of a value. Is this a refresh problem?

    How do I get the value (VAC_ID) to the form from the link? When you edit the link you can assign column values to the parameters. How can I get the parameter (VAC_ID) to show up as a parameter when it is not in the record?

  • How do i pass a URL through a form ??

    Hi,
    I want to open Internet Explorer through my form , may be from a Button. How do I dothat i.e. how do we pass URL from a form..
    Is it possible through host command ??
    Any one any comments ???

    Use the web.show_document, check the online help for more details. It will open the default browser.
    Ex :
    WEB.SHOW_DOCUMENT('http://www.oracle.com');
    Even the HOST command works :
    Ex:
    host('C:\Program Files\Netscape\Communicator\Program\netscape.exe www.oracle.com');
    Abhijith Unnikannan,
    Oracle Support Services

  • To pass the values through variable in JDBC adapter

    Hello,
    We are working in JDBC adapter. Currently we have written the select statement in JDBC sender adapter to select all the values from the table in SQL SERVER.
    Instead of this, Can we use a variable and pass the values in there from XI in order to select the records from the table based on values in the variable?
    Expecting Advice!
    Thanks,
    Lakshmi.

    Hi krishnan,
    You can use the JDBC receiver adapter to acheive a select using variables. Here you create a canonical XML format(your XSD) based on which the JDBC receiver adapter issues a select and returns you the response. chk this url in help site http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm for the canonical format.
    However u lose the flexibility of polling the table at regular tables available with sender adapter. Also you need an event(a message) to trigger this select query execution, since it is a receiver CC config.
    -Saravana

  • Pass Parameter value through hyperlink?

    Hello and a Happy New Year to everyone!
    I have an ASP.NET web application that I am making. I was wondering if it were possible to pass a value to a CR that has a parameter value.
    In my example, I have a report called rptLicenseReport. This report has a parameter value of FileNo. Which comes from the field File No in the table License Applications in the database (Access) . Of course, CR does its own curly bracket thing for the parameter... but I was wondering if it was possible to have a hyperlink on my main page that points to the report.aspx page (which holds the report viewer, and the report as a whole) while passing the File Number.
    Essentially I would like the link to look like : www.urllinkhere.com/report.aspx?FileNo=6
    and when clicked that path would open the report.aspx page and pass the FileNo into the report. I have tried to make the report and have the link pass just like that but the report comes back with an error stating that there is no parameters chosen/given (thinking off-hand, error is something like that).
    Any help with this problem would be greatly appreciated. For those interested my report is in VB language, not C#.
    Much Thanks!
    --Matt
    Edited by: Matthew Gonzalez on Jan 2, 2009 8:50 AM

    AG,
    Much thanks for the code, I modified it to fit my VB environment and it worked well. What I have it doing is utilizing some of the earlier information on the http requerying having the labelID in the URL get posted to a label. Using your code I then have the label ID set as the parameter source. This worked fine and it now populates the report with the ID of the earlier record selected.
    Here's my code as an FYI and future reference:
    Protected Sub LabelReference (ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load
            lblID.Text = CInt(Request.QueryString("FileNo"))
        End Sub
        Protected Sub ReportDocument(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportSource1.DataBinding
            Dim rdoc As New ReportDocument
            Dim rptValue As Object
            rptValue = CInt(lblID.Text)
            rdoc.Load(Server.MapPath("~/files/rptLicenseView.rpt"))
            rdoc.SetParameterValue("FileNo", rptValue)
            CrystalReportViewer1.ReportSource = rdoc
        End Sub

  • Passing Net value through BAPI_SALESORDER_CREATEFROMDAT2

    HI All,
    I am using BAPI_SALESORDER_CREATEFROMDAT2 to update sales order.
    Here Sales order has been creating but without net value. while i am trying to create using BAPI_OUTB_DELIVERY_CREATE_SLS
    system throwing an error " sales order is incomplete - maintain order"
    If I can fill net value then the order will be completed. how can I pass net value?
    Thanks,
    kalandar

    You cannot pass item NET VALUE to the BAPI directly.  Net value is calculated based on the Pricing conditions and the configuration of Pricing procedure.

  • Pass hidden values to same page by clicking on href

    I have A.jsp page which has some dynamic hidden fields.The respective code is given below:
    <script language="javascript">
    function submitForm()
    {document.main.action="main.jsp"; document.main.submit(); }
    </script>
    <form name="main">
    HOME
    <input type="hidden" name="user_p" value="<%=user1%>"/>
    <input type="hidden" name="p" value="Hello"/>
    </form>
    When I click on link-HOME, it reconnect to A.jsp but does not pass the hiddden values. Could you help me?

    It did not work.Now after modifying the code for this (I did this because some browser does not support two functions ,like in href. By thinking that it could be the problem)
    <script language="javascript">
    function submitForm()
    document.main.action="main.jsp"; document.main.submit(); }
    </script>
    <form name="main" method="POST">
    HOME
    <input type="hidden" name="user_p" value="<%=user1%>"/>
    <input type="hidden" name="p" value="Hello"/>
    </form>
    Could you explain with working code?

  • How to pass the value of the form element "SR ID" on the URL in Apex

    Hi All Good Day!!
    I am new to Oracle Application Express, i have been started working from past 2 months. I have a request from client, how we can achieve the same in Apex. Please find the
    deatils below.
    In my application we have a text item as "SR Number", for that filed they want below scenerio to be work around, could some one help me for the below request.
    Check the incoming request for a passed parameter and set it to a value using something like this Request.querystring(“p_t10”). If nothing is passed the form is set up with a blank in the SR ID field, if a value was passed you populate the field, perhaps the log-in page can pick-up the parameter and store it in the session to later be put on the form after successful log-in.
    Label: SR ID
    Name: p_t10
    ID: P1_ENG_SID
    URL: http://sampletest.com:6666/pls/temp/f?p=123:1&p_t10=495694-94583875
    Below are the deatils of mine Apex versions#
    Apex Build: 3.0.1.00.08
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    Schema Compatibility: 2007.05.25
    PL/SQL Release 10.2.0.4.0
    CORE 10.2.0.4.0
    TNS for Solaris: Version 10.2.0.4.0
    Internet EXplorer-7
    Firefox-12.0
    Regards,
    Sruthi!!

    hai Sruthi,
    if you know the emply item creation and set vlaue?
    Create new item as dummy in target page.
    set current value and pass to that dummy item, then can use that value at target page.
    f?p=&APP_ID.:20:&SESSION.::&DEBUG.:RP,20:P20_XUSER_SECTION,P20_XROW:&P17_NWM_ACCES_SECTION.,&P17_NWM_DOC_ID.
    =Means=
    target Page # 20
    Target items   P20_XUSER_SECTION and ,P20_XROW
    Values from current page: &P17_NWM_ACCES_SECTION. for P20_XUSER_SECTION
                              &P17_NWM_DOC_ID. for P20_XROW
    If Tablar form/IR page use the following
                 #P17_NWM_ACCES_SECTION#  for P20_XUSER_SECTION
                 #P17_NWM_DOC_ID# for P20_XROW

  • Page 404 Error when passing Session values through URL

    The current application I'm working on is a 'Targeted Email Communications' application. Bascially, employees at the school at which I'm employed can go in and select services to recieve outage notification emails on.
    The problem I'm discussing in this post has to do with our so called 'Notification Summary Screen.' This screen is basically a report region which displays all outage notifications issued by this application. In the left-most column of this report, I have an edit button that when clicked, redirects the user to the 'Create / Update / Send Screen' with the primary key values passed through the URL. When this happens, all other page items query their values based on the NOTIF_ID passed in through the URL. All of this works fine.
    The problem is, on the Notification Summary Screen, I also have a button labeled 'Create a new notification.' This button redirects the user to the same page as before, except now all of the values are NULL because this outage notification has not yet been created. The problem is, when I try and do this - I get a page 404 not found error. I'm pretty sure it's because my application is getting confused because earlier all of the values were passed in through a URL. For the 'Create New' button, I clear the page cache for this page - and it still does nothing. I am at a loss for what to do here because I keep getting the error.
    Here's the code for the URL button found in the report query in the 'Notification Summary Screen' :
    ('<a href='
              || 'f?p=&APP_ID.:2:&SESSION.::&DEBUG.::'
              || 'P2_NOTIF_ID,P2_NOTIF_SEQ,P2_INFO_TYPE:'
              || a.notif_id ||','|| b.notif_seq || ',' || 'Update'
              || '>'
              || '<img src="#APP_IMAGES#EditButton.gif" />'
              || '</a>') as "edit",** NOTE, I took out the double quotes after href and before the closing right karat brackets because for some reason the code in the URL wouldn't display...weird.... **
    The NOTIF_ID value is the primary key identifier for each outage notification. Additionally, the NOTIF_SEQ value is the sequence number for each (because each notification could have multiple updates). The INFO_TYPE value just references whether this is 'Initial', 'Updated', or 'Closing' information.
    Any suggestions would be much appreciated.
    Eric
    Edited by: user11685190 on Nov 6, 2009 1:12 PM
    Edited by: user11685190 on Nov 6, 2009 1:13 PM
    Edited by: user11685190 on Nov 6, 2009 1:14 PM

    Hey you guys,
    Thanks for your responses. I actually just started working for this academic institution, and have to finish a probationary period before I have access to their VPN (5 Months). Therefore, I cannot access my workspace, nor will they allow me to export my application because it's considered their intellectual property. I believe it may be the &DEBUG portion of it.
    Though I cannot state the exact URL the error states, I can tell you that if I go into application builder to the page in question and try and run it before the page that links to it, I get the error. However, when I use the link everything works fine. When I use the 'Create New' button to link to the page with no values passed, I get the error again. I work again on Monday and will have more information then.
    Thanks again!
    Eric

  • How to pass row values through OpenDocument Hyperlink

    Hi all,
    I should pass through an OpenDocument hyperlink the value of a particular row of my report. No problems about the OpenDocument syntax and about the other parameters that come from prompt answers, but I don't know how to pass only the value of that particular row. This value doesn't come from a prompt.
    So for example if the column of my report was "Account number" and the 1° row of the column that comes from the query was "123456", I should pass only the account number "123456" to the linked document.
    Moreover, I have to create the hyperlink on the "Account number" column.
    Hoping having been clear...
    Thanks in advance,
    Riccardo

    Hi Stratos,
    Thanks for the reply but I have not understood very well.
    I try to explain better my issue, making an example of the problem in Open doc syntax
    http://aaaaa.bbbbb.com:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=12345&..............&lsSParam1=()&lsSParam2=()&lsSParam3=()
    The problem is in the 3° paramater. This parameter is not a user response variable, it comes from an object projected in the report. The object is a numeric type.
    The aim is to pass to the 2° report exactly the content of the cell of the 3° parameter, dinamically (I mean depending on the cell selected by the user).
    Thanks.
    Regards,
    Riccardo

  • How to pass hidden values to a report using reports6i

    Hi,
    I have created a fully running report
    and calling this report from a java based application. Now i wish to write a query
    which will filter the data on the basis of user id sent by java based application. This value can be in session or cookie. I need to send this value as a hidden variable and use this in the data model to write a query. Is this possible using reports 6i.
    null

    Shailesh,
    Is is necessary to send the parameter hidden? You can use the cgicmd.dat file to put all the parameter in and on the url specify the key within the cgicmd.dat file. If you have a set of know values this might work, but if you are reacting to the parameter to create what is being used in the report it might be difficult. For more information on the cgicmd.dat file see the manual "Deploying Applications to the Web" at http://www.oracle.com/pls/use/use_asset_html.download_asset_form?p_user_id=100&p_asset_id=110924&p_url=http://technet.oracle.com/doc/dev2k.210/guide21/d2k_web.htm&p_queryid=2184408
    Hope this helps a little.
    Regards,
    The Oracle Reports Team

  • How can I pass parameter value into first form?

    hello all
    I have one form called logon.fmx
    I have parameter in that form called "common_home".
    when I run that form browser I need to trasfer the value for parameter "common_home".
    how can I do this?
    From
    Chirag Patel

    Hi all
    1) I am used to config='myconfig' in my application to run the application from browser.
    2) in formsweb.cfg I have add one more parameter like as follows
    otherparams=common_home=c:\chirag\erp
    3) you can add n number of user defined parameter here.
    it is working fine.
    From
    Chirag Patel

Maybe you are looking for