Read a script title input parameters

I'm sure it's a matter of javascript adobe newbie, but I watched for a while and do not find the answer. How to read a script file as input parameters? For example, let's say I want to run a script that requires 3 input variables, but instead of asking the values, I would like to read from the file name of the script... for example, Myscript (my_variable1, my_variable2, my_variable2), where the variables are all real numbers. So I guess that the name of the script when it is run should look to...  MyScript (10, 10, 100), but how can I read these and assign these values to a VAN in the script?

Thanks for any help!

That you will get the name of the file, including the path

alert($.fileName);

Tags: Illustrator

Similar Questions

  • How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    I s generic SOAP example/tutorial on my blog: get a serial number in a form using SOAP - KHKonsulting LLC

    The web service uses only a single parameter, but you should be able to adapt the code to two arguments without problems.

  • Duplication of datasets based on input parameters

    I posted this question in the context of the reports of the Oracle, but I think that this is not really a question of relationship Oracle, its more a matter of SQL. I'm on Oracle 9i.

    I need to generate a report based on a maximum of 6 input parameters.
    Three of them belong to the client ID # and 3 belong to the Number of Copies that must be printed on the report.
    Settings on clients: P_CUST_ID1, P_CUST_ID2, P_CUST_ID3
    Parameters for the number of copies: P_N1, P_N2, P_N3

    So, at some point, there could be a maximum of 3 Customer ID passed to the main request. Here is an example of what might look like the input parameters.
    The user has chosen to enter the values for Customer ID 1 and 2 and left blank for 3 client.
    Customer ID1   1001         Number of Copies   2
    Customer ID2   1002         Number of Copies   3
    Customer ID3   ----         Number of Copies   -
    The query that retrieves data looks something like this. The query below is intended to get the client host and addresses of the Office.
    Of course, it is possible that there could be no home or office address or both.
    SELECT    c.cust_no,
              c.saln||c.first_name||' '||c.last_name cust_name,
              a.address_type,
              a.street,
              a.city||' '||a.province||' '||a.postal_code city,
              '('||a.tel_area||') '||a.tel_number telephone
    FROM      customer c, customer_address a
    WHERE     c.cust_no = a.cust_no
    AND       c.cust_no IN (:P_CUST_ID1, :P_CUST_ID2, :P_CUST_ID3);
    Based on my query:
    Customer ID 1001 has 3 addresses (House 2 and 1 office)-> the Total number of records = 3
    Customer ID 1002 a 2 addresses (1 House and 1 office)-> the Total number of records = 2

    The output should be something like that. I put a copy1 copy2, Copy3 label to show
    How the data will appear for readability.
    Cust No Customer Name      Address Type    Address Line 1         Address Line 2        Telephone
    -----------------------------------------------------------------------------------------------------
    Copy1
    1001    Mr Robert Green    H               2100 Picket Fences     Vancouver BC V6E 2C9 (604)726-5555
    1001    Mr Robert Green    H               2300 Happy Valley      Vancouver BC V6G 2N8 (604)308-5555
    1001    Mr Robert Green    O               1200 Davie Street      Vancouver BC V1V 1X1 (604)211-5555
    Copy2
    1001    Mr Robert Green    H               2100 Picket Fences     Vancouver BC V6E 2C9 (604)726-5555
    1001    Mr Robert Green    H               2300 Happy Valley      Vancouver BC V6G 2N8 (604)308-5555
    1001    Mr Robert Green    O               1200 Davie Street      Vancouver BC V1V 1X1 (604)211-5555
     
    Copy1
    1002    Ms Cynthia Brown   H               261 King Street W      Calgary AB M5A 1N1   (416)432-5555
    1002    Ms Cynthia Brown   O               150 Bloor St W         Calgary AB M1W 1S3   (416)321-5555
    Copy2
    1002    Ms Cynthia Brown   H               261 King Street W      Calgary AB M5A 1N1   (416)432-5555
    1002    Ms Cynthia Brown   O               150 Bloor St W         Calgary AB M1W 1S3   (416)321-5555
    Copy3
    1002    Ms Cynthia Brown   H               261 King Street W      Calgary AB M5A 1N1   (416)432-5555
    1002    Ms Cynthia Brown   O               150 Bloor St W         Calgary AB M1W 1S3   (416)321-5555
    Scripts for creating the table and INSERTs
    CREATE TABLE CUSTOMER
      (
        "CUST_NO"    VARCHAR2(4 BYTE) NOT NULL,
        "SALN"       VARCHAR2(4 BYTE),
        "FIRST_NAME" VARCHAR2(20 BYTE),
        "LAST_NAME"  VARCHAR2(20 BYTE),
        CONSTRAINT "CUSTOMER_PK" PRIMARY KEY ("CUST_NO")
      );
     
    Insert into CUSTOMER values ('1001','Mr','Robert','Green');
    Insert into CUSTOMER values ('1002','Ms','Cynthia','Brown');
    Insert into CUSTOMER values ('1003','Dr','David','Taylor');
     
    CREATE TABLE CUSTOMER_ADDRESS
      (
        "CUST_NO"      VARCHAR2(4 BYTE) NOT NULL ENABLE,
        "ADDRESS_TYPE" VARCHAR2(1 BYTE) NOT NULL ENABLE,
        "STREET"       VARCHAR2(20 BYTE),
        "CITY"         VARCHAR2(20 BYTE),
        "PROVINCE"     VARCHAR2(2 BYTE),
        "POSTAL_CODE"  VARCHAR2(10 BYTE),
        "TEL_AREA"     VARCHAR2(3 BYTE),
        "TEL_NUMBER"   VARCHAR2(10 BYTE)
      );
     
    Insert into CUSTOMER_ADDRESS values ('1001','H','2100 Picket Fences','Vancouver','BC','V6E 2C9','604','726-5555');
    Insert into CUSTOMER_ADDRESS values ('1001','H','2300 Happy Valley','Vancouver','BC','V6G 2N8','604','308-5555');
    Insert into CUSTOMER_ADDRESS values ('1001','O','1200 Davie Street','Vancouver','BC','V1V 1X1','604','211-5555');
    Insert into CUSTOMER_ADDRESS values ('1002','H','261 King Street W','Calgary','AB','M5A 1N1','416','432-5555');
    Insert into CUSTOMER_ADDRESS values ('1002','O','150 Bloor St W','Calgary','AB','M1W 1S3','416','321-5555');
    Insert into CUSTOMER_ADDRESS values ('1003','O','435 Richmond Street','Calgary','AB','M5A 4T6','416','453-5555');
    Any help or pointers in this regard would be great.
    I could have adopted a procedure for use of temporary tables , but I really prefer not to go in that direction that there could a few reports which must be generated in this way.

    Thanks and a great weekend.

    Hello

    Roxyrollers wrote:
    I tried to replace the Clause WITH with views online, but have hit a wall. Of course, it is said Table or view does not exist because it cannot find the report_parameters table. Also, I realize that I can't really get the view online at the same level.

    No, report_parameters is used in two places in the solution I posted Saturday. You could code 2 copies of the report_parameters (one inside the cntr, the other to join it), but it should really be. CNTR can rely on two instead, like this:

    SELECT    c.cust_no,
              c.saln ||c.first_name||' '||c.last_name cust_name,
              a.address_type,
              a.street,
              a.city||' '||a.province||' '||a.postal_code city,
              '('||a.tel_area||') '||a.tel_number telephone
    ,       t.n                -- If wanted
    FROM      customer           c
    ,        customer_address   a
    ,       (               -- Begin in-line view report_parameters
                SELECT  :p_cust_no_1 AS cust_no, :p_no_copies_1 AS no_copies  FROM dual  UNION ALL
              SELECT  :p_cust_no_2 AS cust_no, :p_no_copies_2 AS no_copies  FROM dual  UNION ALL
              SELECT  :p_cust_no_3 AS cust_no, :p_no_copies_3 AS no_copies  FROM dual
           )  p               -- End in-line view report_parameters
    ,       (               -- Begin in-linve view cntr
                 SELECT     LEVEL     AS n
                 FROM     dual
                 CONNECT BY     LEVEL     <= GREATEST (:p_no_copies_1, :p_no_copies_2, :p_no_copies_3)
           ) t                    -- End in-line view cntr
    WHERE     c.cust_no           = a.cust_no
    AND       c.cust_no           = p.cust_no
    AND       p.no_copies          >= t.n
    ORDER BY  c.cust_no
    ,       t.n
    ,            a.address_type
    ;
    

    Ensure that: p_no_copies_1,: p_no_copies_2 and: p_no_copies_3 are not NULL; otherwise, GREATEST return the NULL value. Check the settings, you do need lower or equal to 0, or use NVL inside the GREATER expression.

  • Read the script settings in a filter

    Hello

    I have a Plug In which can read the script parameters and execute accordignly.

    Examples of code in the SDK is called 'PoorMansTypeTool '.
    In its documentation, it is said to be able to "read the script parameters.

    I look at his code and yet I could not understand how it does.

    Let's say I have a script with a variable "a".
    The script launches a filter in the filter list and want to spend the worth of the parameter 'a' and the filter.

    How this might be done?

    There are constraints on the type parameter, size, etc?

    Someone has already tried before?

    If someone could guide me through the plug in the code, I would be happy.

    Thank you.

    This make a function so we can hide these harness script

    main();

    main() {} function

    Save current preferences

    var startRulerUnits = preferences.rulerUnits;

    var startTypeUnits = preferences.typeUnits;

    var startDisplayDialogs = displayDialogs;

    Define Photoshop use pixels and display without dialog boxes

    preferences.rulerUnits = Units.PIXELS;

    preferences.typeUnits = TypeUnits.PIXELS;

    displayDialogs = DialogModes.NO;

    do this kind of things controlled by the harness

    maxTime var = 1 * 60;

    var iterations = 5;

    var percIncrease = 20;

    var timeIt = new Timer();

    tests of var = 0;

    Mistakes of var = 0;

    eArray var = new Array();

    var dissolveLog = new File ("~ / Desktop/Dissolve.log");

    dissolveLog.open ('w', 'TEXT', '? ');

    dissolveLog.writeln ('width, \theight, \tdepth, \tpercent, \tdoc create time, \tdissolve time');

    maxWidth var = 30000;

    var minWidth = 256;

    var incWidth = parseInt ((maxWidth-minWidth) / iterations);

    If (incWidth == 0)

    incWidth = 1;

    var maxHeight = 30000;

    minHeight var = 256;

    var incHeight = parseInt ((maxHeight-minHeight) / iterations);

    If (incHeight == 0)

    incHeight = 1;

    Start cleaning

    so that {(documents.length)

    activeDocument.close (SaveOptions.DONOTSAVECHANGES);

    }

    var d = BitsPerChannelType.EIGHT;

    for (var w = minWidth; w)< maxwidth;="" w="" +="incWidth" )="">

    for (var h = minHeight; h)< maxheight;="" h="" +="incHeight" )="">

    try {}

    var Timeimport = new Timer();

    If (d is BitsPerChannelType.EIGHT)

    d = BitsPerChannelType.SIXTEEN;

    on the other

    d = BitsPerChannelType.EIGHT;

    App.Documents.Add (UnitValue (w, "px"), UnitValue(h,"px"), undefined, "Dissolve Test", undefined, undefined, undefined, d);

    timeImport.stop ();

    If (activeDocument.width! = o)

    error ++; Alert (activeDocument.width + "," + w);

    If (activeDocument.height! = h)

    error ++; Alert (activeDocument.height + ', ' + h);

    If (d == 16 & activeDocument.bitsPerChannel! = BitsPerChannelType.SIXTEEN)

    error ++; Alert (activeDocument.bitsPerChannel + ', ' + d);

    If (d == 8 & activeDocument.bitsPerChannel! = BitsPerChannelType.EIGHT)

    error ++; Alert (activeDocument.bitsPerChannel + ', ' + d);

    If (activeDocument.bitsPerChannel is BitsPerChannelType.ONE)

    error ++; Alert (activeDocument.bitsPerChannel + ', ' + d);

    FitOnScreen(); What makes everything very slow

    var historyState = activeDocument.activeHistoryState;

    for (var dPerc = 0; dPerc<= 100;="" dperc="" +="percIncrease" )="">

    tests ++;

    var timeDissolve = new Timer();

    Dissolve (dPerc);

    timeDissolve.stop ();

    WaitForRedraw(); Guess what this does to our slow er ness

    dissolveLog.write (w + "\t" + h + "\t" + d + "," + dPerc);

    dissolveLog.writeln (", \t" + timeImport.getTime () + "," + timeDissolve.getTime ());

    WaitForRedraw();

    activeDocument.activeHistoryState = historyState;

    If (timeIt.getElapsed () > maxTime) {}

    w = maxWidth + 1;

    h = maxHeight + 1;

    dPerc = 101;

    }

    }

    }

    {catch (e)}

    alert (e + ":" + e.line);

    If (e.message.search(/cancel/i)! = - 1) {}

    w = maxWidth + 1;

    h = maxHeight + 1;

    }

    eArray [eArray.length] = e;

    Errors ++;

    debugger;

    } / / end of capture

    } / / end of height

    } / / end of width

    dissolveLog.writeln (errors "mistakes." + test + ' tests in "+ timeIt.getElapsed () +"seconds."+ tests / timeIt.getElapsed () +" test/s.");

    dissolveLog.close ();

    dissolveLog.execute ();

    end clean

    so that {(documents.length)

    activeDocument.close (SaveOptions.DONOTSAVECHANGES);

    }

    Reset the application preferences

    preferences.rulerUnits = startRulerUnits;

    preferences.typeUnits = startTypeUnits;

    displayDialogs = startDisplayDialogs;

    (1) "FAILURE" for failures

    (2) "PASS" for the results of the test OK

    (3) "BUG" for known bugs, are the file name give the bug number "

    (4) ' ERROR', it comes from the beam so the script barfed/exception,

    return errors == 0? 'PASS': 'FAIL ';

    } / / end of main function

    //////////////////////////////////////////////////////////////////////////////

    //////////////////////////////////////////////////////////////////////////////

    //////////////////////////////////////////////////////////////////////////////

    //////////////////////////////////////////////////////////////////////////////

    //////////////////////////////////////////////////////////////////////////////

    /****************************

    Function WaitForRedraw

    Use: Use it to force Photoshop to redraw the screen before continuing

    Example:

    WaitForRedraw();

    ****************************/

    function WaitForRedraw() {}

    var keyID = charIDToTypeID ("Stte");

    var / / desc = new ActionDescriptor();

    desc.putEnumerated (keyID, keyID, charIDToTypeID ("RdCm'));

    executeAction (charIDToTypeID ('Wait'), desc, DialogModes.NO);

    }

    //////////////////////////////////////////////////////////////////////////////

    WaitNSeconds, slow down the script you can watch and understand the issues

    //////////////////////////////////////////////////////////////////////////////

    function WaitNSeconds (seconds) {}

    startDate = new Date();

    endDate = new Date();

    While ((endDate.getTime () - startDate.getTime (())< (1000="" *="">

    endDate = new Date();

    }

    //////////////////////////////////////////////////////////////////////////////

    FitOnScreen, fits the document and redraws the screen

    //////////////////////////////////////////////////////////////////////////////

    function FitOnScreen() {}

    var id45 = charIDToTypeID ("TPCV");

    var desc7 = new ActionDescriptor();

    id46 var = charIDToTypeID ("null");

    var ref1 = new ActionReference();

    var id47 = charIDToTypeID ("min");

    var id48 = charIDToTypeID ("MnIt");

    var id49 = charIDToTypeID ("FtOn");

    Ref1.putEnumerated (id47, id48, id49);

    desc7.putReference (id46, ref1);

    executeAction (id45, desc7, DialogModes.NO);

    }

    //////////////////////////////////////////////////////////////////////////////

    Dissolve, in view of a percentage

    //////////////////////////////////////////////////////////////////////////////

    function {dissolve (dPercent)

    var id18 = stringIDToTypeID ("d9543b0c-3c91-11d4-97bc-00b0d0204936");

    var desc3 = new ActionDescriptor();

    id19 var = charIDToTypeID ("WTSA");

    id20 var = charIDToTypeID ("#Prc");

    Desc3.putUnitDouble (id19, id20, dPercent);

    id21 var = charIDToTypeID ('disP');

    id22 var = charIDToTypeID ("mooD");

    var id23 = charIDToTypeID ("moD1");

    Desc3.putEnumerated (id21, id22, id23);

    executeAction (id18, desc3, DialogModes.NO);

    }

    //////////////////////////////////////////////////////////////////////////////

    Was DissolveOld, our old script params

    an interesting test would be to see the old plugin vs the current

    //////////////////////////////////////////////////////////////////////////////

    function DissolveOld (dPercent) {}

    id12 var = charIDToTypeID ("disS");

    var desc3 = new ActionDescriptor();

    id13 var = charIDToTypeID ("WTSA");

    var id14 = charIDToTypeID ("#Prc");

    Desc3.putUnitDouble (id13, id14, dPercent);

    id15 var = charIDToTypeID ('disP');

    id16 var = charIDToTypeID ("mooD");

    var id17 = charIDToTypeID ("moD1");

    Desc3.putEnumerated (id15, id16, id17);

    executeAction (id12, desc3, DialogModes.NO);

    }

    //////////////////////////////////////////////////////////////////////////////

    Library for the things of JavaScript calendar

    //////////////////////////////////////////////////////////////////////////////

    function {Timer()

    Member variables

    this.startTime = new Date();

    this.endTime = new Date();

    member functions

    reset the start time to now

    This.Start = function () {this.startTime = new Date() ;}

    reset the end time for the time being

    This.Stop = function () {this.endTime = new Date() ;}

    make the difference in milliseconds between start and stop

    this.getTime = function () {return (this.endTime.getTime () - this.startTime.getTime (()) / 1000 ;}}

    get the current elapsed time now, this command sets the end time

    this.getElapsed = function () {this.endTime = new Date(); return this.getTime () ;}

    }

    end Dissolve.jsx

  • read the multiple analog inputs at the same time

    Hi all

    I use USB-6001 and want to develop an application to multiple tasks in C++. I try to read several analog inputs at the same time, but got some errors. To put it simply, I copy one of the sample code to read in analog data in a channel, and then turn it into function. Then I call this function to thread with the names of different poles (for example Dev1/ai0, Dev1/ai1) and I come across this error:

    "The specified source is reserved. The operation can not be specified such complete"code of State-50103

    I have search the forums, this may be because I use the hardware timing in this function, and this material timing cannot be used simultaneously by multiple tasks. I may have to put all the lines, I want to read in a single task (such as Dev1 / ai0:1). This way I can read two lines at the same time. However, when I try this, I encounter another error:

    Status code "buffer is too small to contain the data read" - 200299

    So here is my question, what should I do if I don't want to read the multiple analog inputs at the same time? Is the thing that hard time cannot be used by several true task? If I have to read several lines to a single task, how to set the settings?


  • reading of the analog inputs with RPC

    Hello

    Because LabVIEW can not handle this (in VI; the value that you have saved the excel file has not been the same, that I saw during the measurement...) This confused me for a long time ), I want to write a C++ program (IDE: Dev - C++) which can read & record 2 analog inputs of the NI USB-6009 box. For this, I looked for an example of National Instruments and I found a little. But my problem is that I can't even use any example, because it has always held a mistake, after that I have compiled and started.

    The error once the task has been created and has the :-200220 error number with the description "device identifier is invalid. But I do think that its invalid, because it's the xP example

    I must say that I am new in programming C++, which means I could have a rookie mistake. And I couldn't find documentation or something for the NOR-DAQmx library.

    Someone has similar problems with DAQmx and C++ and know how to fix? I don't really know what I can do now without a working example or documentations...

    Hi Mario

    It's the same thing. You didn't just save all of the data:

    Please take a look at my comments in the attached VI.

    Christian

  • How to open an attachment document otd? He always goes to note pad and I can't read the script?

    How to open an otd attachment in my email address? Currently, he attends the notebook and I can, t read the script. Thanks for your suggestions.

    How to open an otd attachment in my email address? Currently, he attends the notebook and I can, t read the script. Thanks for your suggestions.

    I suspect that you really like ODT file extension.  These are created in Open Office.  Download and install Open Office (it's free) or ask your correspondent to save files in a format compatible with any office application you are using (for example, Microsoft Word).  See this thread: http://help.lockergnome.com/office/open-openoffice-odt-file-Word-2003--ftopict929318.html

    Or visit http://odt-converter.com/

  • Input parameters can be set dynamically?

    Is there a way to fill the UI dynamically entry? Suppose we have a list of fields to which we get input parameters and this list came out a REST command in xml format, can we build a user interface based on that?

    (If not, may we have input parameters that are hidden by default but are made visible from the fields in the xml file)

    Example: In the xml below output, the input field should take a number with the description for the entry in the "number of volumes.

    < field >
    < label > Number of Volumes < / label >
    < name > numberOfVolumes < / name >
    < type > number < / type >
    < initial_value > 1 < / initial_value >
    < lockable > fake < / lockable >
    < min > 1 < / min >
    < omitNone > fake < / omitNone >
    < required > true < / mandatory >
    < select > un < / select >
    < / field >

    'Content' is appropriate, in this case, since it is a POST operation (POST / PUT usually has a body of the request). Check the value of the property 'See the parameter entry' group "Content Input" display in the presentation tab.

    Different parameters (name, size, number, etc.) are not displayed in the interface user because in your case, they are part of the body of the request and the presentation logic in workflow "Call operation REST with dynamic params" only scans the URL parameters, not the body of the URL. In your case, if your REST API was POST/block/volumes / {name} / {size} the current logic could find name and size of the parameters in the URL. Check the "Show parameter input" values and properties "Data binding" parameters of workflow in display group "Input parameters" in the presentation tab.

    So you can extend this workflow, or implement your own version of the workflow, which can retrieve information about parameters not only of URL parameters, but also the body of the request by analyzing the body of the request as XML/JSON document and extract the names of the tags.

    As to what 'Generate new workflow of the operation REMAINS' do-, it generates a workflow that wraps the invocation of an operation given rest. In some cases, it is convenient; for example. you won't need to select REST operation to call every time. Also, you can change the specific workflow (for example. Add logging more, add additional processing, etc.).

  • How to get the value of the predefined list of input parameters of a workflow of another workflow of operation REMAINS (element JSON) output. The pointers or the exisitng resource/code will be of great help

    I have a workflow in which one of the input parameters is a predefined list of element. The predefined list of items must come from another workflow of operation REMAINS to GET type (element JSON) output.

    You just wrap it in an action that has an output which is an array of the same type as input.  Instead of using the plugin of rest, you might be able to use the scriptable Url to take the exit that would work according to the rest interface with which you interact.  Something like this:

    var restOperation = 'yourrestservice.com/resoperation/... '. ' / / whatever your full url is if it requires no authentication

    var myUrl = new URL (restOperation); Create the object URL

    var result = myUrl.getContent (); get the content

    var jsonParsed = JSON.parse (result); assuming that the result is a string that must be converted to an

    treatment jsonParsed and return an array of the appropriate type

    return (myPreDefinedList);

  • Free hypervisor: reading / / v5 script writing?

    Hello comrades vUsers.

    A few days ago, that a customer pointed out that with the ESXi 5 licensed as free hypervisor, with the help of PowerCLI, they could script whatever they want, including write operations. (Creating, destroying computers, power-on/power-off). I could check this in a test environment.

    So far, I have nothing on this subject in the pages of literature, or at all, so it is impossible for me to check if is mistakenly or intentionally.

    Is someone can enlighten us as to what is happening? Is reading / writing-scripting is going to stay? Is it established anywhere?

    Thank you

    -Alex

    Thank you, we are aware of this problem and it will be corrected in a future version

  • Date range per week based on input parameters

    Afternoon people - I need to produce a report that will appear in coming weeks.

    There are two input parameters: P_FROM_DATE and P_TO_DATE

    I need to find the beaches of dates in weeks starting THURSDAY and ending WEDNESDAY. For example, if my P_FROM_DATE is August 1, 2012 and P_TO_DATE 11-SEP-2012, I need to show the weeks following this way:
    02-AUG-2012 - 08-AUG-2012
    09-AUG-2012 - 15-AUG-2012
    16-AUG-2012 - 22-AUG-2012
    23-AUG-2012 - 29-AUG-2012
    30-AUG-2012 - 05-SEP-2012
    06-SEP-2012 - 12-SEP-2012
    So, the idea is to begin the first THURSDAY after the P_FROM_DATE and at the end the Wednesday preceding the P_END_DATE...

    Thank you!

    Hello

    Here's one way:

    WITH     params          AS
    (
         SELECT  DATE '2012-08-01'     AS p_from_date
         ,     DATE '2012-09-19'     AS p_to_date
         FROM     dual
    )
    ,     end_points     AS
    (
         SELECT     TRUNC ( p_from_date + 4
                    , 'IW'
                    ) + 3          AS first_thursday
         ,     TRUNC ( p_to_date + 4
                    , 'IW'
                    ) - 5          AS last_wednesday
         FROM    params
    )
    SELECT     first_thursday + (7 * (LEVEL - 1))     AS week_start_date
    ,     first_thursday + (7 * LEVEL) - 1     AS week_end_date
    FROM     end_points
    CONNECT BY     LEVEL     <= ( last_wednesday
                      + 1
                      - first_thursday
                      ) / 7
    ;
    

    TRUNC (dt) is the beginning of the ISO week containing DATE dt.
    The 'magic number' 4 is used because the ISO week starts on Monday, 4 days later your week begins, so

    TRUNC ( dt + 4
          , 'IW'
          )
    

    is set for Monday in the same week from Thursday to Wednesday as dt.

  • Run javascript with a taskflow input parameters

    With the help of PS4 11 g JDev

    I have a taskflow using javascript. When the taskflow was loaded, I need to execute a javascript function that uses my taskflow 2 input parameters.
    I don't really know how I can run javascript with my input parameters.

    A test, I added a commandButton control in my taskflow who will do the job:
    <af:commandButton id="btnRefresh" text="Open">
                <af:clientAttribute name="long" value="#{pageFlowScope.pLong}"/> 
                <af:clientAttribute name="lat" value="#{pageFlowScope.pLat}"/> 
                <af:clientListener method="doNavigate" type="click"/> 
            </af:commandButton>
    How can I do the same thing when the taskflow charge instead of having to press the button.

    Please find attached examples based on your use cases:
    http://adfsampleapplications.googlecode.com/svn/trunk/JavascriptOnLoadSample.rar

    She calls a javascript function when loading pagefragment passing the input parameters of the taskflow.

    Thank you
    Nini

  • a program with input parameters

    Hi all

    I need assistance with my Planner. Can U help me?

    My stored procedure has two input parameters of type date.
    For example
    create package my_pck is
    Start
    Create procedure my_proc (begin_dt date, end_dt date) is
    Start
    null;
    end;
    end;

    now I tried to do a job with a program and a schedule like this:

    () DBMS_SCHEDULER.create_program
    program name = > "STORED_PROCEDURE_PROG"
    program_type = > 'procedure_stockee ',.
    program_action = > 'my_pck.my_proc ',.
    number_of_arguments = > 2,
    activated = > FALSE,
    Comments = > ' om program kwartaaloverzichten you h en die you Mélisande mbv een PL/SQL block. ");

    () dbms_scheduler.define_program_argument
    program name = > "STORED_PROCEDURE_PROG"
    argument_position = > 1,
    argument_type = > 'DATE');

    () dbms_scheduler.define_program_argument
    program name = > "PROCEDURE_PROG"
    argument_position = > 2,
    argument_type = > 'DATE');

    dbms_scheduler. Enable(STORED_PROCEDURE_PROG');

    () DBMS_SCHEDULER.create_schedule
    schedule_name = > "MAAND_KWARTAAL_SCHEDULE"
    repeat_interval = > ' FREQ = YEAR; BYMONTH = 1, 4, 7, 10; ") ;

    () DBMS_SCHEDULER.create_job
    job_name = > 'my_JOB. "
    program name = > "my_pck.my_proc"
    schedule_name = > "MAAND_KWARTAAL_SCHEDULE"
    activated = > FALSE,
    Comments = > ' om kwartaaloverzichten job you h en die you melisande. ');

    dbms_scheduler.set_job_argument_value ('my_pck.my_proc', 1, "trunc (add_months (sysdate,-4), 'MM')");

    dbms_scheduler.set_job_argument_value ('my_pck.my_proc', 2, ' trunc(sysdate, 'MM')-1' ");

    dbms_scheduler. Enable ('my_pck.my_proc');

    Then, I get this error:
    PLS-00103: encountered the symbol "MM" when expecting one of the following values:...

    When I tried this: "trunc (add_months (sysdate,-4), 'MM')"

    I get this error:
    PLS-00103: encountered the symbol "TRUNCATES" when expecting one of the following values:...

    I can't do it.

    My specs:
    OS: windows xp
    Database: Oracle 10 G XE

    The error has nothing to do with the Oracle Scheduler. This is how you should cite the quoted strings:

    SQL> SELECT 'trunc(add_months(sysdate, -4), ''MM'')' FROM DUAL;
    'TRUNC(ADD_MONTHS(SYSDATE,-4),''MM''
    ------------------------------------
    trunc(add_months(sysdate, -4), 'MM')
    
  • Oracle Workflow and mapping of input parameters

    Hi all
    I am trying to create a process in OWB stream which will be able to pass input parameters in each of my correspondence layouts. Each map contains 2 entries, a start time and an end time.
    OWB process flow allows it to do this or is there another approach that I take in creating a workflow for these mappings?

    I am currently using 11gR 2 (11.2.0.1) and UAS v. 2.6.4.

    Thanks in advanced for any help.

    Randy

    Hi Randy,

    Open the workflow process Editor. In the window (menu view-> structure) structure, select the mapping activity and expand it to view its settings. If you select a setting, you can set its value or link to a variable in the Properties window.

    In the structure window, you can also add parameters of process flow to the start activity or to define variables of process flow.

    Kind regards
    Carsten.

  • problem with pipe separated from the input parameters to call

    Hi all

    I have a requirment as...

    I have a Sp 10 which have 3 SETTINGS and 3 settings as shown below...


    PROCEDURE sample_sp1 (p_start_dt IN VARCHAR2,
    p_end_dt IN VARCHAR2,
    p_shift IN varchar2,
    p_out1 OUT t_bpd_nm, - array type
    p_out2 OUT t_target, - array type
    p_out3 to t_drr); -type of array



    PROCEDURE sample_sp2 (p_start_dt IN VARCHAR2,
    p_end_dt IN VARCHAR2,
    p_shift IN varchar2,
    p_out1 OUT t_bpd_nm, - array type
    p_out2 OUT t_target, - array type
    p_out3 to t_drr); -type of array



    .........


    ..........


    PROCEDURE sample_sp10 (p_start_dt IN VARCHAR2,
    p_end_dt IN VARCHAR2,
    p_shift IN varchar2,
    p_out1 OUT t_bpd_nm, - array type
    p_out2 OUT t_target, - array type
    p_out3 to t_drr); -type of array






    Now, I have to create a new SP. This SP, I have to call one of the top 10 SP and have to come back as a REF CURSOR.


    the entries to the new MS are 3 as... (shown below).


    create or replace new_sp (p_report_name IN varchar2,
    p_report_inputs IN varchar2,
    p_report_as_ref to ref_cur_type) is


    ..............

    where p_report_name is a name of sp
    p_report_inputs is the input to SP parameters with "|" separated pipes (ex: ' 23/04/2010 | 20/05/2010 | 2 ')
    p_report_as_ref is setting to return as an OUT refcursor.


    I'm unable to manage the setting shild (with tickets). How to separate input parameters and how can I call existing SP
    with these settings?


    friends... can someone help me please...


    Thanks in advance...

    What of it?

    with t as
    (select replace('500 Oracle Parkway| Redwood Shores| CA','|',',') str from dual)
    SELECT
      replace(REGEXP_SUBSTR(str,'[^,]+,'),',') first,
      replace(REGEXP_SUBSTR(str,',[^,]+',1,1),',') second,
      replace(REGEXP_SUBSTR(str,',[^,]+',1,2),',') third
      FROM t;
    
    ----
    500 Oracle Parkway      Redwood Shores      CA
    

Maybe you are looking for

  • iPhone 5 still rings for number of blocked list

    I blocked several numbers of known telemarketers, for example (213) 266-7280 called me last Wednesday and I immediately went to the entry in the recent, tapped info, operated calling this block. The number is displayed as the last entry when I go int

  • Hi I don't remember security questions

    Hi I don't remember security questions for apple ID. and when I want to sign onther mail is reserved and change my 300 DPI question answering security question. means, I need help I can't hold my securety question and I can't change it. Help, please

  • Satellite L855 does not start after the BIOS update

    I downloaded the BIOS update and followed the instructions there during the installation, but on reboot (including the requested configuration), I get a blank screen. Intermittently, the CPU fan starts and stops. I think that the BIOS update failed,

  • HP 10 g2: help with sd card reader

    I just got this new tablet. And I'm just using, Samsung galaxy tab 3 at hp 10 g2. But I have a problem with the sd card. I want to insert a 32 GB. And I don't really know how to open the sd card reader, so I can insert the sd card.

  • Windows Vista crashes when updates are being installed

    Regularly, I keep my windows vista up-to-date. However, recently the windows vista displays update 5 new installs is required to close to 400 MB in total. the windows update starts about 5 minutes after the connection automatically, and will reach ab