Associate Action with jcombobox item

Is it possible to associate a particular Action with a jcombobox item (for example using setAction()). When the user selects a particular item of jcombobox, the Action must be triggered.
regards,
Nirvan.

Hi,
You can associate a particular action with a JComboBox. As per my understanding u can add one action perfrom action to combobox or itemStateChanged action
if u add action perform action, u need to add the following method to ur logic.
JComboBox combobox=new JComboBox();
    combobox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
         JComboBox combo = (JComboBox)evt.getSource();
            if(combo.getSelectedItem().equals("LOCATION")) {
            A a = new A();
            a.show();
        } else if(combo.getSelectedItem().equals("HOUSE")) {
            B b= new B();
            b.show();
        });if action is ItemStateChanged then add the following method.
combobox.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                and write your logic here which one needs to be triggered when this action performed.
        });Hope this will help to you....
Thanks & Regards,
Maadhav..

Similar Messages

  • Automator action with dropdown to make folders with predetermined names

    Is there an action/workflow that will allow me to create Folders using a dropdown menu of predetermined names for those folders?

    I haven't seen one, and since no one has posted about one yet, I'll throw this out.
    I modified a couple of handlers I have laying around into a Run AppleScript action that will make folders from a list of names. The list can be set in a Get Specified Text action, with the "menu" being a Choose from List action:
    Tested workflow:
    1) Get Specified Text (your folder names, separated by returns) for example:
    Testing
    Another test
    My Spiffy New Folder
    2) Filter Paragraphs (Return paragraphs that are not empty)
    3) Choose from List (Prompt: Please choose folder names:)
    4) Run AppleScript:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    make folders with names from a list
    input: a list of names (text items)
    output: a list of Finder items (aliases) created
    set output to {}
    set DestinationFolder to missing value -- set the destination path here if desired
    try -- verify that the path is valid
    set DestinationFolder to DestinationFolder as alias
    on error
    set DestinationFolder to (choose folder with prompt "Choose the location to make the selected folders:")
    end try
    repeat with AnItem in the input
    GetUniqueName for AnItem from DestinationFolder -- avoid duplicates
    try
    tell application "Finder" to make new folder at DestinationFolder with properties {name:the result}
    set the end of the output to the result as alias
    end try
    end repeat
    return output
    end run
    to GetUniqueName for SomeName from SomeFolder
    check if SomeName exists in SomeFolder, creating a new unique name if needed
    parameters - SomeName [text]: a name.extension to check for
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique name
    set {Counter, Divider} to {"00", "_"}
    set Here to -(offset of "." in ((reverse of text items of SomeName) as text)) - 1
    set TheName to text 1 thru Here of SomeName
    if Here is -1 then -- no extension
    set TheExtension to ""
    else
    set TheExtension to text (Here + 1) thru -1 of SomeName
    end if
    set NewName to TheName & TheExtension
    tell application "System Events" to tell (get name of items of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName</pre>
    - the output from the Run AppleScript action is a list of aliases to the folders created, if you want that information to do something with.

  • Dynamic action with set value on date field

    Hi,
    I'm using APEX 4.02
    I'm trying to calculate the age based on the date of birth dynamically on a form. I'm trying to do this with a (advanced)dynamic action with set value.
    I'm able to get this kind of action working based on a number field etc, but NEVER on a date field.
    I've read all posts on this subject but so far no solution. Even if I try to simply copy the value over to another date field or typecast it to a string ( to_char function ) it does not work. So for me the problem seems to be in the source field being a date field.
    I've tried using the source value as is in a select statement :
    select :P33_GEBOORTEDATUM from dual;
    and also type casted based on the date format :
    select TO_DATE(:P33_GEBOORTEDATUM,'DD-MON-YYYY') from dual
    but still no luck.
    On the same form I don't have any issues as long as the calculation is based on number fields, but as soon as I start using dates all goes wrong.
    Any suggestions would be greatly appreciated. If you need any extra info just let me know.
    Cheers
    Bas
    b.t.w My application default date format is DD-MON-YYYY, maybe this has something to do with the issue .... ?
    Edited by: user3338841 on 3-apr-2011 7:33

    Hi,
    Create a dynamic action named "set age" with following values.
    Event: Change
    Selection Type: Item(s)
    Item(s): P1_DATE_OF_BIRTH
    Action: Set value
    Fire on page load: TRUE
    Set Type: PL/SQL Expression
    PL/SQL Expression: ROUND( (SYSDATE - :P1_DATE_OF_BIRTH)/365.24,0)
    Page items to submit: P1_DATE_OF_BIRTH
    Selection Type: Item(s)
    Item(s): P1_AGE
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • How to clear grey loading screen and animated gif (Dynamic Action with "Show Processing" on submit)

    APEX V4.2.3
    DB 11.2
    I have a classic report on page 1.  I have a region button called "Export" (defined by a submit dynamic action with "show processing=Yes") that submits the page and then via a branch directs me to page 2 which has a slightly different version of the report on page 1 (i.e. no breaks) which I want to capture as a CSV export.  Therefore I've set the report template on page 2 to " Export:CSV".
    Now when I click on the page 1 export button the grey screen and loading gif appears indicating that the report is executing and then as expected, page 2 doesn't appear but instead the standard open/save window's dialog box appears asking to open or save the generated CSV file.  All good..but the grey loading screen remains.  How do I clear this loading screen and get back to the context of page 1 ?
    thanks in advance
    PaulP

    Hi PPlatt,
    We would love to help but you left out one crucial part of the puzzle: namely how does your CSV report get exported. With the way it is setup (a redirect to another page), I'm going to assume you do that because you have some PL/SQL on that page that prints the CSV.
    Now there are two questions that are crucial here:
    - How do we stop the icon from bugging us on the screen
    - How do we communicate with the browser that it should no longer display the loading icon
    The first question is rather easy, two simply lines of codes can do that:
    $('#apex_wait_popup').hide();
    $('#apex_wait_overlay').hide();
    But when do we use this code? Quite simple when the document is downloaded. When is it downloaded? At the end of the PL/SQL code that prints the document to the browser.
    What you could do is at the end of that code give an application item a certain value. For example :AI_PRINTED := 'Y';
    Then all you need to do is let the browser ask for the value. You could do this by using JavaScript to continuously fire AJAX to the server using a JS timing event:
    http://www.w3schools.com/js/js_timing.asp
    Better would be a Server send event, but since you left out another crucial piece of information: your browser, I will not go deeper into this.
    Start this timing event when someone asks for the document, and end it as soon as the process returns that :AI_PRINTED equals 'Y'.
    Despite the lack of information, I hope I have given, or at least inspired you to get to the solution.
    Regards,
    Joni

  • How to apply different keyboard shortcuts to an actions with the same name but in different menus within one application?

    Hi,
    Hopefully someone can help. I have the application "djay" and in two different menus there is the action "Eject". I was wondering if it's possible to apply different keyboard shortcuts to those actions with the same name? I can't see how to do it as it seems you can only write the action but as there are two it doesn't seem to work for me.
    For example:
    djay>Table-1>Eject - ⌘⇧1
    djay>Table-2>Eject - ⌘⇧0
    Thanks in advance for any help!!

    A NodeList doesn't only contain 1 element. In your example it contains ALL <Data> elements inside the document.
    NodeList nodes = document.getElementsByTagName("Data");
    System.out.println(nodes.getLength() + " \"Data\"-elements found");
    for(int i=0; i<nodes.getLength(); i++) {
       Node node = nodes.item(i);
    }

  • Dynamic Action on apex items

    Hi,
    I have a requirement like after entering the date of birth in the item. then age value should be set dynamically.
    how can i set the value?

    Hi Tulasi,
    Follow the below steps
    Click on create button-Dynamic action
    select Advanced type
    Give some name
    event - On change
    selection type - item
    item(s) - your page item(used to select date of birth)
    condition - no condition
    action - Execute PL/SQL code
    Fire on page load - blank
    PL/SQL code -
    declare
    v_age varchar2(100);
    v_dob date;
    v_sysdate date;
    begin
    select sysdate into v_sysdate from dual;
    v_dob := :P1_DOB;    //here P1_dob is a page item from where i am selecting date of birth.
    select trunc(to_char((v_sysdate - v_dob)/365)) into v_age from dual;
    :P1_AGE := v_age;     // i have created one item named P1_AGE to display the calculated age.
    end;Page Items to Submit = P1_DOB // replace with your datepicker page item
    Page Items to Return = P1_AGE // replace with your item.
    Hope this will give you some idea.
    Thanks and Regards,
    Jitendra

  • Can I use photoshop text styles and photoshop actions with creative cloud photography?

    I'm really confused by this subscription pricing. If I purchase the $9.99/month, do I get the full desktop app of Photoshop and Lightroom? But I see on this page Products they list something called Photoshop CC that costs twice as much. How is that different from the Creative Cloud Photography?
    My main question is whether I can use photoshop text styles and photoshop actions with Creative Cloud Photography, since I just purchased a bundle that includes these and I want to be able to use them. But I'd also like to understand what comes with all of the various products and how they are different.
    My other question is how is Lightroom different from Photoshop? I have a sense of what you can do in Photoshop but I don't know much about Lightroom at all.
    One more question: the free trial -- is it limited in any way besides the time length? If I do that, will I get a clear idea of all that I will be able to do once I subscribe, or are the functions limited in the trial?
    I tried to just send an email to Adobe to ask these questions but apparently they are not interested in responding to emails from people who are not yet paying customers, so I was directed here. Thanks very much for your help!

    I always like to trot this bit about Bridge once in a while or in the voice of the "Two Bobs" from Office Space,
    "Can you tell us exactly what it is you do around here?"
    What Adobe Bridge does:
    Bridge is the coordinating hub of the Creative Suite. Synchronizing color management settings for all suite programs is done from Bridge, and can only be done from Bridge, to take one important use.
    Bridge displays actual thumbnails of many more file types than Finder or Explorer. It also allows instant play of sound or video files more readily than the native OS file managers.
    Bridge allows direct access to file metadata, to embed copyright information  and keywords where appropriate (e.g., for corporate logo vector and raster files). It also displays the fonts used in an InDesign file, the swatches in an INDD or AI and the output plates (including spot color plates) they use.
    When managing the assets for a design project, Bridge allows quick and simple sorting, rating and custom labeling (with color flash indications) of assets. I can rate images according to whether they are rejects, possibles, for review by client, or approved. The filters built into Bridge allow instant isolation of only the approved images or designs in a folder, only the rejects (for deletion) or only files with certain ratings, no matter how many files it contains. It recognizes aspect ratios, so if I only need a landscape or a 16:9 image in a folder of hundreds of images, I turn off the aspect ratios I don't need.
    Once filtered, the remaining visible files can be selected and copied, moved, or deleted without affecting the rest of the contents of a folder.
    Collections are a massively useful feature. One of my clients is a performing arts center, and in a season we turn out dozens of ads, flyers, brochures, web banners, playbills, billboards and other collateral using the same assets over and over. These assets are organized by artist and/or show on disk, but I set up each season's repeating assets as a Collection in Bridge, so that I just have to open the collection and drag and drop these assets into new INDD, AI, PSD, HTML (in Dreamweaver), FLA or AE projects without having to navigate from folder to folder picking up individual files.
    Bridge's Favorites is another place I stack frequently-accessed folders, such as stock photography, backgrounds, and top-level folders for active projects.
    Assets can be divided into subfolders, but a quick toggle of "Show items from subfolders" exposes all of the assets in a single view while maintaining their organization. I will typically keep AIs, PSDs, EPSs, stock photography and client images in separate subfolders within a project. When I'm ready to start pulling assets into an InDesign layout, I toggle this on and simply drag what I need into the layout.
    Bridge comes with Adobe Camera Raw built in, which is many times faster than using Photoshop to adjust jpegs or tiffs for things like tonal range, white balance, cropping, spotting and sharpening, and is non-destructive.
    One tremendously useful Bridge function for InDesign CS5+ users is the "Show linked files" feature, which opens all the linked files in a layout into a single view, regardless of where they are physically located. I often use this when doing alternative layouts from a client-approved mockup for a campaign, to be certain the same assets are used in each piece, or when creating a motion graphic or interactive piece for the campaign in After Effects or Flash.
    The batch and image processing scripts built into Bridge automate things like creating web-ready small jpegs from multiple images, renaming large numbers of files in place or by copying to an alternative location, creating sets of PSD, png, jpeg or other file types from an assortment of image files, and so on.
    Bridge is so much a part of my daily workflow that on my main workstation I have one monitor dedicated to it almost 100%. Bridge just sits open 24/7, ready for use. I would run at half speed without it, no question.

  • Folder Action + Move Finder Items = Zero KB files

    I've got a folder action set that is supposed to run the Automator Action "Move Finder Items" on any file that gets placed in a specific folder (called "Folder A") and move it to "Folder B". I'm having an issue with larger files though.
    As soon as I begin to transfer the file to "folder A" , the folder action runs and results in a "Zero KB" file in "Folder B".
    Is there any way to keep the Folder Action from triggering until the file has completely copied to the folder with the Folder Action attached ("Folder A")?
    A side note: I have this same folder action running on an iMac with Mac OS 10.6.3 and it works great . (This one was made with the newer version of Automator that shipped with 10.6 vs. Automator on 10.5 which made the action I am having trouble with)
    Any input would be appreciated!

    There is a check in *Snow Leopard* to see if the items have completed their copy/download, but Leopard does not do any checking - the script is triggered immediately. You can add your own delay with a *Run AppleScript* action, though, for example:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- wait for file copy to complete by testing the size of the containing folder
    set theFolders to {} -- to handle items in different folders
    set skippedItems to {}
    repeat with anItem in the input -- get a list of unique folders
    tell application "Finder"
    get (container of anItem) as alias
    if the result is not in theFolders then set the end of theFolders to the result
    end tell
    end repeat
    repeat with aFolder in theFolders
    set timeToWait to 30 -- time to wait for copy to complete
    set interval to 2 -- test every interval seconds
    set copied to false
    tell application "Finder" to set currentSize to size of aFolder -- get initial size
    repeat with timer from timeToWait to 1 by -interval -- check every interval seconds up to maximum time
    delay interval
    tell application "Finder" to set newSize to size of aFolder -- recheck size
    if (newSize is equal to currentSize) then
    set copied to true
    exit repeat -- success
    else -- update size
    set currentSize to newSize
    end if
    end repeat
    if not copied then set the end of skippedItems to quoted form of (aFolder as text) -- timed out
    end repeat
    showSkippedAlert for skippedItems
    return input
    end run
    to showSkippedAlert for skippedItems
    show an alert dialog for any items skipped, with the option to cancel the rest of the workflow
    parameters - skippedItems [list]: the items skipped
    returns nothing
    if skippedItems is not {} then
    set {alertText, theCount} to {"Error with waiting for items to copy", count skippedItems}
    if theCount is greater than 1 then
    set theMessage to (theCount as text) & space & " folders timed out"
    else
    set theMessage to "1 folder timed out"
    end if
    set theMessage to theMessage & " - copy of contents may be incomplete:"
    set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {skippedItems, AppleScript's text item delimiters} to {skippedItems as text, tempTID}
    if button returned of (display alert alertText message (theMessage & return & skippedItems) alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end showSkippedAlert
    </pre>
    The action will check the folder sizes, and when there is no change (or the wait times out) the input items are passed on.

  • Putting Variables in Action "Find Finder Items"

    Hello! I'm using Automator to make a workflow. One of my action in my workflow is to find finder items. I'd like to tell Automator to find items that start with a specific string of text (the text is "016") stored in a variable. Since Automator does not allow me to insert a variable directly, I tried to add the variable by adding the variable's UUID. I followed the method outlined in this website:
    http://hints.macworld.com/article.php?story=20080213200213250
    But even after I put my variable's UUID as "$(9051E0AA-257F-4F00-9A58-50677FB0C07E)", it seems that Automator does not understand, as the results of the action "Find Finder Items" returned no files at all. I tried to store my string as "Storage" and "Text" and used the same method, but it still didn't work. Thank you very much!

    I'm not sure what the action is using to search, but a name extension does not include the period. Another approach would be to get the entire contents of the memory card, and filter the items from there.

  • Strange problem with JComboBox

    I am having a strange problem with JComboBox, I created a method as a JComboBox factory which returns a JComboBox filled with items. the method works fine and I can see the items in the JComboBox. The problem is when I try using the method myCombo.SelectedItem(String item); the object myCombo does not set the selected item, it just leaves the item blank (or unselected).
    //This method build a JComboBox
    public javax.swing.JComboBox makeJComboBox(String[] items) {
    javax.swing.JComboBox myComboBox = new javax.swing.JComboBox();
    for (int index=0;index<items.length;index++){
    myComboBox.addItem(makeObj(items[index]));
    return myComboBox;
    public Object makeObj(final String item) {
    return new Object() {
    public String toString() {
    return item;
    }

    Couple of better ways to populate a combo with items-
    public javax.swing.JComboBox makeJComboBox(String[]items) {
    javax.swing.ComboBoxModel cbModel = new DefaultComboBoxModel(items);
    javax.swing.JComboBox myComboBox = new javax.swing.JComboBox(cbModel);
    return myComboBox;
    }OR
    public javax.swing.JComboBox makeJComboBox(String[]items) {
    return new javax.swing.JComboBox(items);

  • Service complaint with sales items

    Hi guru's,
    If I have a CRM service complaint document with sales items in it (returns or replacement) how does the system know to replicate the item to ECC to create the return order? Also, hows does the system know which order type in ECC to use?
    Many thanks,
    John

    Hi John,
    The crux of the replication depends on the item category and the actions in the complaints transaction. You need to create the same order type (Complaints) in ECC (Copy of OR standard order). The item category configuration and determination should be in sync from CRM to ECC. So once you create a complaints and trigger the replacement action, the sub item with item category TAN is created which also creates an order in ECC with only sub item and item category TAN. Similar with other actions. Item category controls if replacement should happen or only returns should happen.
    Hope this helps.
    Regards,
    Chandrakant

  • Update JComboBox items

    Hi forum
    I want a JComboBox which items could be updated by code (with my "update" method) or when an item is changed by the user.
    So, its items would be updated when the user change its selection or when the "update" method is invoqued externly.
    Before I used an ActionListener, but now I think that it's better to use a FocusListener to only attend the user interactions.
    I tried to to make an example, but I got an infinite loop. Below is the code.
    I apreciate any solution.
    Thanks a lot.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class JComboBoxProblem extends JFrame {
         private String[] modelos = new String[] {"Ferrari", "Porche", "BMW", "Lamborgini"};
         private JComboBox combo = new JComboBox(this.modelos);
         private JLabel label = new JLabel();
         public JComboBoxProblem() {
              super();
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setSize(150,80);
              this.setLocation(300,200);
              this.setLayout(new GridLayout(2,1));
              this.add(BorderLayout.CENTER,this.label);
              this.add(BorderLayout.SOUTH,this.combo);
              this.update();
              this.setVisible(true);
              this.combo.addFocusListener(new FocusAdapter() {
                   // si el JComboBox coje el foco (lo ha seleccionado el usuario)
                   public void focusGained(FocusEvent fe) {
                        combo.addItemListener(new ItemListener() {
                             public void itemStateChanged(ItemEvent ie) {
                                  if (ie.getStateChange()==ItemEvent.SELECTED) {
                                       update();
         private void update() {
              DefaultComboBoxModel m = (DefaultComboBoxModel)this.combo.getModel();
              Object o = m.getSelectedItem();
              m.removeAllElements();
              for (int i=0; i<this.modelos.length; i++) {
                   m.addElement(this.modelos);
              this.label.setText("coche n� "+ (m.getIndexOf(o)+1));
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        try {
                             new JComboBoxProblem();
                        } catch (Exception ex) {}
    Message was edited by:
    xcorpyon
    Message was edited by:
    xcorpyon

    Hi again
    I'll try to explain my problem with JComboBoxes again with a new sample.
    It begins when I have more than one JComboBoxes and specially when I want to change and update its selected item.
    In the following sample I don't understand for example why does the second combo update twice and the first combo once (you can see it executing the sample).
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class JComboBoxProblem extends JFrame {
         private String[] modelos1 = new String[] {"Ferrari", "Porche", "BMW", "Lamborgini"};
         private String[] modelos2 = new String[] {"Boa", "Anaconda", "Pit�n"};
         private JComboBox combo1 = new JComboBox(this.modelos1);
         private JComboBox combo2 = new JComboBox(this.modelos2);
         private JLabel label = new JLabel();
         private int inc=0;
         public JComboBoxProblem() {
              super();
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setSize(180,120);
              this.setLocation(300,200);
              this.setLayout(new GridLayout(3,1));
              this.add(this.label);
              this.add(this.combo1);
              this.add(this.combo2);
              this.update();
              this.setVisible(true);
              this.combo1.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        update();
              this.combo2.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        update();
         private void update() {
              this.combo1.setModel(new DefaultComboBoxModel(this.modelos1));
              this.combo1.setSelectedIndex(1);
    //          this.combo2.setModel(new DefaultComboBoxModel(this.modelos2));
    //          this.combo2.setSelectedIndex(2);
              this.label.setText("updated "+ (++inc) +" times");
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        try {
                             new JComboBoxProblem();
                        } catch (Exception ex) {}
    }Thanks a lot

  • How to get  log of user's delete action on Content Items?

    Hi all,
    When one user edit a Content Item, we can get the log about this action. But when user delete this content Item, I couldn't find out the log about this action.
    I wonder that WebCenter Content have any function to logging the delete action on Content Items?
    If it have, where I can find it ?
    Thanks a lot!

    If you are strictly interested in just "deletes", you can query the table "DocumentHistory". Basic data like checkin, checkout, update, and delete actions against a document is recorded there, along with the user and date.
    If you need deeper data however, as Srinath noted, Content Tracker is built for those deeper requests.

  • Customer/Vendor A/C with line item details and with opening and closing Bal

    Dear Sir / Madam,
    Is it possible to have a customer and / or vendor Sub-Ledger account-
    with line item details and with opening and closing balance detail
    for a particular period.?
    Regards
    Chirag Shah
    I thank for the given below thread which has solved the same problem for G/L Account
    Re: Report to get the ledger printout with opening balances

    Hello Srinujalleda,
    Thanks for your precious time.
    I tried the referred T-Code
    But this report is not showing Opening balance, closing balance detail.
    It only gives transactions during the specified posting period and total of it.
    Please guide me further in case if I need to give proper input at selection screen or elsewhere.
    Client Requires Report in a fashion
    Opening Balance as on Date
    + / -  Transactions during the period
    = Closing Balance as on date
    As that of appearing for G/L Account by S_ALR_87012311
    Thanks once again & Regards
    Chirag Shah

  • Can we associate index with foreign key?

    hello
    i have searched and could not find the answer to the above;
    i have a foreign key constraint on the tables; i added an index on that column as well;
    however when i query the all_constraints, under index_name for this foreign constraint there is nothing; only when i have PK/UK i case see indexes associated with them;
    will then oracle still associate my index with the FK constrained column? or i need to excplicity associate it with the foreign key column? if so, how to do that?
    thx
    rgds

    Hi,
    UserMB wrote:
    i have a foreign key constraint on the tables; i added an index on that column as well;It helps if you give a specific example, such as:
    "I have a foreign key constraint, where emp.deptno references dept.deptno. (Deptno is the primary key of dept.) I created an index called emp_deptno_idx on emp.deptno as well."
    however when i query the all_constraints, under index_name for this foreign constraint there is nothing; only when i have PK/UK i case see indexes associated with them;Not all indexes are associated with a constraint. In the example above, you wouldn't expect to see anything about the index emp_demptno_idx in all_constraints or in all_cons_columns.
    will then oracle still associate my index with the FK constrained column? or i need to excplicity associate it with the foreign key column? if so, how to do that?In the situation above, Oracle will still use the index when the optimizer thinks it will help. You don't have to do anything else.

Maybe you are looking for