Script processor

Hello

I am trying to use the Script Processor to measure the length of an input string and return a string output of the "S" or "N". No matter how long the input string, output 1 is always "N". Any advice?

If {(input1.length > 4)

Output 1 = "S";

} else {}

Output 1 = "N";

}

Hello

The script processor can have any number of attributes associated with the input1 variable so they are represented in table form.

Use .length input1 [0] instead.

Richard

Tags: Fusion Middleware

Similar Questions

  • What is the format of javascript in the SCRIPT processor?

    Dear,

    I'm trying to divide the amounts of the two columns by using the script processor (because the divide processor is able to divide by a number 1,2,3,...).

    I tried below scripts and many variations, but it does not work.

    Could someone please help?

    I chose two attributes of the available attributes (the columns are called NewNumber.2, NewNumber.1).

    In the options tab of the, I wrote this script, with the result type digital.

    The output attribute column is called result.

    var x = "NewNumber.1";

    var y = "NewNumber.2";

    var z = 'result '.

    z = x / y;

    Thank you!!

    Just use an expression with the processor of the Expression, for example

    @ "Attribute 1"/@"Attribute 2.

  • Function in the Trim script processor

    Hi Mike/Nick,

    I am using simple function trim() JS Script Processor. It does not work. What are the functions String and Array supported in the Script Processor?

    Thanks in advance,

    Konate

    Hi konate,.

    Disqualification uses the Rhino engine to support JavaScript [ECMAScript]:

    https://developer.Mozilla.org/en-us/docs/Mozilla/projects/rhino

    I think that the embedded version of Rhino supports 3 of the ECMAScript standard edition:

    http://www.ECMA-International.org/publications/files/ECMA-St-arch/ECMA-262, %203rd%20edition,%20December%201999.pdf

    Kind regards

    Nick

  • How to use between operator in Disqualification without using the script processor?

    Hello Experts,

    How to use between operator in Disqualification? for example phonenumberLength between 7 and 10. I don't want to use the script processor? Also how to reproduce the SWITCH statement Disqualification CASE?

    Thank you

    Konate

    1 Add a processor 'check the length.

    2. connect the transformer and open the configuration dialog box

    3. in the tab 'Attributes' select your attribute of telephone number as the "field Check.

    4. in the tab "Options", enter "7-15"in the option 'number of valid characters.

    5. run the process.

    a. accounts with [included] a character length 7-15 phone numbers out of the release of "valid".

    b. records with a length of character <7 or="">15 phone numbers out of the release of "Invalid character count.

    Note: the processor also adds a 'LengthValid' flag attribute which you may also branch on [with the values "Y" and "NC" for both scenarios above]. See Library of processor of the online help for more information.

    Thank you

    Nick

  • Can't find script engine "VBScript" for...

    I have a lot of files in VB Script I execute to do various things on my computer.  Yesterday, I started getting an error popup with the text displayed in the title of this post.  The additional information was the actual path/file that I was trying to run.  It's also manifests itself in my event viewer I'm unable to receive "online help" because of the same error pop up.

    What became of my script processor?  I can find "wscript.exe" in my system32 directory, and it seems to work because I can bring up the host settings dialog box, but this is as far as I can go.  Any idea on how to re-enable this feature?

    Bill

    The entry is:

    [HKEY_CLASSES_ROOT\CLSID\ {B54F3741-5B07-11cf-A4B0-00AA004A55E8} \InprocServer32]
    @= "C:\\Program Files\\Alwil Software\\Avast5\\AhAScr.dll"

    The registry key should point to the following:

    C:\Windows\system32\vbscript.dll

    See the post ninth in the following thread:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/cant-find-script-engine-VBScript-for-script/960f24d1-BF92-4CEC-b73e-520a04891073?page=1

    To change the value data, you may need to change the permissions on the key.

  • Problem with "Scripts" to convert the NEF to JPG

    Hello

    I'm trying to batch naves convert to jpg using file > Scripts > processor of images, what I did before, but when I click on select file to select files NAVE of the memory card, Photoshop does not recognize the NEF files.

    Photoshop is grateful the NEF files in the case opposite and if I click on "Save as" and save it as a JPG file, it works, but it's a lot of work to save more than 500 images...

    Any suggestions?

    Thank you!

    There are also some problems with photo, download maps of the camera. I would like to move the files to your computer to convert their use you BONES to move them.

  • How to use the script to display the number of columns contain no data

    I have a requirement. There is a source that is the excel, the excel file file, we need to load data into the staging table. There are 5 columns mandatory ones must not be null. We used "No. Data Check" for this. The logic is so mentioned previously mentioned 5 columns don't contain any record that the record will be moved to without data. So far, it is fine. Now the requirement is to show what column or columns contain no data. We used a script to do this like:

    RES =' '

    RES = input1 [0] + ": failed because values null in required columns;"

    INPUT1 [1] = res;

    Output 1 = res;

    But it shows message "down because of nulls in the required columns", which is a generic message. We must show what column or columns does not contain the value "failed because of null values in a column required columnA, columnB or columnC. Can someone help me in this regard. Any kind of help is appreciated.

    You can use the variable inputname1, which keeps an array of names of the entry for the script processor attribute. For example:

    var result = "";

    var first = true;

    for (i = 1; i< input1.length;="" i++)="">

    If (input1 [i] == null | input1 [i] == ' ') {}

    If {(first)

    Firstly = false;

    } else {}

    result += "";

    }

    lead inputname1 += [i];

    }

    }

    If (result.length > 0) {}

    result = "failed due to null values in the following mandatory columns:"+ result; "

    }

    Output 1 = result;

    Kind regards

    Nick

  • Create the Script to add a file in an Action name


    I have a picture, and I have a practical action that records, it cultures, he saves, cultures it differently and recorded once more. Currently, I have two options for these stops - I can save each crop in a separate folder and batch rename, or I have the break from the action he saves so I can customize the file name. What I would do is create a script (or, if there is an easier way), add this file name if it will save all simply in the same folder that I have to do it manually.

    Basically, I start with the name of the file: 'TEST '.

    for the first part, it I save as 'TEST '.

    for the second record, I want to save it as "TEST_P1".

    for the third record, I want to save it as "TEST_P2".

    I am brand new to scripting, and is my programming experience with Java and medium in my past, everything feels a little familiar. If someone could help me with this, I would really appreciate it!

    Another option is to use the Image Processor Pro script. You must create several actions to different cultures, you want to make to the original document size not a crop of harvest of a crop until the final harvest.  Don't have any records in these actions. Then just use meny file > Automate > Image Processor Pro.  Implement its dialog box to save the file names you want where you want to save them create.  You can also save that in action. The image pro script processor is a Photoshop plug-in.  In the dialog box, it will record the setting you used in the action stage.    Alternatively, you can save the configuration dialog for later use in the IPP dialog before running the process put in place.

    You can store as many files as you need with IPP and run your actions simple cultures for each size of harvest. IPP opens you simply file a copy to each of your operations and after the action is performed to save the modified copy of doctment under the name of file you set up. You can configure as many tabs as you want you can even have you resized using IPP option re-size crops.   If the script is easy to use his 10 + lines of script Photoshop...

  • Lost Aero Glass after installing KB981322

    1. I use Windows Vista Ultimate Edition and applied yesterdays Patch Tuesday updates security after restarting Aero disappeared and I felt as if I was again finished in the year 2000 and did not like it.
    2. I watched Aero questions and found the Aero diagnosis and tool FixIt, ran and he said that Desktop Windows Manager was arrested, so he tried to start it and was not able to solve the problems, I sent a report of this tool as well.
    3. I tried to manually restart the service through services.msc and devmgmt.msc and still no Aero chance had gone.
    4. I've restored about to restore before the updates and come back Aero, installed everything except 3 updates of security of yesterday and those went well, Aero still works.
    5. Made updates to safety one by one and did not have a problem until applying the last KB981322.
    So my question is, anyone else see this question, or was this configuration in the category "take the risk" of the test matrix (cannot be many grumpy like me running Vista Ultimate instead of upgrading to Windows 7, what I do for a bug patch, in order to not to ask to the left)?  And is there another way to patch more directly the problem of Unicode Scripts processor might not have this unnacepptable, for me, side effect?

    If you install it and restart twice, the issue will not happen.

  • Update KB981322 fails during the update to Vista

    On the occasion of several (fear as 10 tent) update KB 981322 fails. Help, please.

    KJE * address email is removed from the privacy *.

    Hello

    ·         What is the exact error that you are experiencing when you try to install the update on the system?

    ·         Apart from this update you are able to install some other updates without any problems?

    To learn more about the update, click on the link below.

    MS10-063: Description of the update of security for Windows Unicode Scripts processor: September 14, 2010

    http://support.Microsoft.com/kb/981322

     

    I suggest to put the system in a clean boot state and then install the update on the system and check if you are able to install the update on the system or not. Follow the steps mentioned below.

     

    Method 1:

    Step 1:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: Once you have finished installing, follow step 7 to start the computer in normal startup.

    Step 2:

    Download the update from the link below.

    Update security for Windows Vista (KB981322)

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=AC1B0260-3802-45D4-985E-AC827D784E4F

    Update security for Windows Vista for x 64-based systems (KB981322)
    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=EBFDCD6D-413E-4359-8863-E992327A607F&displaylang=en

    Method 2:

    I suggest you follow the steps mentioned in the article given below to troubleshoot Windows Update issues.

    Problems with installing updates

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-installing-updates

  • Garbage Collector

    Hello Nick, Mike,.

    How Garbage collection works in Disqualification in the case of the table with String objects? Especially in the script processor, we need to cancel the objects after setting the output argument? Or processor itself will be responsible for Garbage collection?

    Thank you

    Konate

    Hi konate,.

    Takes place automatically in Disqualification garbage collection and you do not need to do any 'tidy' explicit for most of the scripts. The only exception perhaps of scripts that make calls outside the JVM, for example creating a connection to external database customized to make a remote procedure call. In some of these circumstances, you can be explicitly required to close the objects to free memory. This will depend on the library/API in question.

    Kind regards

    Nick

  • Round stamp to the nearest hour

    Hi all

    I would like to turn stamp to the nearest hour. Example:

    21/01/2015 18:51-> 21/01/2015, 19:00

    21/01/2015 18:21-> 2015-21/01 18:00

    Suggestions how I can make it work properly? Thanks in advance.

    Kind regards

    Niek

    Hi Niek,

    With a Script processor, you can use this:

    var date = input1 [0];

    If (date! = null)

    {

    date.setTime (Math.round (date.getTime () / 3600000) * 3600000);

    Output 1 = date;

    }

    see you soon,

    Nick

  • How to find duplicates of a field value? For example - in a field, I have values like {123,345,346,123}, now I want to remove the duplicate value in the field so that my output looks like {123,345,346}

    How to find duplicates of a field value? For example - in a field, I have values like {123,345,346,123}, now I want to remove the duplicate value in the field so that my output looks like {123,345,346}

    If it's an array you want to deduplicate then here is a script [for use in the Script Processor] I prepared earlier:

    var result = new Array();

    var added = new Object();

    If (input1 [0]! = null)

    {

    for (var i = 0; i)< input1[0].length;="">

    {

    var point = input1 [0] [i];

    If (! added [item])

    {

    added [item] = 1;

    result [result. Length] = item;

    }

    }

    }

    Output 1 = result;

    Kind regards

    Nick

  • Convert Date to Julian Date in Disqualification

    Hi Mike / everybody,.

    Is there a way of Disqualification to convert a date to a Julian Date?

    I have a "valuation date" and I would like to convert a date Julian (which becomes an integer) to use in a subtraction formula. Is this possible?

    For example, in SQL:

    Select to_char (TO_DATE (' 2014/09/30 ', ' yyyy/mm/dd'), 'J') twice;

    Which returns 2456931

    If I have to use a script processor to achieve this, is there an example that I could follow, please help.

    Thanks in advance,

    Date.prototype.getJulian = function() {
      return Math.ceil((this / 86400000) - (this.getTimezoneOffset()/1440) + 2440587.5);
    }
    
    var valDate = input1[0];
    var dt = new Date(valDate);
    var julian_dt = dt.getJulian();
    
    output1 = julian_dt;
    

    The code above converts a date into a date julienne. All you have to do is add it to a script processor.

    Thank you

  • Workflow / Image Resizing Question

    Hoping someone can help me with a question of image resizing.


    I want to start an online store. I wish I could sell the same image on a t-shirt and a poster. I'll probably use Print will print/performance. They require the images to print at 300 dpi and be sized correctly. Thus, an image to print on their standard t-shirt (12 "x 16" (1.333:1)) must be 3600 x 4800 pixels.) ") To be included on their greatest poster (24.5 "x 36.5" (~1.5:1)), the same image should be 7350 x 10950 pixels.


    If I set my camera to produce a larger image, I get 6016 x 4000 pixels (~1.5:1). To maintain optimum image quality, I think I should treat this image in PS to create a main folder. I can then Downsample to create a t-shirt 3600 x 4800 image and pace to create a larger image and posters.


    Alternatively to pace process first of all, the image of the poster, and then downsample from there, in the image of t-shirt 3600 x 4800 pixels. This seems like it might be problematic.


    Another alternative would be to cadence to the poster image, downsample the image of t-shiirt, and then process each image separately. To optimize the images CMYK will print requires, I will probably need to do a separate processing (twisting) for each image in any case, but do completely separate treatment for each image is a lot more work. Any advice?

    When you use Image pro script processor you source image file should be your camera file. Here's the best pixels you have for your image. All image output processing start with these pixels for each file will be saved...  Your output image are always interpolated from these pixels.  You don't have to resize the image, you can save the Pixels camera provides.

    The way of working scripts of image processors are. They open an image source file in a document. Duplicate this document and treat the fooled until what he records and produces an output file for the document. Then he closes the dupe and repeated the dupe and process until all output files are saved to the image processing. Then the script closed the original document, that it opened without saving it.  The script then move to the next image file to process.  When all output images are only save the last open image document is closed and the script is done.

    You can include an action for each file in output production, The Image these action begins by still isn't the pixels of the source image and image that was treated for other output files. You can have the action executed before or after any resizing you do not have the script.  Once again, resize is optional.  You don't have to do the desired resizing script, you can if you want to perform the resizing in the actions that you use in the treatment of the output image.

    There is no problem in maintaining its quality. Quality only depends on how you treat the pixels of the original source image to preserve the quality that you first for each output image...

    Photoshop menu File > Automate > Image Processor Pro... Here the dialog box, you will see

    Very flexible, you can save as many image files that you need for each Image processing.

Maybe you are looking for