Help script for conditional skip

Hi all,
I am having problems to set up a script to skip lines from an import file containing total accounts.
My file format only contains 2 columns Acct and value.
The trigger to identify the total lines that should be ignored is given by the account length:
if account length record n < account length record n+1 , then skip, else keep.
here an example:
Account: Value: | Acct length: | Commets
11 $800 | 2<3? | is total, should be ignored
111 $300 | 3<4? | is total, should be ignored
1111 $100 | 4<4? | is base, should be read
1112 $200 | 4<3? | is base, should be read
112 $500 | 3<...? | is base, should be read
12
Any help on how to write a script linking record n to n+1?
thanks!!
Edited by: Diego_P on Nov 1, 2009 11:22 AM
Edited by: Diego_P on Nov 1, 2009 11:24 AM

Is this a delimited import format?
Do you have to do this through a script?
You could just put the following in the Like map to ignore the total columns when validating:
?? map to Ignore
??? map to Ignore

Similar Messages

  • Help Scripting for PDF Form List Box

    I am attempting to write JavaScript for an Adobe Acrobat X Pro form. I would like to set an action script for a List Box titled "customer_name" so that when a specific customer name is selected, a corresponding text box titled "cutomer_number" will automatically fill with the correct number. I am not very familiar with JavaScript so any help would be greatly appreciated.

    The easiest way to do this is to set the export value of each list box item to the corresponding customer number. The script for the custom number field could then simply be:
    // Set this field's value to the export value of the selected item in the list box
    event.value = getField("customer_name").valueAsString;
    Post again if you don't want to set up the list box that way for some reason since there are other ways to deal with this.

  • Scripting for Conditional Advanced Actions disappears after saving - title remains

    Hi, for the third time in a 24 hour period, after painstakingly entering 14 lines of variables and actions, the contents of the conditional AA script that I saved disappeared.  Yes, I saved all of them!  The name I gave it remains on the list of Advanced Actions, but clicking on it yields a virginal scripting window. At this point I've wasted a couple of hours re-writing the script only to have it go blank on me again.  Any ideas?

    It's actually a lot more complex than that.
    Here is a list of words that should NOT be used when naming objects, slides, variables or actions in Captivate because they can conflict with existing code or names in the app:
    abstract
    accessibilityProperties
    alpha
    as
    blendMode
    boolean
    break
    buttonMode
    byte
    cacheAsBitmap
    case
    cast
    catch
    char
    class
    const
    constructor
    contextMenu
    continue
    currentFrame
    currentframe
    currentLabel
    currentLabels
    currentScene
    debugger
    default
    delete
    do
    double
    doubleClickEnabled
    dropTarget
    droptarget
    dynamic
    each
    else
    enabled
    enum
    export
    extends
    false
    filters
    final
    finally
    float
    focusEnabled
    focusRect
    focusrect
    for
    forceSmoothing
    framesLoaded
    framesloaded
    function
    get
    goto
    graphics
    height
    height
    highquality
    hitArea
    if
    implements
    import
    in
    include
    instanceof
    interface
    internal
    intrinsic
    is
    loaderInfo
    lockroot
    long
    mask
    menu
    mouseChildren
    mouseEnabled
    mouseX
    mouseY
    name
    name
    namespace
    native
    new
    null
    numChildren
    opaqueBackground
    override
    package
    parent
    parent
    private
    protected
    prototype
    public
    quality
    return
    root
    rotation
    rotation
    scale9Grid
    scaleX
    scaleY
    scenes
    scrollRect
    set
    short
    soundbuftime
    soundTransform
    stage
    static
    stop
    super
    switch
    synchronized
    tabChildren
    tabEnabled
    tabIndex
    target
    textSnapshot
    this
    throw
    throws
    to
    totalFrames
    totalframes
    trackAsMenu
    transform
    transient
    true
    try
    type
    typeof
    url
    use
    useHandCursor
    var
    virtual
    visible
    visible
    void
    volatile
    while
    width
    x
    xmouse
    xscale
    y
    ymouse
    yscale

  • A Script for Conditional Text Batch Export

    Hi, I was directed into this subforum with this question:
    I have a document with nearly 200 versions of conditional text that has to be individually swapped out and exported to pdf. I genearlly just do this one at a time all the way though.
    Is there a way to batch the export of these pdfs? I've been scouring the internet for a soultion but can't seem to find one. I am on CS4 still if it matters. Thanks!

    Hi,
    no Problem Take a look at the exportline too. you can choose between backgroundexport and normal export.
    var nameOfThePDFExportPresetYouWantToUse = 'MyPdfPreset' //please don't forget to set!
    var currDoc = app.activeDocument;
    var currFilePath = currDoc.filePath.absoluteURI + '/';
    var currFileName = currDoc.name.replace(/.indd/, '');
    var currConditions = currDoc.conditions;
    //set all conditions visible to false
    currConditions.everyItem().visible = false;
    l = currConditions.length;
    //cycle thru conditions
    while(l--){
    currCondition =     currConditions[l];
    //set actual condition visible to true
    currCondition.visible = true;
    currConditionName = currCondition.name
    //set pdfName
    var exportTo = File(currFilePath + currFileName + '_' + currConditionName +'.pdf');
    //Have a look here:
    //export PDF. to choose backgroundexport. use the second line of code
    currDoc.exportFile(ExportFormat.PDF_TYPE, exportTo,false,  nameOfThePDFExportPresetYouWantToUse);
    //currDoc.asynchronousExportFile(ExportFormat.PDF_TYPE, exportTo,false,  nameOfThePDFExportPresetYouWantToUse);
    //set actual condition visible to false
        currCondition.visible = false;
    Sunny Day
    Hans-Gerd Claßen

  • Help - Scripting for LiveCycle 7

    I am working in Adobe Professional, LiveCycle Designer 7.  I need help with scripting.
    My numeric field names:
    I want the formula to calculate a per-project limit based on 2 criteria as follows:
    If the multiplier box contains a value 71 or greater, multiply the highest project amount by 1.7 but
    If the multiplier box contains a value of 70 or less mulitply the highest project amount by 1+multiplier (e.g 1.69).
    Thank you

    * script is dependent on actual field names and hierarchy you set in your design....however you could use the following as sample.
    //JavaScript code
    var mPlier = multiplier.rawValue
    var pAmount = projectAmount.rawValue
    if (mPlier >= 71) {
         prePLimit.rawValue = pAmount * 1.7;
    }else {
         prePLimit.rawValue = pAmount * (1+mPlier);
    Good Luck,

  • CP5 Advanced Action help needed for conditions....

    Hi,
    I have created my own MultipleChoice (MC) question with 4 answer possabilities whereof 3 are right and 1 is wrong.
    As soon as a right/wrong answer is checked an advanced action is performed - checkmark in box shown and "feedback" to answer.
    In case of a right answer - the feedback of any previous answer is hidden but the check mark of correct answers stay whereas the wrong answer checkmark is hidden.
    An example of the advanced action for one of the three right answers:
    This is what the question looks like before the answer of my question needs to be implemented:
    Now to my question:
    At the end of the answers I would like the user to get a message: CONGRATULATIONS.....
    This should be displayed when all 3 right answers have been selected.
    After that CONGRAT... message they can then click the Continue button to continue the training.
    I am curious to any suggestion on how to realise this
    Thanks in advance for the reply.
    best regards
    Stephanie

    OPTION A:
    Steps to achieve congratulations message on the same slide (which is the question) 1. Actions like B_Selected,C_Selected etc. have to be conditional actions instead of standard actions which they are right now.
    2. Four variables are to be created from Project->Variables ->Add new. These can be named as a,b,c,d and set to 0(zero) which means the option is not selected 3. In the conditional action B_selected, first condition has to be something like
          If (1 equals 1)
                Show TC_Correct_B
                Show Image_230
                Hide Image_233
                Hide TC_Wrong_A
                Hide TC_Correct_C
                Hide TC_Correct_D
                Assign b = 1
    4. In second condition of same action i.e. B_selected, do the following
          If (a equals 0 && b equals 1 && c equals 1 && d equals 1)
                Show TC_Congratulations
    All the actions should have these two conditions and if there are actions like B_unselect, then 'Assign b = 0' in such actions.
    OPTION B
    On the other hand if it's fine to show the congratulations message on next slide, it will be simpler like this 1. Create the four variables a,b,c,d = 0 2. In actions like B_Selected (no need to change them to conditional action), add a statement 'Assign b = 1'
    3. In actions like B_unselected, add a statement 'Assign b = 0'
    4. On slide exit execute an advanced action which will be a conditional action as follows:
          If (a equals 0 && b equals 1 && c equals 1 && d equals 1)
                Go To Next Slide
          Else
                Jump to Slide __
    5. On next slide write congratulations message.
    Regards,
    Vandana    

  • Script for getting the online/offline status

    Hi all,
    After enabling checkbox of "Enable assistive access device" is possible to get the online/ offline status.From Menu we will get the status.Without doing this i want to get the apple mail account online/offline status.hope some help scripts for this.

    [That script|http://discussions.apple.com/message.jspa?messageID=11012484#11012484] could change the Online Status of all mail accounts. The following one will just report their Online Status. Is this what you are (were) asking for?
    --BEGINNING OF SCRIPT
    tell application "Mail" to activate
    tell application "System Events" to tell process "Mail"
    set theMenu to menu "Mailbox" of menu bar 1
    if enabled of menu item "Take All Accounts Online" of theMenu then
    return "All accounts are currently offline"
    else
    return "All accounts are currently online"
    end if
    end tell
    --END OF SCRIPT

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • Help in writing scripts for monitoring

    Hi All,
    I am in the position to write scripts for monitoring JVM and JDBC. I know the concept of confiuration MBean and run Time MBean.I planned to use WLShell scripting.In my organization using WLShell is not preferred by anyone. I
    dont have any further idea about it. Any other possibilies are there to list the paramters of JVM and JDBC using any scripting.Please help me regrding this.
    Jasmine

    I solved that problem.Now i could enter into intractive mode.but couldnt connect to server using connect('weblogic','weblogic','t3://localhost:7001').The servers are up and running.
    I am getting the following error.
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.io.StreamCorruptedException
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
    at weblogic.management.internal.RemoteMBeanServerImpl_812_WLStub.getServerName(Unknown Source)
    at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
    at org.python.core.PyMethod.__call__(PyMethod.java)
    at org.python.core.PyObject.__call__(PyObject.java)
    at org.python.core.PyObject.invoke(PyObject.java)
    at org.python.pycode._pyx4.connect$2(<iostream>:68)
    at org.python.pycode._pyx4.call_function(<iostream>)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyFunction.__call__(PyFunction.java)
    at org.python.pycode._pyx6.f$0(<input>:1)
    at org.python.pycode._pyx6.call_function(<input>)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyCode.call(PyCode.java)
    at org.python.core.Py.runCode(Py.java)
    at org.python.core.Py.exec(Py.java)
    at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
    at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java)
    at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java)
    at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java)
    at weblogic.WLST.main(WLST.java:113)
    Caused by: java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1301)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
    at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:119)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:112)
    at weblogic.management.internal.RemoteMBeanServerImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    --------------- nested within: ------------------
    weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
    <b>Please help me out.</b>
    Jasmine

  • I'm not able to upgrade my Mac to itunes 10.5. Keep getting message "Run pre upgrade script for apple mobile device support" any help please?

    Hi I'm not able to upgrade my Mac OS X 10.5.8 to itunes 10.5 Keep getting message "the following install failed. run pre upgrade script for apple mobile device support" contact software manufacture for assistance. any help please?

    Did you ever figure out the problem? "Contact Software Manufacturer"?? That sounds ominous... I've got the same issue and I'm pretty durn aggravated right about now....
    Thanks!

  • I have tried to upgrade Painter 11 on my iMac running OS X 10.5.8. I keep getting the error message :- : The following install step failed : run pre install script for Corel Painter11 _ SP1 . Contact the software manufacturer for assistance   " Help pleas

    I have tried to upgrade Painter 11 on my iMac running OS x 10.5.8 but get the error message : The following install step failed : run pre install script for Corel Painter11_SP1. Contact the software manufacturer for assistance "
    I have contacted Corel and after several emails and one telephone call, they tell me , they cannot help but they think the problem could be with the OS.
    Does anyone have any suggestions, please ?

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

  • Conditional Actions Script for PS CS2

    This script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
    From his Blog entry:
    "This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
    If the image height is greater than its width, do Action X, or else do else Y
    If the image format is JPG / PSD / BMP do action...
    If the image file size is bigger than 300KB, do action....
    if the image IS/IS NOT of RGB, CMYK... etc
    if image author is Siva, do action...
    if image exif contains Nikon D70s, do action ....
    if image name contains "paris", do action...
    etc
    etc
    Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
    caveat downloador :)
    Visit Siva's blog to read more and get the script at the following link:
    http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html

    This script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
    From his Blog entry:
    "This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
    If the image height is greater than its width, do Action X, or else do else Y
    If the image format is JPG / PSD / BMP do action...
    If the image file size is bigger than 300KB, do action....
    if the image IS/IS NOT of RGB, CMYK... etc
    if image author is Siva, do action...
    if image exif contains Nikon D70s, do action ....
    if image name contains "paris", do action...
    etc
    etc
    Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
    caveat downloador :)
    Visit Siva's blog to read more and get the script at the following link:
    http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html

  • Help! I want a perl script for test

    I am not familar with perl and XMLDB.
    The database which managed by other team report the following errors.
    They said the error was caused by the perl scipt which contents a statment using XML object.
    So I want a perl script for test.
    Please help me.
    oracle 9.2.0.3.0
    Alert.log
    ORA-00600: internal error code, arguments: [qmxarElemAt2], [0], [], [], [], [], [], []
    listener.log
    connect_data=(sid=###)(cid=(PROGRAM=perl@###)(USER=oracle)))*(ADDRESS=(PROTOcol=tcp)(host=)
    establish###
    Edited by: 964446 on Oct 10, 2012 6:10 AM

    I can't check on iTunes until tomorrow morning, but in the meantime I can tell you what's wrong with your original feed. The top two lines read
    <?xml version="1.0"?>
    <rss version="2.0">
    They should read
    <?xml version="1.0" encoding="UTF-8"?>
    <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
    Without the itunes URL in the second line iTunes cannot parse the required tags to show your episodes. I would guess that the line was there originally but got removed, after which iTunes would not recognize new episodes. Put it back and reload the feed, and it should work if iTunes hasn't terminated your podcast in the meantime.
    But to answer your original question: assuming you have access to both feeds; copy everything in the original feed from the first <item> to the last </item> near the bottom.
    In the new feed, find the last </item> tag at the bottom (just above the </channel> and </rss> tags), start a new line just after it and insert the material you posted from the original feed (though there are an awful lot of episodes there, and though it's technically not a problem you might want to consider whether you really need all of them in the feed).
    If you don't have direct access to the feeds but are using one of the podcast creation services which don't allow this, you will have to follow whatever method they provide for adding the episodes, possibly one at a time.

  • Need help creating script for specific instance

    I am having trouble coming up with a working script for this part of the pricing form I am editing. I am trying to get the calculation fields to the right to change and populate in the respective field based on the selection in the Material Type dropdown. Would it be less of a headache if I made another text field to calculate the LE versions separately instead of trying to merge them into one field? I have attached screenshots below to give you an example of what I'm working with. Any help with this is greatly appreciated!
    Script I'm tinkering with at the moment:
    //Dropdown37 = Quantity Field
    //Type of Door IB = Material Type dropdown
    var x = this.getField("Type of Door IB").value;
    if ( x = 1468 ) event.value = x * this.getField("Dropdown37").value;
    if (x = 1202) event.value = x * this.getField("Dropdown37").value;
    else event.value = 0;

    The comparison operator in JS is "==", so change this line:
    if ( x = 1468 )
    To this:
    if ( x == 1468 )
    (as well as the other if-statement).

  • [solved]Need help with a bash script for MOC conky artwork.

    I need some help with a bash script for displaying artwork from MOC.
    Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
    mocp -Q %file
    gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last  '/'?)
    A point in the right direction would be appreciated.
    thanks, d
    Last edited by dgz (2013-08-29 21:24:28)

    Xyne wrote:
    You should also quote the variables and output in double quotes to make the code robust, e.g.
    filename="$(mocp -Q %file)"
    dirname="${filename%/*}"
    cp "$dirname"/front.jpg ~/backup/art.jpg
    Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
    thanks for the tip.
    here it is, anyhow:
    #!/bin/bash
    filename=$(mocp -Q %file)
    dirname=${filename%/*}
    cp ${dirname}/front.jpg ~/backup/art.jpg
    then in conky:
    $alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
    thanks for the help.
    Last edited by dgz (2013-08-29 21:26:32)

Maybe you are looking for

  • How to sync contacts and calendar from macbook pro to ipad 2?

    How do I sync contacts and calendar from macbook pro to ipad2?

  • WM Configuration

    Hi, Can any body send me details how to do the complete configuration in WM Module. Regards, sapmm

  • Log report

    Can you pls let me know I m using TOAD version 9 I would like to see what are all the queries which ran on 30 th of April Is there any way to See this in Toad or ORacle..? I queried v$sql..it did nt show the full list... :( Thanks a lot Edited by: us

  • Master Data ------  Source and Target Mapping

    I want to know the source and target mapping of some master data elements like plant,vendor,customer,workcenter. Where can I get it. Please provide the relevant documents or links.

  • DB Update on page load?

    On my VBScript to SQL Server site, I need to write something whereby when a page loads, it UPDATEs a record on a table with a value. Is there a way to modify the DW8 Update behavior to do this? Help?