Select column_name var PROBLEM

of mssql I'd do it

Select the high State 1
of T_EVOUCHER_AUDIT_TRAIL
WHERE VOUCHERID = v_VID
ORDER BY DESC CREATEDDATETIME

This query select the last disk based on the time. I have a problem this conversion in oracle in a view syntax.

DECLARE variable_name VARCHAR2 (100);

STATUS of SELECT INTO nom_de_variable
DE)
SELECT THE STATE
TABLE
ORDER BY DESC CREATEDDATETIME
)
WHERE ROWNUM < = 1;

That's what I did for oracle in a trigger, but I think that it is wrong as I already identify that this part is wrong. (no error in compilation but when run it throws an error).

I am trying to take column_name value and assign it to nom_de_variable
I don't know if it's the right syntax.

Can someone care to comment or opinion on that. How to get the value of a select statement that is nested in a variable in a trigger. Thanks a bunch

----------------------------------------------
The real problem is that part of the syntax

DECLARE variable_status VARCHAR2 (100);

STATUS of SELECT INTO variable_status
DE)
SELECT THE STATE
TABLE
ORDER BY DESC CREATEDDATETIME
)
WHERE ROWNUM < = 1;

Can I use a nested select statement to put in a variable?

------------------------------------------

REAL SCENARIO HERE

CREATE TABLE 'T_EVOUCHER_MASTER '.
(
'VOUCHERID' VARCHAR2 (30 CHAR) NOT NULL,
VARCHAR2 (10 CHAR) "UPDATEDBY."
TIMESTAMP 'UPDATEDDATETIME' (6).
'STATUS' VARCHAR2 (10 CHAR)
/ * column more below here that I erased off the coast for the simplicity.
);

CREATE OR REPLACE TRIGGER "TR_EVOUCHER_AUDIT" FRONT
UPDATE on T_EVOUCHER_MASTER for EACH ROW DECLARE v_VID char (30);
v_NEWSTATUS char (1);
v_OLDSTATUS char (1);
v_UPDATEDBY char (10);
v_UPDATEDDATETIME TIMESTAMP (6);
v_TRANSTYPE CHAR (50);

BEGIN
SELECT: NEW. VOUCHERID,
: NEW. STATUS,
: NEW. UPDATEDBY,
: NEW. UPDATEDDATETIME
BY v_VID,
v_NEWSTATUS,
v_UPDATEDBY,
v_UPDATEDDATETIME
FROM DUAL;
SELECT THE STATE
IN v_OLDSTATUS
Of
(SELECT STATE
Of
(SELECT STATE
OF T_EVOUCHER_AUDIT_TRAIL
WHERE VOUCHERID = v_VID
ORDER BY DESC CREATEDDATETIME
)
)
WHERE ROWNUM < = 1;
/ * more logical flow below here that I erased off the coast for simplicity * /.
END;
/
ALTER TRIGGER 'TR_EVOUCHER_AUDIT' ACTIVE;


SELECT THE STATUS, UPDATEDBY, VOUCHERID, UPDATEDDATETIME
OF T_EVOUCHER_MASTER
WHERE STATUS IN ('N', 'W')
AND TRUNC (EFFECTIVESTART, 'DDD') > = TO_DATE(SYSDATE,'DD/MM/YYYY')

VOUCHERID STATUS UPDATEDBY UPDATEDDATETIME
1011548 N Francis July 13, 11 PM 12.03.00.502000000
1011550 N Francis July 13, 11 PM 12.11.30.416000000

UPDATE T_EVOUCHER_MASTER SET STATUS = 'E ',.
UPDATEDBY = 'system ', he said.
UPDATEDDATETIME = CURRENT_TIMESTAMP
WHERE VOUCHERID = '1011548';

Error from line 7 in the command:
UPDATE T_EVOUCHER_MASTER SET STATUS = 'E ',.
UPDATEDBY = 'system ', he said.
UPDATEDDATETIME = CURRENT_TIMESTAMP
WHERE VOUCHERID = '1011548'
Error report:
SQL error: ORA-01403: no data found
ORA-06512: at "HONDASTAGING12.TR_EVOUCHER_AUDIT", line 22
ORA-04088: error during execution of trigger 'HONDASTAGING12.TR_EVOUCHER_AUDIT '.
01403 00000 - "no data found".
* Cause:
* Action:


As promised, this is the real scenario

BTW, I correct this error, but not 100% sure if it right. To see if my dose corresponds to your.

Published by: DominicNg85 on July 13, 2011 01:40

Published by: DominicNg85 on July 12, 2011 08:18

Published by: DominicNg85 on July 12, 2011 08:19

Published by: DominicNg85 on July 12, 2011 08:20

Published by: DominicNg85 on July 12, 2011 08:41

Published by: DominicNg85 on July 12, 2011 10:00

Published by: DominicNg85 on July 12, 2011 10:23

Published by: DominicNg85 on July 13, 2011 01:41

It's not so weird, because the TANK is different from VARCHAR2, skates TANK your string with blanks to the specified length.
http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1542606219593

Tags: Database

Similar Questions

  • Select and mask | Problems with the selection in the process of disappearance - CC 2015.5

    Hi all!

    I've just updated Photoshop 2015.5 CC version.

    I am currently working on a design that needs cutting contours.

    So I picked all the areas belonging to the background of the image and then click on the "select and mask" to refine the edges and then clear my selection as I usually did.

    But instead, my selection disappeared...

    My steps were:

    1. Selection of the areas to clear with "themagic wand tool.
    2. Click on 'select and mask' (output parameters: output to the selection).
    3. Click on 'OK'.
    4. Selection has disappeared!

    I have provided all the tools to their default settings, but nothing has changed.

    I tried to close and reopen the case, repeat the steps to delete the background, but I always feel the question.

    It is a big problem for me!

    I hope that there is someone who could help me/us with this!

    Best,

    Joanna

    I actually asked the new workspace me first thing after update, because I wasn't getting.  It's different enough that you need to learn everywhere, I'm afraid, but it is definitely an improvement when you become familiar with it.  See Julianne Kost guide below, but I suspect that you may need to adjust the sliders that control the opacity of the background.  Or simply click on the transparent part to start the selection.

    Select and mask "Julieanne Kost's Blog

  • Cross selection of users problems?

    OK, so I don't even really know how to explain this problem.

    I'm working with another designer, and just recently, he opened a file that I was working on, made some changes and saved.

    NOW, when I go and open the file on my PC and try to click any vector object (include logos) I get only a rectangle selection of perimeter. NOT large vector individual lines, even when he is separated from itself, I get only the perimeter zone and not contours.

    However, when I open a different file, as my partner has NOT opened and saved, I always get the exact perimeter AND individual lines.
    I have no idea what is going on, but I really need to solve this problem because it affects the workflow.

    Example of selection ONLY distance:

    logo-green-bk.jpg

    Example of line selection individual Correct perimeter AND:

    logo-black-bk.jpg

    2 reasons I can think

    (1) select this if your appearance palette shows the symbol, then right click and choose break link to symbol.

    (2) you did a view > hide edges. Just do a Ctrl-H to toggle between show and hide the edges.

    If that doesn't work, then try the arrow tool dig to select this option and give us a screenshot of your results.

  • Selection of file problem when you add the keyword to multiple files

    Hello

    I noticed a problem that I have updated to the latest version of bridge CC (6.1.1.10) (maybe the problem was there before, but I don't notice it)

    When I apply a change in key words for several files at the same time, I note that each updated file (a) is selected. The result is that I can not choose any new file right after I do a keyword change, because my selection is immediately to the file updated by my last request. I have to wait for my keyword change request to stabilize a selection of file not then continue to work.

    Is it possible to disable this behavior (which occur until CS6 Bridge)?

    It's very annoying because if I requested a change of keyword for 1000 records for example, it takes a while to run, and I can't do anything else during this time...

    What is a 'normal' behavior or just a bug?

    Any help welcome!

    It is a normal behavior. I saw him with the metadata entry. Normally it's pretty fast, but with 1000 files, it takes time. Must edit and save all the XMP information in files, which may take some time, depending on your system.

  • Selection of objects problem

    I am a new user of Illustrator, but I'm having a problem that I have no sense for me.  I can't select an object without moving it too.

    Steps to re-create the problem:

    1. Create a new document in Illustrator
    2. Match draw 2 rectangles
    3. Choose the "Sélection (V)" tool
    4. Click on and release the left button of the mouse on the rectangle that is not currently selected

    At this point, does not this rectangle is selected.  If I don't move my mouse, it stays like that.

    However, as soon as I move my mouse pixels ~ 10, suddenly, the rectangle is selected and moving with the mouse.  A second later (or almost), the object is automatically deleted.

    It behaves almost as if my mouse button is "stuck".  But I've reproduced it with the on-board trackpad and external mouse.  The "Direct Selection" tool causes the same symptoms.  However, I have not seen all the other functions that do not work as expected.

    It is on a Macbook Pro last generation running Mountain Lion.  The only other CS product I use is Dreamweaver, and I didn't notice any problems.

    I called Adobe tech support and that we have obtained in what concerns the deletion of my preferences.  (that does not affect the question)  However, we have been disconnected twice (without call back twice) and after > 15 minutes waiting for a third attempt, I'm pretty frustrated.

    Thanks for any help or suggestion.

    After a search through the forums, I found someone suggest something that solved my problem.  I add the solution here in the hope that someone else finds it.

    The culprit was entitled Zoom.  Addition of Illustrator to its exclusion list seems to solve the problem.

  • Selection of tool problem feather of Photoshop CS5?

    I use photoshop for quite awhile and have never encountered this problem. I got CS5 for about a year now and this is the first time, he did, so I hope someone can help me!

    When I open photoshop, everything works. I make a new layer, click on use the pen tool, make my form and then fill it out, and solidifies the line having shown that it is a complete form. I right click and select the option: making choices.

    Instead of transforming the Interior of the shape in the selected part, he chooses all outside it!

    I can't for the life of understand me how this began to happen, as he did a few days ago. I must have hit a button or something, but its still very annoying. I hope someone can help! Restart the program and the computer, does not help.

    There is a button for this upward in the box options, when a path tool is active.    It's been a while...  Ah, here:

    I bet you down next to him.

    Look at your icons of trajectory in the TRACE Panel.  If they are white inside, you create a provided path.  If they are gray inside a white border, you remove a path from the environment.

    -Christmas

  • Var problems!

    Just as I thought I was starting to get the hang of it.

    OK, let me tell you what I got.

    The maintimeline I have the code:

    mov var = 1

    In the main timeline, I also have a movieclip called 'world' (_root.world)

    Inside of the 'world' I have four movieclips called 'pilot' and 'building1' and 'section2' and 'batiments3' ( _root.world.building1 ,_root.world.pilot and _root.world.building4and _root.world.building2 )

    Inside of 'pilot', I have several interpolations on different fames (an interpolation on say frame 1-15, another on say 16-25 etc. etc.)

    Basically, when I click on one of the buildings, I want her to play an interpolation of some all by also changing the var mov to another number - so that when I click on another building after the first, it will play the interpolation depending on what mov is equal. I hope you understand.

    I tried two ways so far is my code for buildings:

    Building1.onRelease = function() {}
    If (_root.mov = 1) {}
    _root. World.Pilot.gotoAndPlay (271);

    _root.mov = 2;
    }
    ElseIf (_root.mov = 2) {}
    _root. World.Pilot.gotoAndPlay (163);
    _root.mov = 3;
    }
    ElseIf (_root.mov = 8) {}
    _root. World.Pilot.gotoAndPlay (163);

    _root.mov = 5;
    }
    ElseIf (_root.mov = 9) {}
    _root. World.Pilot.gotoAndPlay (163);

    _root.mov = 7;
    }
    ElseIf (_root.mov = 13) {}
    _root. World.Pilot.gotoAndPlay (1429);

    _root.mov = 3;
    }

    }

    This doesn't seem to work. I have also tried to put the code inside of the moveclip 'pilot', on the top layer interpolations. This is the code:

    Mov var = 1 / / part 1

    then on frame 15

    Stop();

    var = 2 Mov

    When I did it I changed the code on the buildings too:

    Building1.onRelease = function() {}
    If (_root.world.pilot.mov = 1) {}
    _root. World.Pilot.gotoAndPlay (271);

    }


    ElseIf (_root.world.pilot.mov = 2) {}

    _root. World.Pilot.gotoAndPlay (163);

    }

    ... etc. etc., but it doesn't work, any help pleassseeee, if you don't understand something please ask as I realllyyy neeed help on that.

    Thank you guys

    If you only want a variable named mov, can only declare a.  Using "var" declares a new variable.  Does not use "var" more than once for it.

    But beyond that, you have a larger problem in your conditional statements... Use is when the test for equality and for the assignment of a value =...

    If (_root.mov = 13) should be if (_root.mov is 13), as well as for all others, you have

  • Apex 4.0 tabular, list selection and Firefox problem

    I created a form in a table by using the wizard, and then I changed the first column displayed in a selection list. In this case, the Department only.

    In Firefox 3.6.6 and 4.0b1, everytime I refresh the page, the value of the selection list changes. It's weird. Does not occur in IE8.

    To reproduce the problem, load the following link in firefox, click on the Refresh button 10 times slowly and watch the Dept select list.

    Example here, http://apex.oracle.com/pls/apex/f?p=34847:4

    Hi PC,.

    This is bug # 9885538. We are currently working on it. To work around the problem, modify the security settings under page attributes and attribute set 'auto-complete form' on 'Off '. This should correct the problem in FF.

    Concerning
    Patrick

  • Select and hide problems CC2015.5.1

    I'm on a new iMac, El Capitan, using CC2015.5.1 and I can not do Select and hide the work at all.

    I make my selection as usual and click on Select and mask. The good screen comes up and I can change the sliders, but the new tools of additional selection on the left don't do anything.  And when I choose an outing, I went back to my image, but else nothing happens at all.  Output selection reminds me of my image, no selection.  Out again layer with mask gives me another copy of my image with a white layer mask - like I had done no selection at all. I have seen that a minor update - 2015.5.1 - had been released that fixes a few bugs, but it did nothing at all for me. I looked in preferences to see if there is something that must be enabled (or disabled) and the reset tool.

    Any idea of what could happen?

    Try resetting your preferences first.

  • Filter selection in a problem tabular list

    Hi all:

    I need to filter a list in tabular form, dependent on another value of the column in the same row of tables

    Try using the syntax * #COLUMN #* in the query select list, but not worked.

    This is my request
    SELECT   nombre_respuesta, cod_respuesta
      FROM   enc_respuesta
     WHERE   cod_pregunta = #COD_PREGUNTA#
    Is there another way I can refer to the value of a column in the same row?

    concerning

    Gerard

    Hello

    You cannot use the column substitution string in LOV query.
    Use APEX_UTIL. SAVEKEY_VC2 in your query form, and then APEX_UTIL. KEYVAL_VC2 in LOV query.

    Kind regards
    Jari

    Published by: jarola July 11, 2011 10:03

    I've not found site where's guide how to use APEX_UTIL. KEYVAL_VC2
    But see this
    http://HTMLDB.Oracle.com/pls/OTN/f?p=18326:54:P54_ID:1282

    Instead create this custom package, use APEX_UTIL. SAVEKEY_VC2 and APEX_UTIL. KEYVAL_VC2

  • Select the separate problem

    Hi all
    I'm not exactly Mr. Database... but I tried to make a query where I can get all the distinct values in a column field in my table as follows and paste them into the variables...:

    < cfquery name = "initialValues" datasource = "fikestudioDB" >
    Select distinct aLitho from work where aproductID = #VAL (URL.productID) #.
    < / cfquery >

    But what I need to do, is to store each unique value of the "aLitho" field in variables after execution of the statement...
    I usually on 3-4 unique values in the query... but their storage in variables, that's what I tried to do...

    Any help is greatly appreciated...
    Thank you!

    Thank you guys so much! The two pieces of code worked very well...

  • select SQL query problem

    Hi friends,

    I have a view called 'risk_efforts' with the field user_id, user_name, wknd_dt, Etiquettemois, prod_efforts, unprod_efforts.

    Name Type
    -------------- -------------
    ROW_ID NUMBER
    USER_ID VARCHAR2 (14)
    VARCHAR2 (50) USER_NAME
    WKND_DT VARCHAR2 (8)
    ETIQUETTEMOIS VARCHAR2 (250)
    NUMBER OF PROD_EFFORTS
    NUMBER OF UNPROD_EFFORTS

    data are like this:
    When there is some data in prod_efforts, unprod_efforts will be null
    When there is some data in unprod_efforts, prod_efforts will be null

    for example:

    USER_ID, USER_NAME WKND_DT ETIQUETTEMOIS PROD_EFFORTS UNPROD_EFFORTS
    G666999 20100403 GTest KILLS null 3
    G666999 GTest 20100403 Mar 14 null

    now I want to combine these 2 rows in i.e 1 row o/p should be like this

    USER_ID, USER_NAME WKND_DT ETIQUETTEMOIS PROD_EFFORTS UNPROD_EFFORTS
    G666999 20100403 GTest KILLS 14 3

    I tried all combinations but couldn't make the query. Please help me with the exact SQL select query.

    Thank you
    Girish

    Welcome to the forum.

    First read this:

    Emergency in online messages

    Second, it is always helpful to provide the following information:

    1. oracle version (SELECT * FROM V$ VERSION)
    2. examples of data in the form to CREATE / INSERT commands.
    3. expected results
    4 explanation of the expected results (alias "business logic")
    5. use.

     tags for #2 and #3. See FAQ (Link on top right side) for details.
    
    You have provided #3 and #4. However with no usable form of sample data forum members will often not respond as quickly as they could if you provided #2.
    
    I'm just wagering a guess here but what about this:
    

    SELECT ROW_ID
    USER_ID
    WKND_DT
    ETIQUETTEMOIS
    MAX (PROD_EFFORTS) AS PROD_EFFORTS
    MAX (UNPROD_EFFORTS) AS UNPROD_EFFORTS
    OF RISK_EFFORTS
    ROW_ID GROUP
    USER_ID
    WKND_DT
    ETIQUETTEMOIS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    
  • Dynamically select a complete set of results in a CLOB

    Hello

    Oracle 11g R2 11.2.0.3

    IBM AIX

    A developer came to me with a requirement to query a table based on an ID and have the whole read a clob.

    It needs to be dynamic, since this code is a FK and may appear in several child tables. I've seen similar questions in the forum but none quite addressed my scenario.

    A simple example is:

    create table t1 (col1 number, col2 varchar2(50));
    
    insert into t1 values (1,'Test record');
    commit;
    

    Here's where I need help.

    (i) I select user_tab_columns where table_name = T1.

    .. .but in reality I'll pass the name of the table as a parameter.

    select column_name 
    from user_tab_columns
    where table_name = 'T1';
    
    select *
    from t1 where id=1;
    

    (II) I need the output to be:

    < col_name1 > = < col1_value >; < col_name2 > = < col2_value > etc...

    for example

    COL1 = 1; Col2 = 'Test in the folder '.

    And I need that stored in the content of a CLOB for insertion in a CLOB field in an audit table.

    Any help or pointers greatly appreciated. The key is that it should be dynamic that I do not know the composition of the table where the ID, so I must consult the DD.

    Phil

    You can do this with a query that uses DBMS_XMLGEN.getXML to generate all the data of a query filtered as XML, string flatten the XML into key / value pairs using some XQuery and XMLTable and then use listagg data flattened, to create the concatenated output like you need.  You could do the concatenation with XQuery, but I suspect that listagg is much more effective.

    Be warned, Listagg has a length of 4000 characters limitation, so if your concatenation for a single line is beyond that, you can have problems.

    Everything you do is change the query string in the call to DBMS_XMLGEN. GetXML. This request can then be used to just pump lines in a CLOB in the comic book.

    with xml_test (object_value) as)

    Select xmltype (DBMS_XMLGEN. GetXML ('select * from object where rownum)< 3'))="" from="">

    ),

    xmlflatten like)

    Select x.*

    of xml_test t

    XMLTable)

    ' for $i in $d/ROWSET / / ROW /(child::*)

    Returns the element r

    {

    element node_group_id {fn:count($i/.._/_qui_precede-sibling_::_ligne)}

    element node_name {name ($i)}

    , element node_value {$i / text ()}

    }'

    from t.object_value as "d".

    whole path in the form of node_group_id columns 'node_group_id '.

    node_id for ordinalite

    , node_name varchar2 (30) path 'nodeName.

    , path of varchar2 (2000) node_value "node_value.

    ) x

    )

    Select node_group_id as rec_id, listagg(node_name||) e ='|| node_value, ';') in group data (order by node_id)

    of xmlflatten

    Node_group_id group

    REC_ID DATA
    0 OWNER = SYS; OBJECT_NAME = ORA$ BASE; OBJECT_ID = 133; OBJECT_TYPE EDITION; CREATED = 25 AUGUST 15; LAST_DDL_TIME = 25 AUGUST 15; TIMESTAMP = 2015-08 - 25:17:36:52; STATUS = VALID; TEMPORARY = N; GENERATED = N; SECONDARY = N; NAMESPACE = 64; SHARING = NONE; ORACLE_MAINTAINED = Y
    1 OWNER = SYS; OBJECT_NAME = DOUBLE; OBJECT_ID = 142; DATA_OBJECT_ID = 142; OBJECT_TYPE = TABLE; CREATED = 25 AUGUST 15; LAST_DDL_TIME = 26 AUGUST 15; TIMESTAMP = 2015-08 - 25:17:36:52; STATUS = VALID; TEMPORARY = N; GENERATED = N; SECONDARY = N; NAMESPACE = 1; SHARING = METADATA LINK. ORACLE_MAINTAINED = Y

    2 selected lines.

  • How to automate cropping of selection?

    Hello

    I a m looking for an overall process,

    I want to automate a culture of choice, regardless of the size of the selection

    The problem if I record an action, the specific limits, which only works for one specific size...

    I need to preserve the cropped pixels...

    Thanks for helping!

    This give a try.

    #target photoshop;
    if(documents.length) cropToSelection();
    
    function cropToSelection() {
    try{
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    var SB = activeDocument.selection.bounds;
    var desc14 = new ActionDescriptor();
    var desc15 = new ActionDescriptor();
    desc15.putUnitDouble( charIDToTypeID('Left'), charIDToTypeID('#Pxl'), SB[0].value );
    desc15.putUnitDouble( charIDToTypeID('Top '), charIDToTypeID('#Pxl'), SB[1].value  );
    desc15.putUnitDouble( charIDToTypeID('Rght'), charIDToTypeID('#Pxl'), SB[2].value  );
    desc15.putUnitDouble( charIDToTypeID('Btom'), charIDToTypeID('#Pxl'), SB[3].value  );
    desc14.putObject( charIDToTypeID('T   '), charIDToTypeID('Rctn'), desc15 );
    desc14.putUnitDouble( charIDToTypeID('Angl'), charIDToTypeID('#Ang'), 0.000000 );
    desc14.putBoolean( charIDToTypeID('Dlt '), false );
    desc14.putEnumerated( stringIDToTypeID('cropAspectRatioModeKey'), stringIDToTypeID('cropAspectRatioModeClass'), stringIDToTypeID('unconstrained') );
    executeAction( charIDToTypeID('Crop'), desc14, DialogModes.NO );
    }catch(e){
        alert("There is no selection!");
        }
    finally{
    app.preferences.rulerUnits = strtRulerUnits;
    app.preferences.typeUnits = strtTypeUnits;
        }
    };
    
  • Problem with ScriptUI lists

    Hi all

    I have a problem with a ScriptUI Photoshop for six days.

    This script defines a table of all the images located in a top folder and its subfolders. Then he opens the first found photo and creates a list of the EXIF of the camera.

    I know how to set the items selected by the user in a table. My problem is not the text that I want to extract, but their index numbers (lines 56 and 62).

    Any idea?

    // Enables double clicking from the Macintosh Finder or Windows Explorer
    #target photoshop
    app.bringToFront();
    
    
    var topFolder = Folder.selectDialog("Select the top folder where your images are : ");
    if (topFolder != null) 
    {
      filesArray = scanFolder(topFolder);
    }
    
    
    // Opens the first photo found
    if (filesArray.length > 0) 
    {
      var docRef = filesArray[0];
      app.open (docRef);
    }
    
    
    // Sets the EXIFs of the camera in an array
    var exifArray = new Array();
    var selectedItems = new Array;
    var exifNumber = app.activeDocument.info.exif.length;
    for (var i = 0; i < exifNumber; i++)
    {
      exifArray[i] =  app.activeDocument.info.exif[i][0];
    }
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    
    
    // User interface
    var w = new Window("dialog");
    var information = w.add('statictext',undefined,'Press the key Ctrl and select the EXIFs you need.'); 
    var columns = w.add("group");
    columns.orientation="row";
    var list1 = new Array();
    var list2 = new Array();
    var halfList = Math.round((exifArray.length)/2);
    for (var i=0;i<halfList;i++) // List 1 (left column)
    {
      list1[i] =  exifArray[i];
    }
    
    
    for (var i=halfList;i<exifNumber;i++) // List 2 (right column)
    {
      list2[i-halfList] =  exifArray[i];
    }
    
    
    var listExif1 = columns.add ("listbox", undefined,list1,{multiselect:true});
    var listExif2 = columns.add ("listbox", undefined,list2,{multiselect:true});
    listExif1.onChange = function()
    {
      selectedItems[selectedItems.length] = listExif1.selection;
    }
    
    
    listExif2.onChange = function()
    {
      selectedItems[selectedItems.length] = listExif2.selection;
    }
    var exeButton = w.add ("button", undefined,"Execution");
    exeButton.onClick = main;
    w.show();
    
    
    // Puts the selected items in an array
    function main()
    {
      for (var i=0;i<selectedItems.length;i++)
      {
      alert(selectedItems[i]);
      w.hide();
      }
    }
    
    
    // Recursive function 
    function scanFolder(folder) {
      var filesArray = [],
      fileList = folder.getFiles(),i, file;
    
      for (i = 0; i < fileList.length; i++) {
      file = fileList[i];
      if (file instanceof Folder) {
      filesArray = filesArray.concat(scanFolder(file));
      }
      else if (file instanceof File && file.name.match(/\.(jpg|)$/i)) {
      filesArray.push(file);
      }
      }
      return filesArray;
    }
    

    Hi Michel,.

    listExif1.selection returns an array of ListItems.  You can get the index using the 'index' property, or get the text using the "text" property

    For example if I put the following code in the listExif1.onChange Manager:

    var selections = "";
    for(var i=0; i < listExif1.selection.length; i++){
         selections += "\nIndex:"+listExif1.selection[i].index+", text: "+listExif1.selection[i].text;
    }
    alert(selections);
    

    I get the following text in the alert after two selections:

    Index: 4, text: Description of the Image

    Index: 7, text: Orientation

    In addition, I don't know exactly what you are trying to accomplish, but as a guess, you want a list of currently selected items when the user press the run button. In this case I consider rather than follow the selections in the onChange for each listbox handler, simply get the current selections at the time when the user presses the run button.

    If the main function might look like this:

    function main()
    {
      selectedItems = listExif1.selection.concat(listExif2.selection)
      for (var i=0;i
    

    If you do not need to follow whenever the user changes the selection in the list box, you need to specify how you add to the selectedItems array.

    Hope that helps.

    Thank you

    Eric

Maybe you are looking for