Passing selector value into final dataset

Hi
I have been struggling with this for a few weeks now and cannot come to any sort of reasonable solution that works, though I reckon what I want to do is probably fairly simple, I just seem to be having  a mental block as seeing through it. I would appreciate any pointers/guidance you might have as I really want to be able to use Spry in a number of projects. I have to say I am not brilliant with javascript- php is more my thing.
I have built a multi search form the idea of which is to identify memory cards for mobile phones,
1) The user selects from a drop down, the name of a mobile phone maker (the list is generated from a database dynamically)
2) Having selected a make, the second drop down shows the models of phone made by that maker. (again this list is generated server side from a database)
3) Having selected the model  from the second drop down, I want the final selection of phone model to cause a div in the main section of the page to populate with a list of selected memory cards compatible with the phone.
The third stage is what has me struggling.
I used the sample code on the spry site as my guide though have made some changes as in the form presented I was getting a lot of errors (invalid value errors as alternate values in the selection list) I even gett his using the code and xml provided in the sample pages for the validation selector- so don't know whats going on there) . My code now seems to work but I cannot see how to generate the final output from the final selection- I guess I need some form of event handler - I thought of a simple form submission button but I could not get this to work either.
This is my code so far:
<script src="includes/xpath.js" type="text/javascript"></script>
<script src="includes/SpryData.js" type="text/javascript"></script>
<script src="includes/SpryValidationSelect.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var dsMakes = new Spry.Data.XMLDataSet("xmlquery/makerssql.php", "makers/makerrecord");
var dsModels = new Spry.Data.XMLDataSet("xmlquery/modelssql.php?maker={dsMakes::id}", "handsets/modelrecord");
var dsMemory = new Spry.Data.XMLDataSet("xmlquery/memsql.php?{dsModels::{memory}", "memcards/cardrecord");
//-->
</script>
<link href="css/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
     <div id="index_r1_c1">
     </div>
     <br class="clearfloat" />
     <div id="colwrap1">
          <div id="index_r2_c1">
          <form action="" method="get" name="form1" id="form1" >
  <fieldset><legend>Memory Card Search</legend>
       <span spry:region="dsMakes " id="makeSelector">
         <label>Make</label>
                     <select name="selectMakes" id="selectMakes" spry:repeatchildren="dsMakes" onchange="document.forms[0].selectModels.disabled = true; dsMakes.setCurrentRowNumber(this.selectedIndex);">
                       <option value="{id}">{manufacturer}</option>
                </select><span class="selectRequiredMsg">Please select an item.</span>
    </span>
<span spry:region="dsModels" id="modelSelector">
    <p>
                <label>Model</label>
                     <select name="selectModels" id="selectModels" spry:repeatchildren="dsModels" onchange="document.forms[0].selectMemory.disabled = false; dsModels.setCurrentRowNumber(this.selectedIndex);">
                       <option value="{memory}">{model}</option>
                </select>
<span class="selectInvalidMsg">Please select a valid item.</span><span class="selectRequiredMsg">Please select an item.</span>
         </p>
</span>
</fieldset></form>
<script type="text/javascript">
<!--
var spryselect1 = new Spry.Widget.ValidationSelect("makeSelector");
var spryselect2 = new Spry.Widget.ValidationSelect("modelSelector",{validateOn:["change", "blur"], invalidValue:"-1"});
//-->
</script></div>
        <div id="leftbar"></div>
    </div>
     <img src="images/index_r2_c3.jpg" id="index_r2_c3"  alt="" />
</div>
<div id="content_box">
  <div>
    <div spry:region="dsMemory">
      <table>
        <tr>
          <th spry:sort="makername">Makername</th>
          <th spry:sort="partnumber">Partnumber</th>
        </tr>
        <tr spry:repeat="dsMemory">
          <td>{makername}</td>
          <td>{partnumber}</td>
        </tr>
      </table>
    </div>
  </div>
</div>
<p></p>
The div "content box" is where my final dataset needs to appear. The dataset dsMemory is the call to the server side file that needs to generate the final output dataset (the result is returned as an xml dataset) with the fileds {makername} and {partnumber} being displayed. Its joining these last two steps together that I am stuck on.
many thanks if you can help/
K

Hi Ryan D,
After testing the first issue in my local environment, it works very well. I guess this issue can be caused by typo the ‘660E4583-7F29-4D37-8038-5096AE6A1A7F’ in the second table header. Please make sure the Plan parameter contains the value and make sure
there are no leading or trailing spaces in your data or alternatively do this to be sure:
=iif(Trim(Parameters!Plan.Value(0))="660E4583-7F29-4D37-8038-5096AE6A1A7F",1,2)
As to the second issue, the query couldn’t return any fields if '660E4583-7F29-4D37-8038-5096AE6A1A7F' not in (@Modifier) or '660E4583-7F29-4D37-8038-5096AE6A1A7F' in (@Plan) based on your dataset query. So we can run the same query in SSMS to double-check
the dataset query to make sure it could return fields.
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • How i can pass the value into 1 line

    Hi expert,
    how do i pass all the value for sales document flow item in one line?
    i'm using this function
    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
        EXPORTING
          aufbereitung  = '2'
          belegtyp      = i_del-vbtyp
          comwa         = l_comwa
          nachfolger    = ' '
          vorgaenger    = 'X'
          v_stufen      = '50'
        TABLES
          vbfa_tab      = lt_vbfa
        EXCEPTIONS
          no_vbfa       = 1
          no_vbuk_found = 2
          OTHERS        = 3.
    so now lt_vbfa already got data line by line....
    line 1 : contract : 00010 : 1000000 : 19,000.00
    line 2 : order     : 00010 : 2000000 : 10000.00
    line 3 : delivery : 00010 : 3000000 : 10000.00
    how i can pass the value into 1 line?
    for example :
    contract  | line     | amount     | Order     | line     | amount    | delivery   | line     | amount     |
    1000000 | 00010| 19,000.00 | 2000000 |00010 | 10000.00 | 3000000 | 00010 | 10000.00 |
    Edited by: anuar jusoh on Aug 17, 2009 4:02 AM

    Hi,
    What is requirement for passing the data in a single line ? Do you finally need to append the same in the internal table and pass it in the module ?
    You can create an internal table of type 1000 character and can loop the existing internal table. Then you can append the Work area in a single line and can finally append it to the table.
    DATA : ITAB type standard table of char1000.
    Loop at <existing table>.
    concatenate table work area wa_char100 into Itab_char_1000.
    endloop.
    APPEND itab_char_1000 into itab.
    Hope this helps.
    Thanks,
    Samantak.

  • How can I pass a value into a page fragment?

    How can I pass a value into a page fragment?
    I am implementing four search screens. And the only thing different about them will be their backing bean.
    So I’d like to do something like have four pages, each which retrieves its appropriate backing bean, sets that bean to a variable, and then includes a page fragment which contains the generic search page code (which will make use of that variable).
    The code in the four pages would be something like this:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <c:set var="searchPageBackingBean"
    value="#{pageFlowScope.employeeSearchPageBean}"
    scope="page"/>
    <jsp:include page="./SearchPageBody.jsff"/>
    </jsp:root>
    At this point, what I’m seeing is that the fragment page, SearchPageBody.jsff, has no visibility of the searchPageBackingBean variable, either referencing it as #{pageFlowScope.searchPageBackingBean} or just #{searchPageBackingBean}

    The following will work, assuming you are needing to access a managed bean:
    Put this in the parent page:
    <c:set var="nameOfSearchPageBackingBean"
    value="employeeSearchPageBean"
    scope="request"/>
    Put this in the child, SearchPageBody.jsff:
    <c:set var="searchPageBean"
    value="#{pageFlowScope[nameOfSearchPageBackingBean]}"
    scope="page"/>

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • Passing request value into a query

    Hi,
    I was wondering whether it was possible to pass a request value into a report query in apex 3.2.
    I have a button with a submit value of "ALL" which when pressed i need to open up all the contents of a query as opposed to on those that have been completed.
    SELECT *
    FROM TABLE
    WHERE (STATUS = 'COMPLETE' OR :REQUEST = 'ALL')
    I was expecting this to return only completed records, unless the Button is pressed and then I want to return all records regardless of status.
    Can someone please advise whether this will work? At present it does not seem to recognise the request.
    Cheers,
    ca84

    query could not be parsed: select "ASCIDD" "ASCIDD", "TEMIDD1" "TEMIDD1", "NAME" "NAME", "LSTIDD1" "LSTIDD1", "ASCORDOPT"
    "ASCORDOPT", "ASCORD" "ASCORD", "TEMIDD2" "TEMIDD2", "TEMDES_COUNT" "TEMDES_COUNT" from ( /* Formatted on 2010/12/06
    15:23 (Formatter Plus v4.8.8) */ SELECT ascidd, temidd1, (SELECT temdes FROM lsttem WHERE temtyp = 'D' AND lsttem.temidd =
    temidd1) NAME, lstidd1, ascordopt,ascord,TEMIDD1 TEMIDD2, CASE (:REQUEST) WHEN 'COUNT' THEN
    LSTTEM_PKG_1.CountRecords(TEMIDD1) ELSE 0 END "TEMDES_COUNT" FROM lsttemasc WHERE lstidd1 = :p355_lstidd and exists
    (select 'y' from lsttem where bizidd1 = :P355_BIZIDD1 and lsttem.TEMIDD = lsttemasc.TEMIDD1) order by ascord;) apex$_rpt_src
    failed to parse SQL query: ORA-00911: invalid characterThe ";" looks very suspicious...
    And please:
    <li>Update your forum profile with a better handle than "user13453962"
    <li> DON'T post unrelated questions as follow-ups to existing threads. This issue is not connected to the OP.

  • Passing JSP value into an SQL Query

    Hi,
    I am developing a site for a cruise ship company as part of a project. My problem is as follows . . .
    I have a page called cruiseReservation.jsp which passes the value of the selected cabin to the cruiseDetails.jsp page:
    href="CruiseDetails.jsp?cabin_id=cabinE105 " so . .
    cabinE105 was selected.
    my database table for the cabin is as follows:
    create table cabin (
    cruise_id number primary key,
    cabinE105 number,
    cabinD113 number,
    cabinC131 number,
    cabinB127 number,
    cabinA101 number,
    FOREIGN KEY(cruise_id)
    REFERENCES cruisedetails(cruise_id)
    In the cruise details page im running the following code to update the cabin tables cabinE105 value to 0:
    String cabin = request.getParameter("cabin_id");
    String setCabin = "update cabin set '"+cabin+'" = 0 where cruise_id = 1";
    What im trying to do is pass the value of the cabin into the update statement so it updates cabinE105 = 0 where cruise_id = 1.
    How do I dfo this as the above method is not working ??
    I would like any help on this PLEASE !!! THANKS !

    String cabinID = request.getParameter("cabin_id");
    PreparedStatement ps=connection.prepareStatement("update cabin set "+cabinID+"=? where cruise_id=?");
    ps.setInt(1,0);
    ps.setInt(2,0);
    ps.executeUpdate();
    .Regards
    -John-

  • Passing range-value into a parameter of a subreport

    Hello all
    I've a problem with passing a formula into a parameter of the subreport.
    I'm using a SAP BW query with a data range parameter. So I have to provide a range value first for executing this query.
    I'd like to execute the query with a data range between the last two weeks. For this purpose if created a formula with following code:
    [dateadd('d',-14,currentdate),currentdate]
    This means, the result is an array. And exactly this is the problem. Because Crystal Reports doesn't support an array as a result of a formula.
    Is there an other possibility for passing the array/data range to the parameter in the subreport?
    I'm using Crystal Reports for enterprise (v.14.0.2).
    Kind regards,
    Greg

    Thanks, kglad. I was wondering about that. I thought that
    putting a variable data type of :Number would have made it a
    number, but I never got an error in the debugger so I thought it
    was ok. I traced the data type and figured out it was actually a
    string and changed the line like follows which turned the string to
    an integer and made it work:
    var image01ClosedPosition:Number =
    parseInt(RootNode1.attributes.imageChangeX);

  • Passing bind value into viewlink in uix

    Hi,
    Can anyone tell me if is it possible to passe a value for a where condition in viewlink with uix xml ?
    I've a view link with some query like :1 = VtfSecteurfamille.IDSECTEUR which source attribute TfSecteur.IDSECTEUR
    In uix page
    &lt;stackLayout&gt;
    &lt;contents childData="${bindings.TfSecteurView.rangeSet}"&gt;
    &lt;styledText text="${uix.current.Libelle}"/&gt;
    &lt;stackLayout&gt;
    &lt;contents childData="${bindings.VtfSecteurmarqueViewLink.rangeSet}" &gt;
    &lt;styledText text="${uix.current.Nommarque} ${uix.current.Idmarque} "/&gt;
    &lt;/contents&gt;
    &lt;/stackLayout&gt;
    &lt;/contents&gt;
    &lt;/stackLayout&gt;
    I want to passe to :1 a value

    Hi Ganesh,
    Please have a look at this thread on how to add 'ALL' as a value for the prompt.
    All values in parameter
    -Abhilash

  • Best practice to pass a value into a sub-process

    Hi
    I'm new to Oracle workflow and have the following problem/question.
    I have three identical subprocesses (one for each category) which should run in parallel, and I need to know for which category I'm running inside the activities of these subprocesses.
    Of course I would like to define the subprocess only once an reuse it for the other two parallel paths.
    What's the best way of doing this and how should I pass the category into the subprocess.
    I can think of the following
    - use an item attribute to pass the CATEGORY
    - use a process attribute to pass the CATEGORY into the subprocess
    - use the <process_name> of WF_ENGINE.GET_ACTIVITY_LABEL (each subprocess having a different process_name)
    Is there a better way of doing this ?
    Thanks
    Guido

    Unfortunately there is a limitation that Oracle Workflow does not support using a subprocess activity multiple times within a process hierarchy.
    See http://download-west.oracle.com/docs/cd/B10501_01/workflow.920/a95265/defcom36.htm#pact
    You could create one subprocess and then make copies with different names, and include logic in the main process to transition to the appropriate one.

  • How to pass a value into a SQL Query?

    Hi There,
    I want to know if there is a possibility to pass a dynamic value in a sql query. For example I have a currency rate value (ex: rate = 1.319, 2.23 etc) which user wants to input when running the query (The rate is not taken from the system, so I cannot compare to any table column and pass it as a parameter).
    And this rate has to be used in my query to do some calculation. Is this possible? The value :p_currency_rate doesn't work
    Any ideas please?
    Thank you,
    Prathibha

    SELECT DISTINCT
    hou.name
    ,poh.segment1 po_num
    ,pol.line_num po_line_num
    ,poh.currency_code
    --,trunc(poh.creation_date) po_creation_date
    ,pol.cancel_flag
    ,msi.segment1 item_num
    ,pol.unit_price
    ,round(cost.item_cost,5)
    ,round((&p_rate * pol.unit_price),5) "CONVERSION"
    ,(cost.item_cost - round((&p_rate * pol.unit_price),5)) difference
    ,pov.vendor_name
    FROM
    po.po_headers_all poh
    ,po.po_lines_all pol
    ,po.po_vendors pov
    ,hr.hr_all_organization_units hou
    ,inv.mtl_system_items_b msi
    ,bom.cst_item_costs cost
    WHERE
    poh.po_header_id = pol.po_header_id
    and pov.vendor_id = poh.vendor_id
    and poh.org_id = hou.organization_id
    and hou.organization_id = :p_operating_unit
    and poh.currency_code = :p_currency
    and poh.creation_date between :po_creation_date_from and :po_creation_date_to
    and poh.type_lookup_code = 'BLANKET'
    and msi.inventory_item_id = pol.item_id
    and cost.INVENTORY_ITEM_ID = pol.ITEM_ID
    --and (cost.item_cost - pol.unit_price) <> 0
    and (cost.item_cost - round((&p_rate * pol.unit_price),5)) <> 0
    and cost.organization_id = 1
    and msi.organization_id = 1
    and cost.cost_type_id = 3 --- Pending cost type
    and nvl(upper (pol.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(upper (poh.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(pol.cancel_flag, 'N') = 'N'
    and &p_rate user parameter
    I want this p_rate to be passed as a user parameter.

  • Passing function value into another procedure

    Hi
    From this package the value returned by the function " FIRST " needs to pass into another procedure as parameter in the same package, how could i do that in a better way.Oracle Version 8.1.7.4.0.
    CREATE OR REPLACE package body PKG_CUST_CHECK is
    FUNCTION FIRST(P_PARMS in varchar2) return varchar2 is
    l_parms varchar2(62) := P_PARMS;
    BEGIN
    SECOND(l_parms);     
         return(l_parms);     
    END;
    PROCEDURE SECOND(P_PARMS in out varchar2) is
    L_CUST Varchar2(30);
    BEGIN
    SELECT P_CUST INTO L_CUST FROM TABLE_A WHERE ROWNUM=1 ;
    THIRD(P_CUST in VARCHAR2,
    P_PARMS_VALID out VARCHAR2,
    P_OK_FOR_CUST out VARCHAR2,
    --Here the output of the above procedure will be concatinate and Return ;     
    END CUST_CHECK;
    end PKG_CUST_CHECK ;
    Thanks

    sorry for the confusion, not sure whether it will be clear enough.
    the requirement is function "FOURTH" should get the value returned
    by the function "FIRST" as in parameter value.
    [ code ] CREATE OR REPLACE package body PKG_CUST_CHECK is
    FUNCTION FIRST(P_PARMS in varchar2) return varchar2 is
    l_parms varchar2(62) := P_PARMS;
    BEGIN
    SECOND(l_parms);     
    return(l_parms); --here the value which is returning is updated one by the THIRD procedure       
    END;
    PROCEDURE SECOND(P_PARMS in out varchar2) is
    l_parms varchar2(62) := P_PARMS;
    BEGIN
    --the procedure THIRD will get the parameter values after
    --extracting the values from l_PARMS by another function EXTRACT
    THIRD(P_CUST in VARCHAR2,
    P_PARMS_VALID out VARCHAR2,
    P_OK_FOR_CUST out VARCHAR2,
    return;                    
    --Here the output of the above procedure will be concatinate and Return ;     
    END CUST_CHECK;
    FUNCTION FOURTH(P_PARMS in varchar2) return varchar2 is
    l_parms varchar2(62) := P_PARMS;
    BEGIN
    --the procedure FIFTH will get the parameter values after
    --extracting the values from l_PARMS by another function EXTRACT
    FIFTH(P_CUST in VARCHAR2,
    P_PARMS_VALID out VARCHAR2,
    P_OK_FOR_CUST out VARCHAR2,
    return;                    
    --Here the output of the above procedure will be concatinate and Return ;     
    END CUST_CHECK;
    end PKG_CUST_CHECK; [ /code ]

  • To pass the value to final internal table

    hi all,
    in the report i have a select query has below
    SELECT SINGLE belnr
              INTO (l_belnr)
              FROM bkpf
              WHERE bukrs = ls_bseg-bukrs
               AND gjahr = ls_bseg-gjahr.
    i have an internal table gt_values , in this almost i have 1500 entries.
    with field  has BELNR.
    now i need to check l_belnr exists in GT_VALUES-BELNR OR NOT.
    IF EXISTS i need to pass the belnr to GV_BELNR.
    do we need to use LOOP and ENDLOOP or we have any other option.
    PLEASE help me how to proceed in writing code for this.

    Use read table statement.
    Read table GT_VALUES with key belnr = l_belnr.
    if sy-subrc = 0.
    move l_belnr to GV_BELNR.
    endif.

  • Passing 'ALL' value into Two Parameters in SAP Crystal Reports

    Hi,
    I have one report made it from sql command in that there is 2 parameters one is C_Type and other is C_Type_HV both shows the records like 01,02,03,05 both the parameters are used in command where clause and also that report contain one sub report for showing summary made it from sql command in that command both the parameters are passing through where clause of command now i want to add 'ALL' as a value in both the parameters how i can do this in sap crystal report.
    for referance I give u both the query of report
    With Regards,
    Ganesh

    Hi Ganesh,
    Please have a look at this thread on how to add 'ALL' as a value for the prompt.
    All values in parameter
    -Abhilash

  • How to pass itab values into a smartform

    hi everybody,
    how can i pass the itab values from a report program to a smartform.
    for ex:-
    itab-bukrs, itab-lifnr, itab-budat.
    can any one tell me where i have to define etc...
    thanks
    Santosini

    Hi
    you can pass the itab values from a report program to a smartform.
    like &itab-bukrs& & itab-lifnr&, & itab-budat&..you open any window and press change editor there you write fields like this.
    first you create table type.in that you put all the fields which you want .then in form* interface* you put this table type name .
    Edited by: Chaithanya A on Mar 21, 2008 8:17 AM
    Edited by: Chaithanya A on Mar 21, 2008 8:17 AM

  • How to pass variable value into module pool scren from a report program

    Hi,
    I have created a report program with selection screen parameters. when the inputs are filled and executed it generates the purchase evaluation sequence number. i have created a screen and passed that number to display on it with print option and back option buttons as required. but variable alone is not getting passed from the program to module pool screen. buttons are working fine. value alone is not coming. can anyone please help me.
    regards,
    sudha.

    Hi ,
    you need to declare that variable param at Global.
    sample code...
    report xyz....
    data: g_no type ekko-ebeln.
    start-of-selection...
    g_no = '12345'.
    call screen 0100.

Maybe you are looking for

  • Payment document cleared partially

    Hi Friends, When we are creating Invoice through VF01. Accounting document is generated. After clearing document the status of the document is states as Accounting document partiallly cleared. Appreciate your help. Regards, Srinivas Muthyala

  • Scheduled Payment for Telstra Account using a credit card

    Can you please add a future payment date to your website. Many web sites have this simple function and yours used to. It makes it much more coenvenient to schedule the correct payement date and avoid's the late fees when I forget. (unless this is the

  • BADI Problem In QA01

    Hi All, i have to add some custome fields in QA01/QA02/QA03 so i am using BADI Definition QPL1_SUBSCREEN_ADDON and created its implementation also but problem is that now i want to add custom fields appended in CI_QALS in screen number 212 but it is

  • Can I advance the playhead to the next grid with a hot key?

    Is it possible to set the grid and then use a hotkey to move the playhead along the grid? hot  Maybe I'm having a brainlock, but I can't seem to figure it out in the shortcuts menu.

  • I just upgraded to iTunes 10.2.1.1 and lost everything...

    How do I get back all my settings, music, playlist and inforamtion?