Query based on a test input box

query based on a test input box
hi
i have this html input box and i want to output a query based
on what i put in the input box. what should i do now.
thanks
<form id="form1" name="form1" method="post" action="">
<label>enter id <input type="text" name="textfield"
/>
</label>
</form>

Read the documentation:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001252.htm
page1.html
<form id="form1" name="form1" method="post"
action="page2.cfm">
<label>enter id <input type="text" name="textfield"
/>
</label>
</form>
page2.cfm
<cfquery name="foo" datasource="bar">
SELECT aField, bField, cField
FROM aTable
WHERE aField = <cfqueryParam value="#form.textfield#"
cfsqltype="cf_sql_varchar">
</cfquery>
<cfoutput query="foo">
#aField# #bField# #cField#
</cfoutput>
briankind wrote:
> query based on a test input box
>
> hi
> i have this html input box and i want to output a query
based on what i put in
> the input box. what should i do now.
>
> thanks
>
>
> <form id="form1" name="form1" method="post"
action="">
> <label>enter id <input type="text"
name="textfield" />
> </label>
> </form>
>

Similar Messages

  • Query Based on Different Infoelements

    Dear Guys,
    In a Infoset, I want to define a Query based on the different data element from the InfoObject. But both the elements are having same data type, size etc. Only data elements name's are different. For example in one Infoobject it's known PERSON_CODE and in the other Infoobjects is known as LIBRARY_ID.
    Hope some one can help me.
    Regards
    Jayaram M

    Read the documentation:
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001252.htm
    page1.html
    <form id="form1" name="form1" method="post"
    action="page2.cfm">
    <label>enter id <input type="text" name="textfield"
    />
    </label>
    </form>
    page2.cfm
    <cfquery name="foo" datasource="bar">
    SELECT aField, bField, cField
    FROM aTable
    WHERE aField = <cfqueryParam value="#form.textfield#"
    cfsqltype="cf_sql_varchar">
    </cfquery>
    <cfoutput query="foo">
    #aField# #bField# #cField#
    </cfoutput>
    briankind wrote:
    > query based on a test input box
    >
    > hi
    > i have this html input box and i want to output a query
    based on what i put in
    > the input box. what should i do now.
    >
    > thanks
    >
    >
    > <form id="form1" name="form1" method="post"
    action="">
    > <label>enter id <input type="text"
    name="textfield" />
    > </label>
    > </form>
    >

  • Query based on permission

    Does anyone know if there's a way to query for group (or any other object) based on the current user's permission?  For instance, if I wanted to retrieve all of the groups to which the current user has read access?
    If not, is there a way to retrieve the current user's access level for each object in the query?  So for instance, in addition to returning the group name and group id, also return the user's level of access.
    Thanks a lot!

    Read the documentation:
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001252.htm
    page1.html
    <form id="form1" name="form1" method="post"
    action="page2.cfm">
    <label>enter id <input type="text" name="textfield"
    />
    </label>
    </form>
    page2.cfm
    <cfquery name="foo" datasource="bar">
    SELECT aField, bField, cField
    FROM aTable
    WHERE aField = <cfqueryParam value="#form.textfield#"
    cfsqltype="cf_sql_varchar">
    </cfquery>
    <cfoutput query="foo">
    #aField# #bField# #cField#
    </cfoutput>
    briankind wrote:
    > query based on a test input box
    >
    > hi
    > i have this html input box and i want to output a query
    based on what i put in
    > the input box. what should i do now.
    >
    > thanks
    >
    >
    > <form id="form1" name="form1" method="post"
    action="">
    > <label>enter id <input type="text"
    name="textfield" />
    > </label>
    > </form>
    >

  • Select query based on userinput

    Hi Folks...
    I posted this in another forum, but no reply,so I am posting it here too. I am trying to make a select query based on a user input. Earlier I was having probelms making a select query and printing out the result in the stack trace,with the advice given, I managed to solve that. I am now modifying that code to make a query based on user input, however it's not working, following is the code:
    String userId = request.getRemoteUser();  String sql = "SELECT hoursused FROM sysuser WHERE iduser = ?";    try      {        Connection connection = dataSource.getConnection();        PreparedStatement preparedStatement = connection.prepareStatement(sql);        preparedStatement.setString(1, userId);                ResultSet srs = preparedStatement.executeQuery(sql);                            while(srs.next()) {                          String hoursused = srs.getString("hoursused");                          System.out.println("The hours used are " + hoursused);    }                  }    catch (SQLException e)      {    e.printStackTrace();    }        } 
    stack trace seems to suggest I may have a probelm with this statement:
    "SELECT hoursused FROM sysuser WHERE iduser = ?"; 
    I am not sure how to rectify this, I hope someone can advise, thanks.

    Hi jschell..
    Thanks for responding, I appreciate it. The problem has been solved. No 'sysuser' is not a reserved word in Mysql. Based on the advice given in another forum and also from this site, I managed to solve the problem. I only made one change. This:
    ResultSet srs = preparedStatement.executeQuery(sql);     was changed to this:
    ResultSet srs = preparedStatement.executeQuery();  Thanks.

  • How to use input box LOV in query panel (search region)

    Hi,
    We are having JDeveloper version 11.1.2.4.0
    In one of the JSF page, we are showing some data (absences).
    Requirement is to add search region at the top so that user can filter the data, based on search parameters like Business Group, Job etc.
    The search parameters are inter-dependent e.g. Job is dependent on Business Group. So when user selects some particular Business Group, Job search field should show jobs for that Business Group only.
    This works fine we use Choice List for both Business Group and Job.
    However since there are huge number of jobs, Job choice list makes page rendering very slow.
    So we tried to use Input box with LOV for Job.
    But now when job is selected in the LOV popup and returned to main page, job search field shows job id instead of job name.
    Please note that our base VO (AbsencesVO) contains JobId attribute. We have added List of Values on JobId, which fetches Job Name through JobVO1 view accessor.
    How to make Job LOV field show selected Job Name instead of ID? Kindly advise.
    Thanks,
    Vivek

    Thanks Timo/Bangaram, for prompt replies
    Timo, the link mentioned by you talks about showing IDs (DepartmentId, ManagerId etc.) in the search region. I need to show names in the form of Input box LOV.
    Bangaram, as per your suggestion I tried using transient JobName attribute. However now when I select any value in the Job LOV popup and return to main page, it shows first Job Name in the Job Name search field.
    Also when I click 'Search' button in Search panel, it shows error - Attempt to set a parameter name that does not occur in the SQL: BindJobName
    Please note that I have added both JobName and JobId in the List configuration as you suggested.
    In View criteria, I have removed previous item (condition) on JobId and added condition on JobName.(This is required because JobId condition shows JobId search field)
    I also tried making JobName dependent on JobId..still same behaviour.
    Kindly advise.
    Thanks,
    Vivek

  • Reduce the size of Input box comingby  default with search query

    Hi,
    I have created one EO and VO and one jsp for that . Inside that VO , there is one option Named Criteria, which is having All Queriable Attributes option , on drag and drop of this option i have got default search page for all the attributes which i had in my form , But with every dropdown am getting one input box to specify the value of my search, i want to reduce the size of that input box . there is no code in the jsp for those attributes.
    Please help
    Regards
    shadab

    Filed bug# 6501297 to track this issue. Thanks for reporting it.
    For now you'll need to manually add an additional facet to the content of the query component's "valueStamp" facet with the id of the same name as the attribute and manually set the properties on an <af:inputText> to the desired width.
    Between Tech Preview 2 and production the Query form component is being simplified to be more metadata driven, so this temporary workaround is applicable only to the TP2 release.

  • Input Ready query based on aggregation level

    I have an input ready query that reads data from an aggregation level, based on a multiprovider that contains a cube for planning and a cube with real data.
    There are two columns of data, two of them for read-only and another for input.
    I´m selecting different fiscal year/periods for each column.
    The problem is that, when I select fiscal year/periods and the real data cube doesn´t contain any data for this filter, it doesn´t show me a line to input data anyway..
    how do I configure the query so that it understands that eventhough I don´t have data for the selected period, I still want to be able to perform the planning?
    Thanks,
    Cris.

    Hi Christina,
    Even though there is no Data in the  Real time Cube the Query must allow you to Input values. I guess the Query you have designed is not enabled for input yet.
    Kindly check the following Points before proceeding.
    1. In the Query properties under Planning tab, make sure the Start Query in change mode is turned On.
    2. Make sure you have used all of the characteristic in the aggregation level in the Query and is restricted to single value.
    3. make sure the columns are Input ready under the Planning tab in its properties
    Hope this Helps.
    Regards.
    Shafi.

  • Filtering based on the value in a Input Box?

    Is it possible to filter a gallery based on something I enter into an input box?
    If so what is the syntax for the command I need?
    Right now I am trying Filter(UF_Football_Roster, Number =) and then I have no idea what to put after the equals sign.
    Thanks for the help!

    Hi Philip,
    Yes. Assuming Number is a column in the table_UF_Football_Roster, and assuming you added an input text visual named InputText1, here is the syntax:
    Filter(UF_Football_Roster, Number = InputText1!Text)
    If the value in the Number column are stored as numbers you may need to use the function
    Value:
    Filter(UF_Football_Roster, Number = Value(InputText1!Text))

  • Differet Load query based on parameter input

    Hi all,
    I'm developing my first application with HTML DB and I have a problem. I have a table with no primary key and a unique index on three columns and only one of these can be null. I'm building a form with my events that execute a query based on the data passed from another page.
    My problem is that I have two queries (one with the clause column_a is null and another one with column_a=value) but I'm not able to condition the execution on more than one item values; I'd like to know how to express into conditional processing section
    PXXvariable_1 is null and PXXvariable_2 is not null.
    I can use a workaround in the query using nvl but I'm wondering if is possible to expresso such constraints in constional processing section.
    Thanks to all,
    Giovanni

    Giovanni,
    See this section of the documentation on the HTML DB URL syntax:
    http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10992/mvl_fund.htm#sthref447
    You want something like this:
    f?P=101:<page ID>:&APP_SESSION.::::PXXPARAM_1,PXXPARAM2:VAL,
    Here, PXXPARAM_1 will be set to VAL and will be set to NULL
    Sergio

  • Maximum Characters Input Box

    What is the fattest letter? i.e. what should I use to test
    that content always fits within an input box regardless of what the
    user types? Is it the letter "M"? I know M is used as a standard in
    other design circles.
    Thanks

    Thank you. Is there an easy way to do the opposite, have a
    user's text adapt to the textfield? For example, I have an input
    textField that is 100 pixels in width, single-line, size 20 _sans
    font (Maximum Characters turned off for demo. purposes). You can
    input 5 "M's" before the field begins scrolling right, or you can
    enter 24 lowercase "l's". In this case the input is for a form that
    will be printed, therefore scrolling cannot occur (since it wouldnt
    show up on the print form), and Maximum characters must be turned
    on. So I would have to limit maximum characters to 5 right? In
    reality I'm working with much larger textfields, but you get the
    idea. Is there a way to set the maximum characters based on user
    input?

  • Conditional for a text input box NOT being null? Sorry for asking so many questions!

    Okay, here's the situation. I'm creating a simulation of a form on which there are several text input boxes, 7 of which are mandatory fields. I know I can use a conditional to check whether the box has nothing in it by creating a null variable with no value and doing "if [box variable] is equal to [null variable] then", but the problem is that the validation captions I need to show need to be shown in order, that is to say that the caption for entering a value for the first box will always be shown if that box is null regardless of the contents of other boxes, the second will be shown if that one is null and the first one isn't etc.
    When I was investigating this I noticed a post by Lilybiri saying that comparison with a null variable doesn't work for "not equal to" so I'm having a hard time figuring out how to show the captions based on priority. For example, to show the second caption I need to not only check whether the second box variable is null, but also whether the first one isn't.
    It gets pretty crazy further along the line where I get to the 7th mandatory field and need to check whether the first, second, third, fourth, fifth and sixth boxes are NOT null and whether the 7th one IS. Help!
    I did come up with one potential solution to this prior to posting: if I set a different advanced action for each input box losing focus which checks whether the variable is null and if so sets a "flag" variable to 0, and in the else set it to 1, I imagine I can then replace the "not equal to" with a check to that flag variable being equal to 1 (which means there is text in the box). I think this will work but I thought I'd check to see if there's an easier way first.

    No it DOESN'T require everything to be on one slide.  It just has to LOOK as if that's what it is.
    I would suggest that it doesn't really matter how many Captivate slides are involved in the final solution, as long as it works the same way (or as close as possible) to the original software that you are simulating.  Your users don't frankly know or care how you achieved the simulation.  I guarantee they won't be thinking of you or Captivate.
    In my experience, you can make creating elearning a lot more difficult than it needs to be in Captivate by trying to rebuild the app, rather than just simulating how it works. For example, thinking that if everything happened on one web page or screen in the app then it must also happen on a single slide in Captivate.  The fact of the matter is IT DOESN'T need to work this way.  And in some cases it might even be impossible to reproduce in Captivate this way.
    So the quickest path to a solution is often to use multiple slides, which has the advantage of allowing you to "fix" certain things on screen (e.g. the contents of fields already visited) by using READ ONLY variable output in transparent captions, focusing only on one element of the interface that the user can interact with on that slide.  It doesn't necessarily prevent you from moving back and forth between elements, just as you can in the original app.  But it is far easier to create and maintain.
    I'm not saying you wouldn't be able to pull this off on one slide in Captivate, but it is going to require a LOT of variables and Advanced Actions to build and debug.  So the term Rapid Elearning becomes something of a misnomer if it takes you a long time to complete one slide.

  • BEx query based on virtual cube donu00B4t display a valid List of Value (LOV)

    Hello
    I have a problem with an invalid LOV. The scenario is the following; There´s a BEx query based on a virtual cube. The query has an exit variable on caracteristic that is based on 0CALMONTH.
    At Universe Designer I simply create a connection, a universe based on this query and export.
    At Web Intelligence (also at Live Office), when I try to execute de query, the prompt to fill my exit variable display a list of value that doesn´t match with the values of the caracteristic at the cube.
    Actually, the list at the prompt starts with 01.0000 and finishes with 05.0968.
    In Universe Designer, the option to edit the list of values is not available. But I think that editing the LOV is not the correct way.
    I´ve tried creating a new query based on the DSO that is the source of the virtual cube. In this case, I had a valid list. Unfortunately, I can´t use this DSO.
    Did anyone already have this problem?

    Hi James,
    can you explain what you mean with "input length for that filed" ?
    The field in the table is varchar2(120). I coudn't found options for the List of value.
    Thanks for your response
    Carsten
    null

  • Additional i/o fields to infoset query based on PNPCE logical database

    Hi All,
    I have a requirement to add two additional input and output fields "job function" and "job family" to a infoset query based on logical database PNPCE. I am new to writing code in infset query and there are so many code areas in infoset query. I am confused where to write code and how to limit the output list based on the user selection to the additional fields "Job function" and "job family". have any one done this in the past?. is there sample code somewhere to do something similar to this?
    Your help will be much appreciated with points! (as per our community guidelines)
    Regards,
    Arul

    Hello Arul,
    Your question would be better answered if you post it in on of the Business Intelligence Forums. Please close this thread and goto:
    Expert Forums » Business Intelligence
    or
    /community
    Regards,
    Manny

  • SOURCING10: Passing parameters to a Query Based webservice using JAVA

    Hi Experts,
    I have been working on consuming a Query based webservice published in Souricng10 in a simple JAVA class. The query has a filter parameter which is not mandatory. I am able to consume the webservice using the GET method and display the content of the webservice. But when i try to POST a value to the filter parameter of the query i am getting the following error:
    java.io.IOException : Server returned HTTP response code: 415 for URL: http://sapcild9.web.bc:55000/sourcing/ngservices/rest/query/Z_TEST_WS_QUERY/execute/
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    Following is the code which i have used:
       URL url = new URL("http://sapcild9.web.bc:55000/sourcing/ngservices/rest/query/Z_TEST_WS_QUERY/execute/");
       HttpURLConnection connection = (HttpURLConnection)url.openConnection();
       connection.setRequestProperty("Authorization", "Basic " + authStringEnc);
       connection.setRequestProperty("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
       connection.setRequestProperty("Content-Length", "" +Integer.toString(urlParameters.getBytes().length));
       connection.setRequestProperty("Content-Language", "en-US");
       connection.setUseCaches (false);
       connection.setDoInput(true);
       connection.setDoOutput(true);
       connection.setAllowUserInteraction(true);
       connection.setInstanceFollowRedirects(false);
       connection.setRequestMethod("POST");
       connection.connect();
       //Send request
       OutputStream out = connection.getOutputStream();
       OutputStreamWriter wr= new OutputStreamWriter(out, "UTF-8");
       wr.write("EXTERNAL_ID");
       wr.write("=");
       wr.write(URLEncoder.encode("temp","UTF-8"));
       wr.close();
       out.close();
       is = connection.getInputStream();
       isr =new InputStreamReader(is);
       BufferedReader bufferReader = new BufferedReader(isr);
       String str; StringBuffer stringBuffer = new StringBuffer();
       while ((str = bufferReader.readLine()) != null) {
       stringBuffer.append(str);
       stringBuffer.append("\n");
       System.out.println(stringBuffer.toString());
       connection.disconnect();
       is.close();
    Please Advise how to proceed on this isssue?
    Thanks in advance.
    Srikanth Emani

    Hi Gael,
    your URL is made up of :
    [ProcedureName]?[parameter1]=[value1]&[parameter2]=[value2]
    creating URLs like this can have problems especially with spaces and punctuation.
    the answer is a FORM
    the following will create a hidden form :
    FORM ACTION="[ProcedureName]" METHOD="POST" name="F1"
    INPUT type="HIDDEN" name="[parameter1]" value="[value1]"
    INPUT type="HIDDEN" name="[parameter2]" value="[value2]"
    /FORM
    you can set the values in the form using:
    document.F1.[parameter1].value="abc123%%&&$$!";
    document.F1.submit();
    will submit the form and the PL/SQL procedure should receive the text as it was contained in the form.
    the only characters that can now cause problems are :
    " as it delimits the field.
    ' as it may cause problems in PL/SQL.
    \ as it is a special character.
    Regards Michael

  • Query based on date partition

    Hi,
    I am trying to output only a successful job during the past 24 hrs of each day. If there is job that has an outcome of a success and a failure within the last
    24 hrs for each day, I want to only output the successful one. If there are no success for the same job, I will output the last attempted failed job.
    Here are my columns:
    current output:
    JOB_ID     JOBDATE               GROUP     PATH          OUTCOME          FAILED     LEVEL     ASSET
    3400908     7/27/2012 10:01:18 AM     polA     target1          Success          0     incr     clone1
    3400907     7/27/2012 10:01:09 AM     polA     target1          Failed          0     incr     clone1
    3389180     7/23/2012 10:01:14 AM     polA     target1          Failed          1     incr     clone1
    3374713     7/23/2012 10:01:03 AM     polA     target1          Success          0     incr     clone1
    3374712     7/22/2012 11:24:32 AM     polA     target1          Success          0     Full     clone1
    3367074     7/22/2012 11:24:00 AM     polA     target1          Failed          1     Full     clone1
    3167074     7/21/2012 10:01:13 AM     polA     target1          Success          0     incr     clone1
    336074     7/21/2012 10:01:08 AM     polA     target1          Success          0     incr     clone1
    desired output:
    JOB_ID     JOBDATE               GROUP     PATH          OUTCOME          FAILED     LEVEL     ASSET
    3400908     7/27/2012 10:01:18 AM     polA     target1          Success          0     incr     clone1
    3374713     7/23/2012 10:01:03 AM     polA     target1          Success          0     incr     clone1
    3374712     7/22/2012 11:24:32 AM     polA     target1          Success          0     Full     clone1
    3167074     7/21/2012 10:01:13 AM     polA     target1          Success          0     incr     clone1
    Here is a code I am trying to use without success:
    select *
    from
       (selectjob_id, jobdate, group, path, outcome, Failed, level, asset,
              ROW_NUMBER() OVER(PARTITION BY group, path, asset ORDER BY jobdate desc) as rn
                   from job_table where jobdate between trunc(jobdate) and trunc(jobdate) -1 )
       where rn = 1
       order by jobdate desc;Thanks,
    -Abe

    Hi, Abe,
    You're on the right track, using ROW_NUMBER to assign numbers, and picking only #1 in the main query. The main thing you're missing is the PARTITION BY clause.
    You want to assign a #1 for each distinct combination of group_id, path, asset and calendar day , right?
    Then you need to PARTITION BY group_id, path, asset and calendar day . I think you realized that when you named this thread "Query Based *on date partition* ".
    The next thing is the analytic ORDER BY clause. To see which row in each partition gets assigned #1, you need to order the rows by outcome ('Success' first, then 'Failed'), and after that, by jobdate (latest jobdate first, which is DESCending order).
    If so, this is what you want:
    WITH     got_r_num     AS
         SELECT  j.*     -- or list columns wanted
         ,     ROW_NUMBER () OVER ( PARTITION BY  group_id     -- GROUP is not a good column name
                                   ,                    path
                             ,             asset
                             ,             TRUNC (jobdate)
                                   ORDER BY          CASE  outcome
                                                 WHEN  'Succcess'
                                         THEN  1
                                         ELSE  2
                                             END 
                             ,             jobdate     DESC
                           )      AS r_num
         FROM    job_table  j
         WHERE     outcome     IN ('Success', 'Failed')
    --     AND     ...     -- Any other filtering, if needed
    SELECT     *       -- or list all columns except r_num
    FROM     got_r_num
    WHERE     r_num     = 1
    ;If you'd care to post CREATE TABLE and INSERT statements for the sample data, then I could test it.
    It looks like you posted multiple copies of this thread.  I'll bet that's not your fault; this site can cause that.  Even though it's not your fault, please mark all the duplicate versions of this thread as "Answered" right away, and continue in this thread if necessary.
    Edited by: Frank Kulash on Jul 28, 2012 11:47 PM
    This site is flakier than I thought! I did see at least 3 copies of this same thread earlier, but I don't see them now.

Maybe you are looking for

  • Flash Player 10:  Adobe Misses the Mark

    When I heard about the Flash Player 10 launch, I was initially excited: there was some buzz about GPU optimization. However, when I saw the new product demo, I was very disappointed. Yes, there is GPU compositing, (useful for video and alpha channel

  • I have a sony icf-cs15ip and my iPhone 4S

    I have had the Sony ICF-CS15IP for a while now. It always worked great with my iPhone 4S. Today I tried to use it and the phone stated that this is not an acceptable accessory. How do I fix this? Thanks

  • Iphoto quits unexpecteudly when open web Facebook..how can fix

    iphoto quits unexpecteudly when open facebook web library how can fix    help me

  • Menu button to jump to previous/next chapter

    Hi! I have a Track with about 5 chapter markers. I want to use on-screen buttons to jump to next/previous marker. SPRM 7 stores the current chapter marker. How do I create a script that a) adds 1 to SPRM 7 and jump to that chapter b) subtracts 1 to S

  • Win 7 error: no acrobat pdf writer driver (but writer not installed)

    Hi, win 7 (64 bit) error log says acrobat pdf writer failed to initialise - no driver found. But I dont have acrobat writer installed so cant understand why its looking for this driver? How can I get rid of this error please? Regards, Don.