How to create and execute a function whose return value is  a table

hi folks ,
i would like know how to create and execute a function whose return value is a table ,
am new to pl/sql ,
my statement for the function is
SELECT ct.credential_code, c.expiration_date
FROM certifications c, credential_types ct
WHERE ct.crdnt_id = c.crdnt_id
AND c.person_id = person_id;
i would like to have the result of the above query as return value for the function.
Thanks in advance ,
Ashok.c

hi Ps ,
Can you please do small sample ,
that would help me in clear understanding
thanks in advance
ashok.c

Similar Messages

  • How to create and execute PL/SQL program or Procedure from Java (JDBC)

    hi all,
    user will enter the Pl/Sql program from User-Interface. that program has to be create in DB and execute that.
    due to some confusions, how to execute this from Java, i (user) entered the same logic through a Procedure.
    my Java code is
    Statement st = con.createStatement();
    Statement.execute(procedure_query); // procedure name is myPro
    CallableStatement cs = con.prepareCall("{call myPro}");
    (as given in SUN docs - http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html)
    but its not creating the procedure.
    and i tried to run a procedure (which is already created) with CallableStatement, and this is also not working.
    how to get this.
    thanks and regards
    pavan

    Hi,
    SInce the PL/SQL block is keyed in dynamically, you probably want to use the anonymous PL/SQL syntax for invoking it:
    // begin ? := func (?, ?); end; -- a result is returned to a variable
    CallableStatement cstmt3 =
    conn.prepareCall(“begin ? := func3(?, ?); end;”);
    // begin proc(?, ?); end; -- Does not return a result
    CallableStatement cstmt4 =
    Conn.prepareCall(“begin proc4(?, ?); end;”);
    SQLJ covered in chapter 10, 11, and 12 of my book furnish a more versatile dynamic SQl or PL/SQL mechanisms.
    Kuassi
    - blog http://db360.blogspot.com/
    - book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html

  • How to create and use a node globally  as well as internal table

    HI,
    Kindly let me know how can I create a node & internal table globally and which I can use them in various methods in view and controller as well, if u can provide an example it could be very help full.
    my requirment is uploading a multiple files in wdp ABAP for this I just followd the link below
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    which for single upload and for making this for multiple upload I need a node could be usefull globally or a IT please check my code below
    DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.
        DATA lo_el_n_upload TYPE REF TO if_wd_context_element.
        DATA ls_n_upload TYPE wd_this->element_n_upload.
        DATA lo_nd_n_file_download TYPE REF TO if_wd_context_node.
        DATA lt_n_file_download TYPE wd_this->elements_n_file_download.
        data ls_file_upload TYPE ZFILE_UPLOAD1.
       ZFILE_UPLOAD_1 = wd_componentcontroller->Elements_ZFILE_UPLOAD_1.
         t_file_upload = ig_componentcontroller->ITAB1.
       t_file_upload = wd_this->zfile_upload1.
       navigate from <CONTEXT> to <N_FILE_DOWNLOAD> via lead selection
         lo_nd_n_file_download = wd_context->get_child_node( name = wd_this->wdctx_n_file_download ).
      navigate from <CONTEXT> to <N_UPLOAD> via lead selection
        lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).
      get element via lead selection
        lo_el_n_upload = lo_nd_n_upload->get_element( ).
      @TODO handle not set lead selection
        IF lo_el_n_upload IS not INITIAL.
      get all declared attributes
        lo_el_n_upload->get_static_attributes(
          IMPORTING
            static_attributes = ls_n_upload ).
    ls_n_upload will contain the File name file type and file contents *
       ls_n_upload-file_size = xstrlen( ls_n_upload-file_content ).
       ls_file_upload-FILE_NAME = ls_n_upload-FILE_NAME.
       ls_file_upload-FILE_TYPE = ls_n_upload-FILE_TYPE.
       ls_file_upload-FILE_SIZE = ls_n_upload-FILE_SIZE.
       ls_file_upload-FILE_CONTENTS = ls_n_upload-FILE_CONTENT.
       append ls_file_upload to t_file_upload.
       clear ls_file_upload.
    lo_nd_n_file_download->bind_table( new_items = t_file_upload set_initial_elements = abap_true ). 
    ENDIF.
    so here I would like use t_file_upload(node or IT ) to use globaly which can keep the previous data and I can add the existing data and in another method I would like to submit the data in t_file_upload to table
    Regards
    raj

    Hi Chandra,
    Resloved, I createa table type in SE11 by giving my table name as a line type and I used that as a Global IT in view "attributes" tab and I made the my code as follows its working now
        DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.
        DATA lo_el_n_upload TYPE REF TO if_wd_context_element.
        DATA ls_n_upload TYPE wd_this->element_n_upload.
        DATA lo_nd_n_file_download TYPE REF TO if_wd_context_node.
        DATA lt_n_file_download TYPE wd_this->elements_n_file_download.
        data ls_file_upload TYPE ZFILE_UPLOAD1.
        data t_file_upload TYPE standard table of ZFILE_UPLOAD1.
       navigate from <CONTEXT> to <N_FILE_DOWNLOAD> via lead selection
         lo_nd_n_file_download = wd_context->get_child_node( name = wd_this->wdctx_n_file_download ).
      navigate from <CONTEXT> to <N_UPLOAD> via lead selection
        lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).
      get element via lead selection
        lo_el_n_upload = lo_nd_n_upload->get_element( ).
      @TODO handle not set lead selection
        IF lo_el_n_upload IS not INITIAL.
      get all declared attributes
        lo_el_n_upload->get_static_attributes(
          IMPORTING
            static_attributes = ls_n_upload ).
    ls_n_upload will contain the File name file type and file contents *
       ls_n_upload-file_size = xstrlen( ls_n_upload-file_content ).
       ls_file_upload-FILE_NAME = ls_n_upload-FILE_NAME.
       ls_file_upload-FILE_TYPE = ls_n_upload-FILE_TYPE.
       ls_file_upload-FILE_SIZE = ls_n_upload-FILE_SIZE.
       ls_file_upload-FILE_CONTENTS = ls_n_upload-FILE_CONTENT.
       append ls_file_upload to ME->wd_this->gt_file_upload .
       clear ls_file_upload.
    lo_nd_n_file_download->bind_table( ME->wd_this->gt_file_upload ).
       endif.
    thanks for the support.
    Regards
    Raj

  • How To... Execute Planning Functions and Sequences from MS Office Ribbon

    Dear all,
    I am working with a SAP how to paper, which is called:
    How To... Execute Planning Functions and Sequences from MS Office Ribbon.
    It is working absolutely fine and I am pretty satisfied, but as you probably know "Control the visibility of a button based on the visibility of a related crosstab: the  button just disappears once the related crosstab is not located on the active sheet."
    This means, when I insert different queries in different crosstabs, only one crosstab will have my own created ribbon. Is it also possible to set another specific ribbon with other buttons for another crosstab? Can I change the macro, included in the appendix of the how to paper, regarding this issue?
    Thanks in advance!
    Kind regards
    Dominik Drebinger

    Hey Martin,
    thanks for your reply, but I solved the problem on my own. Unfortunately my colleague did not see that the crosstabs had to be defined differently.
    Like this:
    Label
    Screentip
    Msolmage name
    Crosstab name
    Copy Initial Aligned
    Copy Initial Aligned
    CacheListData
    SAPCrosstab1
    Copy Initial Aligned 
    Copy Initial Aligned
    CacheListData
    SAPCrosstab3
    Copy Initial Aligned
    Copy Initial Aligned
    CacheListData
    SAPCrosstab5
    The macro, provided by the HowTo, is therefore working perfectly fine.
    Thanks though
    Dominik

  • Calling and executing a function module in the Portal iview development

    Hello Portal development gurus...
        I am very new to portal iview development and am learning a lot of stuff.. I now have a requirement to do the following:
      1. I need to use the NWDS to create java code in developing an iview
      2. I need to call and execute a function module and display the parameters pulled in from the function module onto a Jsp.
    3. I need to create an iview based on this deployed component.
    Could anybody please explain me how to do the coding on this front?
    I appreciate if anybody can share documentation about this kind of a development.
    As always, points galore for useful and helpful suggestions.
    Regards,
    ~~~LB

    Hi,
    Firstly Have you searched in SDN for the same, anyhow please go through the link to work on the requirement
    [/docs/DOC-8061#15|/docs/DOC-8061#15]
    Go through the thread which will talk in detail
    [https://forums.sdn.sap.com/click.jspa?searchID=19551584&messageID=6348955|https://forums.sdn.sap.com/click.jspa?searchID=19551584&messageID=6348955]
    Hope this helps.
    Cheers-
    Pramod

  • How to Create a Remotely Enabled Function Module

    Hi All,
    How to Create a Remotely Enabled Function Module.
    I Want to Create a FM Using Sample Data , This for Practice
    What Fields can i give in the Import and Export Parameters.
    Please Give me one Example
    Can Any one Give me the Steps to do this.
    Regards
    Vamsi

    Hi Vamsi,
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & <b>check the pass value</b> (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & <b>check the pass value</b>
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & <b>check the pass value</b>
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination '<b>XXXXXX</b>'
      exporting
        p_num1 = 10
        p_num2 = 15
      importing
        p_tot = tot.
    write tot.
    please note that <b>XXXXXX</b> is RFC connection which is avialable in <b>sm59</b> transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of <b>XXXXXX</b> in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    Regards,
    Sukhee

  • How to create and drop partitions automatically?

    How to create and drop partitions automatically?
    The environment is Oracle 10g(10.2.0.3) on the RHEL4.0 system.
    I want to partition the MESSAGE table by date (NUMTODSINTERVAL(1,'DAY') ). One partition per day. Because the table is huge, only 2 partitions (today and yesterday's data) are necessary to be kept online. All the partitions that earlier than the previous day will be backed up and then dropped. I want to make the partition creating and dropping jobs run automatically. How to do it?
    Thank you

    junez wrote:
    How to create and drop partitions automatically?
    The environment is Oracle 10g(10.2.0.3) on the RHEL4.0 system.
    I want to partition the MESSAGE table by date (NUMTODSINTERVAL(1,'DAY') ). One partition per day. Because the table is huge, only 2 partitions (today and yesterday's data) are necessary to be kept online. All the partitions that earlier than the previous day will be backed up and then dropped. I want to make the partition creating and dropping jobs run automatically. How to do it?With 11g, new partitions can automatically be created.
    With 10g, you need to do that yourself. I prefer to create a "buffer" of future partitions - in case the job whose task it is to add new partitions gets held up or stuck. Or the job queue is full due to some problem and it does not get the chance to execute in time.
    I dislike your partitioning criteria. I prefer using the date directly and not mangling it to something else. If a specific day has a large volume of data, then another option is to use hourly date ranged partitions. With local partitioned indexes and the date time range used for querying, this can be quite effective performance wise.
    As for partitioning maintenance - I use a custom written partitionManager PL/SQL package that provides an interface for adding daily and hourly partitions to a table. Input parameters are for example name of the table, start date and the number of partitions to add. Similarly it provides interfaces for aging partitions - again by specifying a table and a date-time to use as the starting point, back into time, for removing old partitions.
    I typically call this code from the actual application code itself - so before a new partition will be used for example, the app code will first ensure that it has a partition to use. This is safer than a separate job as the dependency is resolved where and when it is needed - and not done as a separate task.
    For example - you should have a procedure/package that provides an app the means to log a message into your MESSAGE table. As part of an autonomous transaction, this procedure can check if the required partition exists, before attempting to insert a message into the table.
    Where this approach is not possible, a DBMS_JOB can be used to create future partitions - but as I mentioned, rather have it add a bunch of future (empty) partitions in case something goes pear shape with the job mechanism.

  • How to create and deploy a simple jstl applicaton in weblogic 10.3.3

    How to create and deploy a simple jstl applicaton in weblogic 10.3.3

    1) Since JSTL libraries are provided as Web application libraries, they must be deployed before the Web application that is using JSTL functionality is deployed. The libraries can be deployed using the Administration Console or with the command-line weblogic.Deployer tool.
    Here’s an example of deploying a JSTL 1.2 library using the weblogic.Deployer command-line:
    java weblogic.Deployer -adminurl t3://localhost:7001
    -user weblogic -password weblogic
    -deploy -library
    d:/beahome/wlserver_10.3/common/deployable-libraries/jstl-1.2.war
    This command deploys the JSTL 1.2 library using the default library-name, specification-version and implementation-version defined by the MANIFEST.MF in the library.
    After a library is deployed, the extension-name, specification-version and implementation-version of the library can be found in Administration console. This information can also be found in the MANIFEST.MF file of the library WAR file.
    For more information on deploying a Web module refer below URL
    http://docs.oracle.com/cd/E15051_01/wls/docs103/deployment/deployunits.html
    2) To reference a JSF or JSTL library, a standard web application can define a <library-ref> descriptor in the application’s weblogic.xml file. Here is an example:
    <library-ref>
    <library-name>jsf</library-name>
    <specification-version>1.2</specification-version>
    <implementation-version>1.2.0</implementation-version>
    <exact-match>false</exact-match>
    </library-ref>
    For more information on referencing a Web application library refer below URL
    http://docs.oracle.com/cd/E15051_01/wls/docs103/programming/libraries.html
    3) Create a sample JSP in your application and JSP should look as shown below
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>TestJSTL</title>
    </head>
    <body>
    <c:set var="topic" value="JSTL" />     
    <c:out value="${topic}" />
    </body>
    </html>
    4) Create WAR and deploy and test.
    Edited by: Murali Veligeti on Jul 26, 2012 9:00 AM

  • How to create the change document functionality for a dependent objects?

    May I please know how to create the change document functionality for a dependent objects?
    I have done it follow the same process as for business process objects. But when i try to test it in BOBT, there is no records under "FIELD_CHANGE_WITH_FILTER". It seems the change hasn't been recorded.
    If the way I did to create change document for dependent object is correct, please also kindly advise the possibilities for why there is no record during testing.
    thanks in advance.

    I also have some doubts about the business object.In this case,one abstract BO hase a subnode wihich is root extended.I added the change document for this node under the category "root_extended" and then tested the function in BOBT.I got some error message "can't find the root key".Shall i redefine the method /BOFU/IF_CDO_CREATION~IS_CDO_CREATION_ACTIVE so as to solve the problem?
    Thx.

  • How to create an executable

    Hello, I am trying to figure out how to make an executable file from LabVIEW. This is my first time ever creating an executable so I need instructions in basic terms. I tried to do it using the project manager. The file that was created needs LabVIEW Run-Time in order to work.
    Is it even possible to have a LabVIEW program and create an executable that would let any computer without NI products run the appllication?
    Also, I searched for some instructions of how to do this but could not find any useful ones. If anyone can direct me to a post or set of instructions that explain how to create an executable that would be perfect. Thank you!
    Solved!
    Go to Solution.

    Is there any way i can make the RunTime install silently with no user interaction? If I can, how? I have looked at other posts and how NI tell me to do it (http://digital.ni.com/public.nsf/allkb/188FE05BA8933F4486256BC300708527) , but it is way over my head. Is this the right way? or is there a simpler way?
     I do not understand how to compile the installer and executable file together. I can create the executable from the LabVIEW file that I need to run, but I want the RunTime to install automatically before that executable is executed. (If this statement doesnt make sense, tell me. )
    Any feedback would be appreciated.

  • How to compile and execute a Pro*C program on Unix?

    Hello Gurus,
    I am new to Pro*C. I just wrote a sample Pro*C program 'first.pc' to read some information from some tables and print it on screen.
    I am not sure how to compile it and execute it to see the output of my very first program.
    After searching a lot I tried following ..
    -- Step 1 compile the program into .c program
    $->ls -lrt first.pc
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    $->proc first.pc
    Pro*C/C++: Release 8.1.7.0.0 - Production on Sat Oct 31 05:43:35 2009
    (c) Copyright 2000 Oracle Corporation.  All rights reserved.
    System default option values taken from: /oracle/app/oracle/product/8.1.7/precomp/admin/pcscfg.cfg
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    $->
    -- Step 2 Generate the .o file
    $->cc -I${ORACLE_HOME}/precomp/public -c first.c
    first.c: In function 'main':
    first.c:154: warning: return type of 'main' is not 'int'
    $->
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    -rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
    $->
    -- Step 3 After that link the .o to libraries and produce the exe
    $->cc -o exe_name -L $ORACLE_HOME/lib -lclntsh
    ld: 0711-317 ERROR: Undefined symbol: .main
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit status
    $->
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    -rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
    $->After all above still I am not sure how to proceed and 'execute' the program.
    Could you please help me with the steps to 'Compile and execute' a Pro*C program ?
    Oracle DB Version : Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    OS : Unix
    Thanks in advance!

    Hi All,
    After reading Pro*C Question thread I have tried below steps to compile my .C program, but failed with the given errors
    $->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o sample
    ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit statusAfter receiving above error I tried below command as an alternative
    $->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o first -lclntsh -lsql10
    collect2: library libsql10 not foundCould you please help in resolving above error? Whats missing exactly?

  • How to create and delete an Endeca application in Windows

    HI,
    can you please help me in ,
    how to create and delete an Endeca application inWindows machine not in Linux Machine.
    Thanks.....

    Hi,
    Steps to create an Endeca Application are clearly given in Getting Started Guide.
    http://docs.oracle.com/cd/E38680_01/Common.311/pdf/GettingStarted.pdf (Chapter 6 : Deploying a Reference Application)
    If you want to create an endeca application so as to integrate with Product Catalog system such as ATG using ATG 10.1.1 or above , then create an endeca application using the discover-data-catalog-integration reference application. Steps for doing this are documented in ProductCatalogDTGuide
    http://docs.oracle.com/cd/E38679_01/ToolsAndFrameworks.311/pdf/ProductCatalogDTGuide.pdf (Deploying the Product Catalog Application)
    To delete an Endeca Application that you have created in Windows/linux
    1. Navigate to the control directory of the application that you want to remove and execute the script
    runCommand.bat --remove-app (Removes the provisioning information with EAC admin console)
    2. Remove the instance configuration files for the application using the emgr_update command line utility
    emgr_update.bat host localhost:8006 app_name My_app action remove_all_settings prefix My_prefix
    3. You can then explicitly delete the directory in the Endeca_apps directory where you have initially created your application.
    If you are using discover-data-catalog-integration, you can remove the CAS Record Store Instances by navigating to CAS/bin directory and executing
    ./component-manager-cmd.sh delete-component -n {YOUR_APP_RECORD_STORE_NAME}
    Thanks,
    Shabari

  • How to create and sign CAB files info on Supplement Option

    To all Supplement Option subscribers:
    At the supplement option for iDevelopment Accelerators, I uploaded a zip with detailed info on how to create and sign CAB files (necessary when you are running your application on the Native IE Java Virtual Machine).
    Not all functionality provided to you through JInitiator will work (e.g. WebUtil doesn't) but the way how to make and sign a CAB file will become more easy.
    Cheers,
    Marc Vahsen
    Headstart Team

    This defeats the purpose of trying to centralize SAP-related web resources on the SAP server. Typically IIS/Apache or other non-SAP servers are under the control of IT and not the SAP BASIS group.
    We simply would like to have a centralized location to store static web files so that they are not overwritten during Portal support pack applications.

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • Search if a layersets with a specific name exist and execute a function if it is the case

    Hello,
    How can i write a script that search if a layersets with a specific name exist and execute a function if it is the case?
    Some examples?
    Many thanks.
    Regards.
    Sebastien

    This would check for a LayerSet if a name with DOM code – so it’s fairly slow.
    var check = checkForLayersetNamed(app.activeDocument, false, "thisName");
    alert (check);
    ////// function collect all layers //////
    function checkForLayersetNamed (theParent, theCheck, theName) {
    /* if (!allLayers) {var allLayers = new Array}
      else {};*/
      for (var m = theParent.layers.length - 1; m >= 0;m--) {
      var theLayer = theParent.layers[m];
    // apply the function to layersets;
      if (theLayer.typename == "ArtLayer") {
    // allLayers.push(theLayer)
      else {
      if (theLayer.name == theName) {theCheck = true};
      theCheck = (checkForLayersetNamed(theLayer, theCheck, theName))
    // allLayers.push(theLayer);
      return theCheck
    Below is AM code Paul Riggott posted some time ago in connection with linking Layer Masks.
    Re: Automatically re-link layer masks
    You could add a check for whether the Layer is a LayerSet, but if the name is the sole distinguishing feature this might work as a basis for your operations.
    app.bringToFront();
    main();
    function main(){
    if(!documents.length) return;
    linkLayers();
    function linkLayers(){
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
       var Names=[];
    try{
        activeDocument.backgroundLayer;
    var i = 0; }catch(e){ var i = 1; };
       for(i;i<count;i++){
           if(i == 0) continue;
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            if(layerName.match(/^<\/Layer group/) ) continue;
    /* you could insert your operations in an if clause here */

Maybe you are looking for

  • .OTF Fonts Not Loading in Photoshop CS3

    Post harddrive replacement I have been re-installing lost things, including Photoshop CS3 and font packages that I had on my system before.  While the fonts have been successfully installed on my Mac, they are not showing up in Photoshop.  The fonts

  • Custom report layout question...can't find any answers anywhere

    I am trying to build a report in Portal, using the custom report layout. The report displays like so, before I do any customization: COLUMN1 COLUMN2 COLUMN3 COLUMN1 COLUMN2 COLUMN3 COLUMN1 COLUMN2 COLUMN3 COLUMN1 COLUMN2 COLUMN3 where COLUMN1 is the

  • File to DB Character set conversion

    I really can't get my head around the character set encoding/decoding and when I need to convert explictly so I thought I would ask here. I have a situation where a program needs to read in a file and store the information into an Oracle DB specific

  • Why when I try to access icloud on my iphone does it tell me wrong username or password

    I can go to Itunes and log in using the same username and password but icloud still tells me that my username and password are wrong. I have changed my password several times thinking that maybe I have done something wrong and I still get the same me

  • Lost my photoshop disk

    hi my hard drive was erased/ my disk drive is broken. I don't have my photoshop disk or serial numbers anymore but how can i re-install my photoshop without my photoshop disk? i have proof my purchase from 2010 in email format.