Thumbnail selections, events and selection lists

I'm experimenting with creating an external data file to track Bridge selections. I've come across two problems, one of which I have found a fix for, the other not.
If I obtain 'app.document.selections' following a 'select' event type, the list I get is actually the list prior to the latest selection. So if I had test1.jpg selected and switch to test2.jpg, app.document.selections[0] will be test1.jpg. The same applies to using 'deselect' that actual deselection does not show in the app.document.selections list when the event is triggered.
The fix for this is to use event type 'preview' which returns the latest selections at the moment you change the selection.
Unfortunately, preview does not update when you click when you deselect - and since deselect and select events both seem to come ahead of the updating of the selections list, using them does not work.
Any suggestions / ideas on this.
Andrew
Here is the code I am currently using:
onThumbnailEvent = function( event ){
if( event.object.constructor.name == "Thumbnail" ){
if( event.type == "preview" ) {
ah_CollectBridgeData();
return {handled:true};//stop processing event handlers
ah_writeData = function (tFile,tString) {
if (tFile.open('w')) {
if (tFile.write(tString)) tFile.close();
else throw ("Error saving file list\n" + tFile);
else throw ('Error, Data File Not Opened\n' + tFile);
ah_CollectBridgeData = function () {
var tFile = new File ('/c/Program Files/Adobe/Adobe Photoshop CS2/Presets/Scripts/nn-test3.dat');
var filestr = ah_fileThumbnailsToFilestr(app.document.selections);
ah_writeData(tFile,filestr);
ah_fileThumbnailsToFilestr = function( thumbnails ) {
var fileAr = new Array();
for ( var i = 0; i < thumbnails.length; i++ ) {
if(thumbnails[i].spec instanceof File) fileAr.push(thumbnails[ i ].spec);
return fileAr.toString();
// register the handler
allDocEventHandlers = { handler: onThumbnailEvent };
app.eventHandlers.push( allDocEventHandlers );

ugh, hadn't thot that thru yet on the deselect...
Looks like you get "n" deselects in a row.
Run this in ESTK, keep estk's console visible then select/deselect in bridge...
#target bridge
EventWatcher = {};
EventWatcher.lastEvent = "";
EventWatcher.eventCatcher = function( evt ) {
$.writeln( evt.type + " Event" );
if ( evt.type == "deselect" ) {
$.writeln( "Thumbnail Deselect: " + evt.object.path );
// debugger;
EventWatcher.lastEvent = evt;
return { handled: false };
app.eventHandlers.push( { handler: EventWatcher.eventCatcher } );
All the deselects (on a multiple deselect) happen in a row, and you're only interested in the last one, and you're not even interested in that. app.document.selections will be correct on the event (regardless of type) after the last deselect.
Hold off doing anything on a deselect until the event type changes.
if ( event.type = "deselect" ) {
myNamespace.loadedGun = true;
} else {
if ( myNamespace.loadedGun ) {
nowWriteMySelectionFile();
Since it's possible that you won't get another event for some time, you might want to setup a scheduled task that checks to see if the "gun is loaded", and if so to write the files.
Thanks for the kind words. I really enjoy working with everyone. It's a great break from head-down coding, and I learn something from just about every case.
Bob
Adobe WAS Scripting

Similar Messages

  • Gray Thumbnails for Events and others

    Hello,
    I've searched and tried everything to fix this and nothing seems to work.
    I had a laptop running 10.5.8 and iPhoto 09. I copied the iPhoto library to a new MPB running 10.6.1 and iPhoto 09. Both versions of iPhoto were fully updated. When I opened iPhoto, all my thumbnails were gray. If I click all the way to the picture, it's still there. I also had Keyword Manager installed, but when I tried installing it on the new laptop, it didn't fix the problem.
    I've tried repairing permissions with Disk Utility as well as rebuilding the small thumbnails, rebuilding the thumbnail cache and repairing library using the optioncommandopen utility.
    Any help would be more than appreciated

    Rebuilding the thumbnails can take several goes In my experience.
    If that fails:
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • Sync Events AND Albums ?

    Is there a trick to get both Events and Albums listed on the ATV?
    I use allways Events which contain all the pictures available and sometimes an Album with a selection for slide show. Would be nice to see both Event and Album on the large screen....
    kind regards
    Werner

    Welcome to the  Discussion Forums.
    I'm afraid there is no way to sync both albums and events.
    You could always make smart albums that reflect events or just albums that reflect events, but I guess that's not what your are after.

  • How Do I Filter a Report Using a Multi Select List Box and Specifying Date Between Begin Date and End Date

    Hope someone can help.  I have tried to find the best way to do this and can't seem to make sense of anything.  I'm using an Access 2013 Database and I have a report that is based on a query.  I've created a Report Criteria Form.  I
    need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date.  I then need my report to return only the records that meet all selected criteria.  It works fine with a ComboBox and 1 selection but can't
    get it to work with a List Box so they can select multiple items.  Any help is greatly appreciated while I still have hair left. 

    The query should return all records.
    Let's say you have the following controls on your report criteria form:
    txtStart: text box, formatted as a date.
    txtEnd: text box, formatted as a date.
    lbxMulti: multi-select list box.
    cmdOpenReport: command button used to open the report.
    The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
    The report to be opened is rptReport.
    The On Click event procedure for the command button could look like this:
    Private Sub cmdOpenReport_Click()
    Dim strWhere As String
    Dim strIn As String
    Dim varItm As Variant
    On Error GoTo ErrHandler
    If Not IsNull(Me.txtStart) Then
    strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
    End If
    If Not IsNull(Me.txtEnd) Then
    strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
    End If
    For Each varItm In Me.lbxMulti.ItemsSelected
    strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    Next varItm
    If strIn <> "" Then
    ' Remove initial comma
    strIn = Mid(strIn, 2)
    strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
    End If
    If strWhere <> "" Then
    ' Remove initial " AND "
    strWhere = Mid(strWhere, 6)
    End If
    DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
    Exit Sub
    ErrHandler:
    If Err = 2501 Then
    ' Report cancelled - ignore
    Else
    MsgBox Err.Description, vbExclamation
    End If
    End Sub
    If SomeField is a text field instead of a number field, change the line
            strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    to
            strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Problems with customizing select lists and popup LOVs

    Hi
    I have 2 problems about select lists and popup LOVs.
    The first one is about a select list in a tabular form.
    It should be created with APEX_ITEM.SELECT_LIST_FROM_LOV or similar and take its values from a named LOV.
    This worked fine but now it should also have the possibility to enter a free value.
    I tried to accomplish that by creating a APEX_ITEM.POPUP_FROM_LOV, but there is a problem with the function that is called by the arrow icon right to the input field (for eg. genList_f11_5()).
    If the row is added by addRow, then it works fine, but if the row is is not empty
    then the function call is like genList_f11_$_row() and the input field gets no value, when a LOV option is selected.
    The other problem is about a select list which should have the possibility to enter a custom value and
    also there should be the possibility to select several values. I tried to implement this by a text area containing the selected values and a multiple select list, with an event handler in each option. The user could click options and they would be copied to the text area. The problem is that I couldn't make the event handler work in IE.
    I would appreciate any ideas about either of these problems.
    Tiina

    Hi,
    If you download application you can see source.
    I have not write any instructions, sorry.
    If you are on Apex 4 you can just load jQuery UI autocomplete library and take ideas from my app.
    If you download my sample in zip there is uncompressed htmldbQuery library.
    You can see that and take only function htmldbAutocomplete.
    Then check jQuery UI document
    http://jqueryui.com/demos/autocomplete/#method-search
    There is method search that you can use open list just by click of input.
    I hope this helps at start.
    Regards,
    Jari

  • 3 buttons and 2 select lists in a single line

    Hi,
    I have an application which has 3 region buttons ( say, b_1, b_2, b_3) and 2 selects lists (say, sl_1, sl_2). I want to display all the five buttons and items in a single line in the following order:
    b_1 b_2 sl_1 b_3 sl_2
    I have set Begin on new line = no
    and Begin on new field = no, for both the two select lists.
    But it does not seem to work.
    Do anyone have any idea, how to sort out this issue?
    A quick reply would really be appreciated.
    Regards,
    AM

    Hi Vikas,
    Please have a look into the application at
    http://apex.oracle.com/pls/otn/f?p=34363:1:6206621111100168:::::
    I have created two select lists P1_X and P1_Y. These items are hidden on page load event. When the associated button is clicked the list should appear on the page.
    Written the following code in 'Pre element text' for each of the items:
    P1_X :: <input type="button" value="X" onclick="f_X();" class="t17Button" />
    P1_Y:: <input type="button" value="Y" onclick="f_Y();" class="t17Button" />
    Where, f_X() and f_Y() are displaying the select lists.
    As you can see, the select lists are appearing just below the html buttons, which I want side by side with the buttons.
    Could you please figure out the issue?
    If you want I can share my login details.
    Regards,
    AM

  • Passing Fields between List Table and Input Form - selection list

    Hi
    I have to build up an input form with a lot of values. I like to provide something like a selection list, where the user can select from. An other way would be to make some tables with the possible values and pass them after clicking the row in a corresponding form field.
    I couldn’t find a solution to do that.
    Regards and thanks for helping
    Werner
    Message was edited by: Werner Zecchino

    Hi,
    There is no "clean" way of doing this with the current version.
    You can have a form with a few labels and a button for each label. Each button will raise a different event (user defined) which you can handle differently, i.e. run different queries, calculate fields, etc.
    Lior

  • Onchange events when transforming select lists for EXTJS integration

    Hi,
    We have the folloiwng code that transforms select lists to extjs combo boxes
      var selectfield = Ext.query('select[class!="shuttle"][class!="multiselect"]');
      for (var r = 0; r < selectfield.length; r++) {
        //If there is an onchange event then don't convert as onchange is lost
        //This is used for cascading LOVs so we need to find a way of getting this to work
        if((selectfield[r].onchange == '' || selectfield[r].onchange == null) && ((r>0 && selectfield[r-1].onchange == null) || r==0) && selectfield[r].id != 'apexir_NUM_ROWS') {
          var newselect = new Ext.form.ComboBox({
            //hiddenId: selectfield[r].id,
            //hiddenName: selectfield[r].id,
            id: selectfield[r].id,
            typeAhead: true,
            triggerAction: 'all',
            transform: selectfield[r].id,
            width: selectfield[r].clientWidth+5,
            emptyText:'Please select...',
            forceSelection: true,
            maxHeight: 200,
            disabled: selectfield[r].disabled
      }The code does not convert select boxes that have onchange events as the code above seems to suggest they get lost when transforming. Does anyone know if that is the case, and if not how I amend the code to include the onchange events from the original select lists.
    Regards
    Paul

    Hi Vee,
    Thanks for pointing it out -- here at work the only version of IE I have is 6 and I assumed (as usually is the case) it was because of a bug in that specific version. However, I have the all-powerful, (allegedly) standards-compliant IE 9 at home and it behaved exactly the same way!
    So you cannot say this is due to an old, non-supported browser. Surely it fits in the bug category then? After all events should not be triggered at random...
    Thanks also for the suggestion to fix it. I didn't try it because, in the end, I found out that if I use onchange instead of onblur (in the text field) the problem doesn't occur! onblur would be better, but onchange works fine for what I need.
    Thanks
    Luis

  • Select list - Onchange event

    I want to add an onchange event in a form for a Select list.
    For that i had written two javascript functions and two application process.
    In HTML Form Element Attributes of the Select List, I had written the following :
    style="font-family:Franklin Gothic Medium;font-size:12px;width:160px";onchange="f_bomqty()";onchange="f_rmc();"
    But, when change the Select List item, the onchange event happens for obly the first function ie. onchange="f_bomqty()";
    Please suggest, whether anything is wrong in In HTML Form Element Attributes ?
    Can we populate two Textfields at the same time, for an Onchange event of a select list ?
    Yogesh

    No change. Please check if anything is wrong in javascripts and application process.
    The javascript code and application process are as follows :
    Javascripts
    <script language="JavaScript" type="text/javascript">
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    function f_bomqty()
    var lVal = $v('P10_CR_BOM_CODE');
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=BOMQTY',0);
    get.add('P10_CR_BOM_CODE',lVal);
    var gReturn = get.get();
    if(gReturn){
    $x_Value('P10_CR_QUANTITY', gReturn);
    } else {
    $x_Value('P10_CR_QUANTITY', '');
    get = null;
    function f_rmc()
    var lVal = $v('P10_CR_BOM_CODE');
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=RMC',0);
    get.add('P10_CR_BOM_CODE',lVal);
    var gReturn = get.get();
    if(gReturn){
    $x_Value('P10_CR_RMC', gReturn);
    } else {
    $x_Value('P10_CR_RMC', '');
    get = null;
    </script>
    Application process : - BOMQTY
    DECLARE
    BQTY NUMBER;
    ERROR VARCHAR2(200);
    BEGIN
    SELECT CR_QUANTITY INTO BQTY
    FROM CM_RECIPE
    WHERE CR_BOM_CODE = :P10_CR_BOM_CODE;
    HTP.prn (BQTY);
    EXCEPTION
    WHEN OTHERS
    THEN HTP.prn (sqlerrm);
    END;
    Application process : - RMC
    DECLARE
    RMC NUMBER;
    ERROR VARCHAR2(200);
    BEGIN
    SELECT RMCCOST
    INTO RMC
    FROM
    SELECT SUM(CRI_QTY * CRI_RM_COST) / CR_QUANTITY RMCCOST
    FROM CM_RECIPE, CM_RECIPE_ITEM
    WHERE CR_BOM_CODE = :P10_CR_BOM_CODE
    AND CR_ID = :P10_CR_ID
    GROUP BY CR_QUANTITY
    HTP.prn (RMC);
    EXCEPTION
    WHEN OTHERS THEN
    ERROR := 'Error - Cannot calculate the RMC';
    HTP.prn (ERROR);
    END;
    Yogesh

  • Help with select list item and dynamics action

    G'Day Apex Gurus,
    I having problems trying to achieve to trigger the help window of a select item automatically. A help window is triggered when the select item label is clicked but my client would like to be triguered automatically as soon as the user click to see the options in the select list.
    I think that I should be able to do it with dynamic actions but I can not get it to work.
    I know when someone click on the label of the select list item trigger this JavaScript
    javascript:popupFieldHelp('277938589795252851','1545903379570909')
    So I want to trigger the javascript also when the user click of the select list item and pull down the options and for that I think that Dynamic actions is the way to go but I can't get it right.
    This is what I a doing:
    I created a Dynamic option as follow:
    Name : test
    Sequence: 30
    Even: Click
    Selection type: Item(s)
    Item(s): P1_RATING <- a selection list item
    Condtion: - No Condition -
    True Actions
    Sequence: 10
    Action : Execute JavaScript Code
    Fire when event result is :True
    Fire on page load: ticked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')
    I appreciate any one who can tell me what i am doing wrong here or provide a solution to my problem of achieving to trigger the help window of a select item automatically.
    Kind regards
    Carlos

    Hi Carlos,
    I set up a test case in exactly the same way and it worked fine for me. I created a page item called P1_DA_DEMO and added some static select list values then added some help text. The settings I used are below, I suggest you try again but also make sure you have no other Javascript errors on the page. Use a tool like firebug to check.
    Name : Dynamic Action Demo
    Sequence: 10
    Even: Click
    Selection type: Item(s)
    Item(s): P1_DA_DEMO <- a selection list item
    Condtion: - No Condition -
    True Actions
    Sequence: 10
    Action : Execute JavaScript Code
    Fire when event result is :True
    Fire on page load: Not Ticked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')
    Event Scope set a s Bind.
    Thanks
    Paul

  • Pass values fromSharePoint list multi-selection list box to Infopath Multi-selection list box and back

    Design overview:
    List A
    InfoPath Library - Form A
    SharePoint Designer workflow
    List A has a multi-selection column with multi-values.
    Form A has fields populated from the data in List A by using a data connection in the form.  I have a workflow that updates the values or creates a new item in List A. All fields work except the mufti-selection. The multi-selection has ;# separating
    the values and I am having trouble setting the list box properly(checking of the selecting values) instead it concats all values on one line. I basically need to get the multi-selection column from list 1  to show exactly in the Form A and be able to
    update the selection with the workflow. I can do this with single values with no problem. the multi-selection list is difficult. I read somewhere I can use a repeating table but I am not sure the workflow will work with that. That is only a read and not 
    a write.

    Wow over my head a little. I understand what an array is with script but not how to write the script to handle it. I made this:
    event.value = getField("LISTBOX").value;
    But still no change in the behavior with multi selections. Example below if you want to check it out.
    https://dl.dropboxusercontent.com/u/2944617/formtext2.pdf

  • How to add selection event, change event and click event for dropdownlist for mobile applications

    Please someone help me in writng selection , click and change events for dropdownlist in flex for mobile applications . i have tried but i wasn't able to select the items in dropdown using my mouse or touch in my mobile . Please help me I am struck at this point and i am unable to get solution gfor this. Please................
    Some code for which i neederd help:
    <s:DropDownList id="ddlBranch" x="257" y="475" width="63%" height="80%"
                                    creationComplete="ddlBranch_creationCompleteHandler(event)"
                                    fontFamily="Calibri" fontSize="24"
                                    labelField="BranchName"
                                    prompt="{ddlBranch.selectedItem}"
                                    requireSelection="true"
                                    selectionColor="#7ab342">
                        <s:AsyncListView list="{getBranchResult.lastResult}"/>
                    </s:DropDownList>
    <s:DropDownList id="ddlZone" x="257" y="546" width="63%" height="80%"
                                    creationComplete="ddlZone_creationCompleteHandler(event)"
                                    fontFamily="Calibri" fontSize="24"
                                    labelField="ZoneName"
                                    prompt="{ddlZone.selectedItem}"
                                    requireSelection="true"
                                    selectionColor="#7ab342">
                        <s:AsyncListView list="{getZoneResult.lastResult}"/>
                    </s:DropDownList>
    I will get the list of Branches(first DDL) and Zones(Second DDL) from a webservice written in DOT(.)NET,  what i needded is touch events and selection events for both the dropdown lists and the data in the second DropDown List should bind based on the First Dropdown list item selected.
    Service call for binding data to DDL:
    protected function ddlBranch_creationCompleteHandler(event:FlexEvent):void
                    getBranchResult.token = loginService.getBranch();
                protected function ddlZone_creationCompleteHandler(event:FlexEvent):void
                    getZoneResult.token = loginService.getZone();
    Please help...
    Thank you.

    Therer are two ways you can assign an action to the "OnEnter"-event of your input field:
    1. in method cl_wd_input_field=>new_input_field you have the parameter:
    ON_ENTER
    You just have to assign your action name to this field and it will be called on the OnEnter-event of your InputField.
    e.g:
         lr_input_field = cl_wd_input_field=>new_input_field(
                                                 id = 'INP_MY_INPUT_FIELD'
                                                 on_enter = 'MYACTION'
    2. You can use the method SET_ON_ENTER.
    like:
         lr_input_field->set_on_enter( 'MYACTION' ).
    Just make sure, you have created and implemented this action and its handler.

  • How can i clear the textfield and the list selections?

    How can i clear the textfield and the list selections?
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    <applet code="ListDemo" width=300 height=400>
    </applet>
    public class ListDemo extends Applet implements ActionListener {
    List os, browser;
    String msg = "";
    String text;
    String named = "";
    TextField name;
    Button Ok, reset;
    public void init() {
    Ok = new Button("Ok");
    reset = new Button("reset");
    add(reset);
    add(Ok);
    reset.addActionListener(this);
    Ok.addActionListener(this);
    Label namep = new Label("Name: ", Label.RIGHT);
    name = new TextField(12);
    add(namep);
    add(name);
    name.addActionListener(this);
    os = new List(4, false);
    browser = new List(4, false);
    os.add("default");
    os.add("BMW");
    os.add("BENZ");
    os.add("Lexus");
    os.add("Acura");
    browser.add("default");
    browser.add("Red");
    browser.add("Black");
    browser.add("Silver");
    browser.add("Blue");
    browser.add("Yellow");
    browser.add("Pink");
    browser.add("Grey");
    browser.add("Blue/Black");
    os.select(0);
    browser.select(0);
    add(os);
    add(browser);
    os.addActionListener(this);
    browser.addActionListener(this);
    public void actionPerformed(ActionEvent ae) {
    String str = ae.getActionCommand();
    if(str.equals("Ok")){
    text = "You pressed Ok";
    else
    if(str.equals("reset")){
    browser.select(0);
    os.select(0);
    text = "";
    repaint();
    public void paint(Graphics g) {
    g.drawString("Name: " + name.getText(), 6, 120);
    int idx[];
    msg = "Current Car: ";
    idx = os.getSelectedIndexes();
    for(int i=0; i<idx.length; i++)
    msg += os.getItem(idx) + " ";
    g.drawString(msg, 6, 140);
    msg = "Current Color: ";
    msg += browser.getSelectedItem();
    g.drawString(msg, 6, 160);
    g.drawString(text, 6, 200);

    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    <applet code="ListDemo" width=300 height=400>
    </applet>
    public class ListDemo extends Applet implements ActionListener {
    List os, browser;
    String msg = "";
    String text;
    String named = "";
    TextField name;
    Button Ok, reset;
    public void init() {
    Ok = new Button("Ok");
    reset = new Button("reset");
    add(reset);
    add(Ok);
    reset.addActionListener(this);
    Ok.addActionListener(this);
    Label namep = new Label("Name: ", Label.RIGHT);
    name = new TextField(12);
    add(namep);
    add(name);
    name.addActionListener(this);
    os = new List(4, false);
    browser = new List(4, false);
    os.add("default");
    os.add("BMW");
    os.add("BENZ");
    os.add("Lexus");
    os.add("Acura");
    browser.add("default");
    browser.add("Red");
    browser.add("Black");
    browser.add("Silver");
    browser.add("Blue");
    browser.add("Yellow");
    browser.add("Pink");
    browser.add("Grey");
    browser.add("Blue/Black");
    os.select(0);
    browser.select(0);
    add(os);
    add(browser);
    os.addActionListener(this);
    browser.addActionListener(this);
    public void actionPerformed(ActionEvent ae) {
    String str = ae.getActionCommand();
    if(str.equals("Ok")){
    text = "You pressed Ok";
    else
    if(str.equals("reset")){
    browser.select(0);
    os.select(0);
    text = "";
    name.setText("");
    repaint();
    public void paint(Graphics g) {
    g.drawString("Name: " + name.getText(), 6, 120);
    int idx[];
    msg = "Current Car: ";
    idx = os.getSelectedIndexes();
    for(int i=0; i<idx.length; i++)
    msg += os.getItem(idx) + " ";
    g.drawString(msg, 6, 140);
    msg = "Current Color: ";
    msg += browser.getSelectedItem();
    g.drawString(msg, 6, 160);
    g.drawString(text, 6, 200);

  • Display and return value in select list.

    hi,
    i want to display the value in select list coming from this quary .
    select student_id from class_record where class_id =:p1_class_id and SECTION =:p1_section
    minus
    select student_id from STUDENT_TYPE_DETAILS where class_id =:p1_class_id and SECTION =:p1_section;
    but i want f_name and last name with student_id .f_name and l_name store in table s_per_det.student is also in that table.
    how can i define display value and return value in this quary using 3rd table s_per_det.
    How can i do this.
    Thanks
    manoj

    Ooh, MINUS.... Can you not use a NOT EXISTS in this case, could have a big effect on the execution plan?
    Something like this perhaps?
    SELECT f_name||' '||l_name,
           stundent_id
    FROM class_record a,
         s_per_det b
    WHERE a.student_id = b.student_id
    AND   a.class_id   = :P1_CLASS_ID
    AND   a.section    = :P1_SECTION
    AND   NOT EXISTS(SELECT 'X'
                     FROM student_type_details c
                     WHERE a.student_id = c.student_id
                     AND   c.class_id = :P1_CLASS_ID
                     AND   c.section = :P1_SECTION)Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Report with select list and link to call another report

    Hi,
    I am trying to do 2 reports (REPORT1 and REPORT2).
    The first is a summary report (REPORT1).
    This report will display sales figures for the year. Now, I need to have a select list in the result set that will have 2 options, depending on which option is chosen, I want to call REPORT2 with the select list as a parameter. How can I do this ?
    Let me try to explain what I did.
    I created REPORT1 on Page 100
    SELECT YEAR, sum(YTD_SALES), APEX_ITEM.SELECT_LIST(1,'DEPARTMENT','Department;DEPARTMENT,Division;DIVISION') Drilldown FROM SALES_ANALYSIS WHERE YEAR > 2000
    GROUP BY YEAR ORDER BY YEAR
    I created 2 hidden items namely P100_YEAR and P100_DRILLDOWN
    I also made the column YEAR as a link and specified both P100_YEAR and P100_DRILLDOWN as parameters to be passed.
    Next, I created REPORT2
    SELECT YEAR, DECODE(:P100_DRILLDOWN, 'Department', department, 'Division', Division) dept_div, sum(YTD_SALES) ytd_sales
    FROM SALES_ANALYSIS
    WHERE YEAR = :P100_YEAR
    When I run Report 1, it's fine, when I choose either Department or Division from the Select List and click on the link to call Report 2, report 2 is displayed, but the value being passed for P100_DRILLDOWN is not correct and as a result, I am unable to get correct results for Report 2
    Am I missing something ? Are there any alternate ways to do what I'm doing ?
    Thanks,
    Ashok

    Hi Ashok,
    The link definition will not know the value selected in the list as it is constructed only when the page is being rendered. You would need to create some javascript to handle this. I've done that here: [http://apex.oracle.com/pls/otn/f?p=267:182]
    The link on the EMPNO column has been defined in the HTML Expression setting for the column instead of the Link section. The HTML Expression that I have used is:
    &lt;a href="#" onclick="javascript:doDrilldown('#EMPNO#',this);"&gt;#EMPNO#&lt;/a&gt;And, in the page's HTML Header setting, I have added in:
    &lt;script type="text/javascript"&gt;
    function doDrilldown(empno,group)
    var g;
    var p = group.parentNode;
    while (p.tagName != "TR")
      p = p.parentNode;
    var x = p.getElementsByTagName("SELECT");
    if (x.length &gt; 0)
      g = x[0].value;
    var url = "f?p=&APP_ID.:183:&SESSION.::::P183_EMPNO,P183_GROUP:" + empno + "," + g;
    document.location.href = url;
    &lt;/script&gt;When a link is clicked, the doDrilldown function is called passing in the EMPNO value and the "this" object (which identifies the object triggering the call). The function starts from that object and goes up in the HTML tag tree to the nearest TR tag (the row tag that the link is on) and then finds the first SELECT list item on the row and gets its value. It then constructs a URL using this and the EMPNO value and performs a redirect to the second page (page 183 in this example).
    Andy

Maybe you are looking for