Script for Alerts

Hi I have 3 databases in my enviroenment and I wanted to sent email alert if finds a data two tables for all the 3 tables in single email.
I have written a script but, it the problem is it is also sending the alerts if having no records i.e no rows selected. Basically it should not send any alert if it find "no rows select" for all the 3 database and it should the alert it find any records in any of the database.
Script:
set head on
set pages 0
set verify off
set echo off
set termout off
select distinct xxxx,yyyy from abc where proc_ind in ('E','F')
exit
EOF
echo "\n" >>$SQLOUT
echo "Trans Table Details for E and F on database $ORACLE_SID">>/tmp/sql_$ORACLE_SID
$ORACLE_HOME/bin/sqlplus -s <<EOF >>/tmp/sql_$ORACLE_SID 2>&1
system/systempassword
set head on
set pages 0
set verify off
set echo off
set termout off
select distinct xxxx,yyyy from abc where proc_ind in ('E','F')
exit
EOF
echo "\n" >>$SQLOUT
count=`grep "no rows selected" /tmp/sql_$ORACLE_SID |wc -l`
cat /tmp/sql_$ORACLE_SID >>/tmp/mailtext
if [ $count = 0 ]; then
cat /tmp/sql_$ORACLE_SID >>/tmp/mailtext
fi
done
$MSMAIL $SQLOUT "RFS Post Load Failures on `uname -n`" [email protected]
exit
~

Hi,
Try Below code, you can also debug the code using the Echo Command..
count=`grep "no rows selected" /tmp/sql_$ORACLE_SID |wc -l`
echo $count  #Always return one in case of no row selected
if [ $count == 0 ]; then
cat /tmp/sql_$ORACLE_SID >>/tmp/mailtext
fi
SQLOUT=/tmp/mailtext
$MSMAIL $SQLOUT "RFS Post Load Failures on `uname -n`" [email protected]

Similar Messages

  • Modify shell script for alerts...

    Hello,
    had a question with regards to a simple script i wrote...it take care of our every hour archive backup...NOT GOOD IN SHELL SCRIPTING....i get e-mail every single time its backed up.....i want this script to be modified in a way...where i get e-mail notification only and only if the backup fails for whatever reason...here is the script..can someone help me modifying this script....
    export MMSG=/tmp/$$.mail
    export ADDR="[email protected]"
    export ORACLE_SID=test
    export ORACLE_HOME=/u01/oracle/10g
    rm -f $$MMSG > /dev/null 2>&1
    echo "ARCHIVE BACKUP STARTED: "'date'
    echo "ARCHIVE BACKUP STARTED: "'date' > $MMSG
    /u01/oracle/10g/bin/rman target / @/home/oracle/scripts/archive_1.scr >> $MMSG 2>&1
    echo "ARCHIVE BACKUP COMPLETED: "'date'
    echo "ARCHIVE BACKUP COMPLETED: "'date' >> $MMSG
    if [ -f $MMSG ]
    then
    mailx -s "Archive Backup Status" $ADDR < $MMSG
    fi
    rm -f $MMSG > /dev/null 2>&1
    -------------------------------------------------------------------------------------------------------

    Try this:
    export MMSG=/tmp/$$.mail
    export ADDR="[email protected]"
    export ORACLE_SID=test
    export ORACLE_HOME=/u01/oracle/10g
    rm -f $$MMSG > /dev/null 2>&1
    echo "ARCHIVE BACKUP STARTED: "'date'
    echo "ARCHIVE BACKUP STARTED: "'date' > $MMSG
    /u01/oracle/10g/bin/rman target / @/home/oracle/scripts/archive_1.scr >> $MMSG 2>&1
    rc=$?
    if [ $rc -eq 0 ]
    then
      echo "ARCHIVE BACKUP COMPLETED: "'date' 
      echo "ARCHIVE BACKUP COMPLETED: "'date' >> $MMSG
    else
      echo "ARCHIVE BACKUP FAILED: "'date' 
      echo "ARCHIVE BACKUP FAILED: "'date' >> $MMSG
      mailx -s "Archive Backup Status" $ADDR < $MMSG
    fi

  • Weblogic.admin script to alert server status

    Hi,
    Can anybody share a weblogic.admin utility script for alerting the server status in unix ?

    Below is the solaris shell script integrated with weblogic.admin utility....
    If the server status is other than running it will sends a alert mail to you.
    Sometime your server may be in shutdown mode and if you execute the below script, it says destination not reachable on specified port and then also it sends a alert mail.
    Change it according to ur env and execute...
    set -x
    export CLASSPATH=”/wl_home/server/lib/weblogic.jar”
    declare -a Port=( 8003 7072 8201 )
    declare -a ServerState[]
    declare -a ServerName[]
    declare -a ObjectName[]
    i=”0″
    IP=Weblogic host address
    while [ $i -lt 5 ]
    do
    ServerState[$i]=`java weblogic.Admin -url $IP:${Port[$i]} -username weblogic -password weblogic GET -pretty -type ServerRuntime -property State |grep -i State |awk ‘{print $2}’`
    ObjectName[$i]=`java weblogic.Admin -url $IP:${Port[$i]} -username weblogic -password password GET -pretty -type JVMRuntime -property ObjectName |grep -i ObjectName |awk ‘{print $2}’`
    if [ "${ServerState[$i]}” != “RUNNING” ] ;
    then
    mailx -s ” Weblogic Server Staus- $IP ” [email protected]<<EOF
    Weblogic Managed server ${Port[$i]} is in SHUTDOWN state
    EOF
    fi
    i=`expr $i + 1`
    done
    Thanks,
    Kartheek
    Troubleshooting in weblogic gives thrilling experience .......

  • WLST Script for Disabling/Enabling Global SLA Alerting.

    Hello,
    I wanna find a way from the WLST to disable and enable the SLA Alerting which is under Operations-->Global Settings in the sbconsole. This is the global setting not per sercive!
    I have found how to create a session and how to disable the alerts per service, but i cannot find which MBean is accessed when throught the sbconsole the global SLA alerting is disabled/enabled.
    Can anybody point me to the right direction or help me to find how to do this from WLST.
    Thanks.

    Hi Ganesh,
    I have finally created the script i was looking for.. I copy-paste it below as a sample... For sure you need all the lines of code until the comment i have put "#####you need this code above"
    now the code you see below the comment is for disabling the global sla alerting... you have to write a bit to target a specific service that you want to disable.
    Keep in mind that after you make your change you hava to include those lines in order to activate the changes and disconnect and exit..
    sessionMBean.activateSession(sessionName, "enable SLA")
    disconnect()
    exit()
    If you have access to oracle support search for wlst script for osb it has a lot and you can find how to target a specific service...
    I hope that i help a little bit
    import sys
    import wlstModule
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
    #from com.bea.wli.sb.management.configuration import ProxyServiceConfigurationMBean
    from com.bea.wli.sb.management.configuration.operations import OperationsConfigMBean
    from com.bea.wli.config import Ref
    from com.bea.wli.sb.util import Refs
    # Connect (username, password, URL)
    connect('weblogic', 'password', 't3://localhost:7001')
    domainRuntime()
    # Create a session name
    sessionName =sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
    print('... after session. Session is: ', sessionName)
    # Get the session MBean and create a session
    sessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
    print('-debug-this is the sessionbean',sessionMBean)
    print('SessionMBean is: ', sessionMBean)
    sessionMBean.createSession(sessionName)
    print(String('Session was created ... ').concat(sessionName))
    #####you need this code above
    domainCustom()
    cd('com.bea')
    #path='com.bea:Name=OperationsConfig.'+sessionName+',Location=AdminServer,Type=com.bea.wli.sb.management.configuration.operations.OperationsConfigMBean'
    cd('com.bea:Name=OperationsConfig.'+str(sessionName)+',Location=AdminServer,Type=com.bea.wli.sb.management.configuration.operations.OperationsConfigMBean')
    set('DomainSLAAlertingEnabled',java.lang.Boolean("true"))
    # Now commit (activate) the changes
    sessionMBean.activateSession(sessionName, "enable SLA")
    disconnect()
    exit()

  • How do I change the script for a voice iChat Alerts for when a friend becomes unavailable?

    How do I change the script for a voice iChat Alert for when a friend becomes unavailable?
    Before I upgraded my system from Mac OS 10.4.11 to Mac OS 10.6.8 - I a had personalized the script for a voice iChat Alert when my husband logged off from work. I had the ichat voice warn me "OH, Crap! he's coming home now! Hurry clean house!" This personalized voice alert did not survive the upgrade. Now, I need step by step instructions to walk me through the process. Please help! I mis my machine shouting funny profane alerts.

    Hi,
    In iChat 3 (OS 10.4.x) there was  Line at the Bottom of iChat > Preferences > Alerts that you could enter text to and it would speak that Text.
    (you could set something against Individual Buddies as well).
    This Setting is not there in iChat 4 or 5  (I presume iChat 6 as well).
    Now it is possible to write AppleScripts that can Speak.
    It is alos possible in iChat 4 upwards to link an AppleScript to an Action/Alert
    At this point my lack of AppleScript knowledge lets me down on what to tell you to do next.
    An Alternative would be to Record a sound with said alert.
    Place this sound in your Home Folder/Library/Sounds
    Then in the Alert opton for youe husband select the Log off option and link that Sound
    <
    10:25 PM      Wednesday; August 3, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Alert and Monitoring Scripts for Hyperion Applications

    Hi Gurus,
    Can you please provide me with any customized scripts for automating alert mails and monitoring activities pertaining to Hyperion Applications.
    If not, can you please suggest some alternatives where i can get hold of some scripts. Any kind of help is greatly appreciated.
    Also can someone please throw some light about the APPMULE and how to procure their services or we can get it for free trial.
    Regards,
    Uday

    Any kind of leads on this is really appreciated.
    Regards,
    Uday

  • Notifications not being generated for alerts generated by rules.

    I'm using SCOM 2012 R2 and have configured an alert generating rule to create alerts when specific events occur in a windows event log.
    The rule works fine, alerts are generated as expected.
    I have also configured subscriptions/subscribers/channels to send notifications via email and SMS (via script in command channel) however even with the criteria set to send on all alerts, I only receive notifications for alerts generated by monitors (so
    I know the subs and channels do function)
    It seems like some sort of workflow issue where alerts generated by a rule fail to create a notification.
    Is there any logging I can enable to see what's happening here? 
    Any other ideas?

    In System Center 2012 Operations Manager, the alert notification will be sent when the alert first meets all criteria, regardless of resolution state, unless resolution state itself is a criterion. If alert suppression is enabled for the rule or monitor
    that raises an alert, only one notification will be sent when the subscription criteria are first met. No additional notifications will be sent until the alert is closed and a new alert is raised that meets all subscription criteria.  PLease check
    1) whether your rule has trun on alert supression
    2) Close the alert, craised by rule,  and do it again
    Roger

  • Shell script for archive log transfer

    hi
    I dont want to reinvent the wheel.
    I am looking for shell script for log shipping to provide standby db.
    What I want to do is, get the last applied archived log number from alert.log
    Copy the files from archive destination according to this value.
    Cheers

    If you don't want to re-invent the wheel you use Dataguard, no scripts.
    And your script should use the dictionary, instead of some bs method to read the alert.
    v$archived_log has all information!
    Also as far as I know, the documentation describes manual standby.
    So apparently you not only don't want to reinvent the wheel, but you want the script on a silver plate on your doorstep!
    Typical attitude of most DBAs here. Use OTN for a permanent vacation.
    Sybrand Bakker
    Senior Oracle DBA

  • Script for getting mail if database is down

    Hi Friends,
    OS Version : IBM AIX 5,2
    Oracle version : 9.2.0.7
    I am executing the following script for getting mail alert if database is down. some how the script is not working
    check_stat=`ps -ef|grep ${ORACLE_SID}|grep pmon|wc -l`;
    oracle_num=`expr $check_stat`
    if [ $oracle_num -lt 1 ]
    then
    exit 0
    fi
    # Test to see if Oracle is accepting connections
    $ORACLE_HOME/bin/sqlplus -s "/as sysdba" > /tmp/check_$ORACLE_SID.ora
    select name from v$database;
    exit
    # If not, exit and e-mail . . .
    check_stat=`cat /tmp/check_$ORACLE_SID.ora|grep -i error|wc -l`;
    oracle_num=`expr $check_stat`
    if [ $oracle_num -ne 0 ]
    then
    mailx -s "$ORACLE_SID is down!" [email protected] < /tmp/check_$ORACLE_SID.ora
    exit 16
    fi
    I am saving this as .sh file and executing at command prompt. It is just hanging, but not throwing any error.
    I would like to know if there is anything to be modified in the script or please provide me any such script. Thanks in advance

    HI there.
    I have a script I use that works really well. It sends out an email only if the database is down and also reads an ini file to process a blackout period and a priority level of the database... High priority databases are monitored every 5 minutes and Medium priority databases every hour.
    There are two scripts, the shell script and the .ini file and I have two cron entries...
    Check script:_
    #!/bin/ksh
    # check_oracle_status.sh
    # Script to check if Oracle db's are up and running.
    # Script is passed a priority field and reads check_oracle_status.ini
    # to determine which db's to check. If db is down an email is sent.
    # Priority Levels:
    # H - Checks db's with "H"igh Priority every 5 minutes (cron)
    # M - Checks db's with "M"edium Priority every hour (cron)
    # L - db's with "L"ow Priority currently not checked
    # Script Change History:
    # ======================
    # October 29th, 2009 - Initial Creation
    # Set environment
    export SCRIPTHOME=/opt/oracle/admin/scripts
    export INIFILE=$SCRIPTHOME/check_oracle_status.ini
    export PRIORITY=$1
    . $HOME/.profile
    db=`grep -i ":$PRIORITY" $INIFILE | cut -d":" -f1`
    check_database()
    sqlplus <<! > $SCRIPTHOME/check.out
    / as sysdba
    select * from dba_data_files;
    exit
    grep ORA- $SCRIPTHOME/check.out > $SCRIPTHOME/error.out
    if (( $? )); then
    echo ""
    else
    mailx -s "Oracle instance $i is currently UNAVAILABLE" +<email address>+ < $SCRIPTHOME/error.out
    fi
    for i in $db ; do
    fields=`grep $i $INIFILE | awk -F':' '{ total = total + NF }; END {print total}'`
    export ORACLE_SID=$i
    if [ $fields -gt 2 ]; then
    BLACKOUT_START=`grep -i "$ORACLE_SID" $INIFILE | cut -d":" -f3`
    BLACKOUT_END=`grep -i "$ORACLE_SID" $INIFILE | cut -d":" -f4`
    CURRENT_HOUR=`date +%H`
    CHECK_BASE=YES
    if [ $BLACKOUT_START -gt $BLACKOUT_END ]; then
    (( $CURRENT_HOUR >= $BLACKOUT_START || $CURRENT_HOUR <= $BLACKOUT_END )) && CHECK_BASE=
    else
    (( $CURRENT_HOUR >= $BLACKOUT_START && $CURRENT_HOUR <= $BLACKOUT_END )) && CHECK_BASE=
    fi
    if [ -n "$CHECK_BASE" ]; then
    check_database
    fi
    else
    check_database
    fi
    done
    rm $SCRIPTHOME/check.out $SCRIPTHOME/error.out
    INI File:_
    oracle1:L
    oracle2:M:17:08
    oracle3:M
    oracle5:M:17:08
    oracle6:H
    oracle7:M:17:08
    oracle8:M
    oracle9:M
    Where oracle1,2,3 etc is your sid
    L M and H your priority level
    17 is blackout start (5 PM)
    08 is blackout end (8 AM)
    Note: Blackout is just a start hour and an end hour and must contain both or none and my script can only process one blackout per database. I guess if you
    needed a second blackout you could add another line with different times for that sid
    Cron entries:_
    # Check Oracle Status
    # The check_oracle_status.sh script monitors "H"igh priority databases every 5 minutes
    # and "M"edium priority databases every hour
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/oracle/admin/scripts/check_oracle_status.sh H > /dev/null 2>&1
    0 * * * * /opt/oracle/admin/scripts/check_oracle_status.sh M > /dev/null 2>&1
    Not sure if you require blackouts or priority levels but this setup works great at our site.
    Hope this helps.

  • Script for validating Text fields or numeric fields

    I'm looking for a simple script that will check the entered data in a specific field.If i enter numbers in the name/last name field i should get a pop up message that entering numbers in this field are not allowed.
    (And vice versa regarding numeric fields).
    What is the script for that ?

    Hi,
    try this:
    //var reg = /^\d+$/;    // checks whether input contains ONLY digits
    var reg = /\d+/;    // checks whether input contains digits AND letters
    var check = reg.exec(xfa.resolveNode("#subform[0].#field[0]").rawValue);
    if (check == null)
        app.alert("Everything's fine!");
    else
        app.alert("Entering digits is not allowed!");
    You may want to replace
    #subform[0] with the name of the subform the field to check is located in and
    #field[0] with the name of the field to check for digits.
    Also, you may want to select any of the regular expressions, which fits best your needs. See comment in the above code-fragement for further information.
    Regards,
    Steve

  • Script for InDesign CS6 - create multiple, prenamed layers

    I created a script for Illustrator CS6, in ExtendScript Toolkit, that will create multiple, prenamed layers...see below...
    //Apply to myDoc the active document
    var layerName = LayerOrderType;
    var myDoc = app.activeDocument;
    //define first character and how many layers do you need
    var layerName
    var numberOfLayers=0;
    //Create the layers
    for(var i=0; i<=numberOfLayers; i++)
    { var layerName = ":: GRADIENT";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: STRIPES";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LEGAL";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: BLK BAR";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: FLAME";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LOGO/TYPE";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: TRIM,ETC";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LOEC INFO";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    // Moves the bottom layer to become the topmost layer
    if (documents.length > 0) {
    countOfLayers = activeDocument.layers.length;
    if (countOfLayers > 1) {
    bottomLayer = activeDocument.layers[countOfLayers-1];
    bottomLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
    else {
    alert("The active document only has only 1 layer")
    I tried to use this exact code to replicate the same scenario in InDesign but it doesn't work.
    Can anybody help me out!?
    Thanks in advance

    Marijan Tompa's scripts are very nice and useful, however, for this simple task you can try create your own wiht this code:
    app.activeDocument.layers.add ({name: "GRADIENT", layerColor: UIColors.red});
    app.activeDocument.layers.add ({name: "STRIPES", layerColor: UIColors.lightBlue});
    app.activeDocument.layers.add ({name: "LEGAL", layerColor: UIColors.gray});
    //merge existing document layer to bottom layer (in this case original layer will be merged to 'GRADIENT')
    var myDocument = app.documents.item(0);
    var myLayerA = myDocument.layers.item(2);
              var myLayerB = myDocument.layers.item(3);
              myLayerA.merge(myLayerB);
    alert("Layers created!");
    assume, your document has one layer.
    Script creates three new layers, they appear in Scripts palette in this order:
    LEGAL
    STRIPES
    GRADIENT
    and merges 'old' layer to bottom layer of newly created set (GRADIENT).
    sure, you can add as much layers as you need, just don't forget modify LayerA and LayerB numbers accordingly.
    Or disable second part of the script at all, if you don't want anything to be merged.

  • Is there an updatedcrossrefs script for InDesign CS6

    Running Mac Pro/2.66 GHz—Quad-Core Intel Xeon/Snow Leopard/
    OS/Mac OS X Version 10.6.2/2.66 GHz
    I converted a CS3 InDesign that uses the script "updatedcrossrefs.js", to CS6 InDesign. This file uses hyperlinks on the TOC and Index.
    I tried using the same script for CS3 InDesign in CS6 InDesign but it does not work.
    This is the error message "Could not catch page. Check destination names and existence."
    Is there an updated script for CS6?

    Sorry did not know I was using bold. My co-worker found this script however, she does not work here anymore. But here is the script. I know nothing about scripts except how to use them. Sorry.
    // Updatecrossrefs.js
    // Updates cross references made with hyperlinks
    // the hyperlink destination is where the reference refers to
    // the hyperlink sourcetext is the text that will be updated (like see xx)
    // If a book is open, the book will be handled,
    // if no book is open, the active document will be handled.
    // Made by Teus de Jong, last version April 10, 2006
    // Revisions by Dave Saunders January 22, 2006 and March 20, 2006
    // Thanks Dave!
    // Added unique naming mechanism for sources -- October, 2008
    if (app.books.length == 0){
              if (app.documents.length == 0){
                        errorExit('No documents are open');
              } else {
                        nrofdocs = 1;
                        doc = app.activeDocument;
    } else {
              nrofdocs = app.books[0].bookContents.length;
              for (i = nrofdocs - 1; i > -1; i--) {
                        if (app.books[0].bookContents[i].status != BookContentStatus.documentIsOpen)
                                  app.open(File(app.books[0].bookContents[i].fullName));
              doc = app.open(app.books[0].bookContents[0].fullName);
    for (d = 1; d <= nrofdocs; d++){
              for (i = 0; i < doc.hyperlinks.length; i++){
                        hyper = doc.hyperlinks[i];
                          // leave ID's own internal markers alone
                        if (hyper.name.substring(0, 1) == '.'){continue}
                          // leave hyperlinks to URLs alone
                          try {
                                  if (hyper.destination.constructor.name == 'HyperlinkURLDestination'){continue}
                        } catch (e) {
                                  hyper.showSource();
                                  errorExit('Selected hyperlink has undefined destination');
                        s = hyper.source.name;
                        // added October, 2008
                        // sometimes ID's unique name mechanism for sources fails; make sure the source has
                        // the same name as the hyperlink + '_src'
                        if (s != hyper.name + '_src')
                                  hyper.source.name = hyper.name + '_src';
                        if (hyper.destination.constructor.name == 'HyperlinkTextDestination'){
                                  s = getParentPageName(hyper.destination.destinationText);
                         } else {
                                   // try/catch added to allow for hyperlinks that have lost their destination -- Dave
                                   try {
                                              s = hyper.destination.destinationPage.name;
                                    } catch (e) { continue }
                        if (s != ''){
                                  // Check to see if update needed; saves a lot of time when processing large books -- Dave
                                  if (hyper.source.sourceText.contents != s) {
                                            hyper.source.sourceText.contents = s;
              if (d >= nrofdocs){
                        break;
              doc = app.open(app.books[0].bookContents[d].fullName);
    function getParentPageName(txt){
              try { 
                        var myFrame = getParentTextFrame(txt);
                        var pag = myFrame.parent;
                        while (pag.constructor.name != 'Page'){
                                  // in case the reference is in an inline, the parent of the frame is a character
                                  if (pag.constructor.name == 'Character'){
                                            pag = getParentTextFrame(pag);
                                  // in case the chain goes sour, back out
                                  if (pag.constructor.name == 'Application'){
                                            throw 'Error';
                                  pag = pag.parent;
                        return(pag.name);
              catch (e) {
                        alert('Could not catch page.\nCheck destination names and existence.');
                        return('');
    function getParentTextFrame(x){
              if(app.version == 3){
                        return(x.parentTextFrame);
              else {
                        return(x.parentTextFrames[0]);
    function errorExit(s){
              alert(s);
              exit();

  • Java script for Artwork

    Hi,
    Can anybody have the script code for checking the stroke, overprint, color for the completed artwork.I am in need of a script which should check the stroke weight, color of the objects, overprint. I just want to run this script after completing my artwork. I need this script to maintain consistency for my artworks. [Generally i use stroke weight of 0.5pt, Grayscale arts (sometimes color arts) ]. Can anybody suggest/have the script for this ?
    Thanks in advance,
    Bal

    Here is an example, which creates a list item and sets its column values:
    var siteUrl = '/sites/MySiteCollection';
    function createListItem() {
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Announcements');
    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = oList.addItem(itemCreateInfo);
    oListItem.set_item('Title', 'My New Item!');
    oListItem.set_item('Body', 'Hello World!');
    oListItem.update();
    clientContext.load(oListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded() {
    alert('Item created: ' + oListItem.get_id());
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    Source: https://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Scripting for different numbers of table rows in cs3

    As always thank you for the help.
    My question: is there a simple newbie way to script for stroke placements when the numbers of rows in the category between the stroke will vary. I have not even attempted to script this style, as frankly I don't know where to start, but here is an explanation of what I need:
    The table foodstuff contains:
    animal, vegetable, fruit
    Under animal there is:
    beef, lamb, pork, poultry
    Under vegetable there is:
    potato, pepper, onion
    Under fruit there is:
    orange
    If wanted a line under each category, ie after poultry, after onion, and after orange how would I go about it.
    Thank you to all who have helped me so far, either by reading answers to other people's queries, or by responding directly to my own

    Interesting ... I don't think there is a newbie-level answer to this challenge. It comes down to finding the first (left-to-right) cell that contains text, and adding a line on top of it all the way to the last cell in that row.
    Here's a first attempt:
    table = app.selection[0];
    if (table.hasOwnProperty("baseline"))
    table = table.parent;
    if (table instanceof Cell)
    table = table.parent;
    if (table instanceof Column)
    table = table.parent;
    if (table instanceof Row)
    table = table.parent;
    if (table instanceof Table)
    table.cells.everyItem().properties = {topEdgeStrokeWeight:0, bottomEdgeStrokeWeight:0, leftEdgeStrokeWeight:0, rightEdgeStrokeWeight:0};
    table.rows.lastItem().bottomEdgeStrokeWeight = 1;
    for (r=0; r<table.rows.length; r++)
      for (c=0; c<table.rows[r].cells.length; c++)
       if (table.rows[r].cells[c].contents)
        for (; c<table.rows[r].cells.length; c++)
         table.rows[r].cells[c].topEdgeStrokeWeight = 1;
        break;
    } else
    alert ("You were supposed to be somewhere inside a Table");

  • How to Enable Custom Java Scripts for forms in Planning 11.1.2.2

    I am working on Planning 11.1.2.2 right now.
    Planning admin guide says, there is no explicit requirement to enable java Script for planning forms.
    I set simple alert to see text "Hello World" in function validateForm() function in custom/validateData.js file - to see and test that alert when I save data for my selected application/form.
    Closed javascript file and workspace, and planning application web page. Since I have not to do anything new to enable this java script alert, I opened that form and saved data to see if I can see my alert.. I got no alert, except "data are saved".
    Has anything changed since last version? Am I missing something? Or, do I need to recycle services to get this alert?
    thanks in advance.

    Thanks guys, for your quick replies..!
    Not sure what I missed, but I still have a hard time finding my "Hello World" alert.
    What I did, is here.
    a. Cleared all cookies and temp files from IE.
    b. Updated validateData.js file from ear / war files using 7-zip program at given path from your link.
    c. Stopped EPM services
    d. Dropped tmp folder.
    e. Started EPM services and let system deploy ear file (with my java script code).
    All services are up. I can see EAR file deployed and java script file ValidateData.js has all my changes in new tmp folder now.
    I am able to open my application and form.
    But, my "Hello World" alert is still not appearing. Form is saved and saw message as usual.
    One exception I noticed in my path. I have ....user_projects\domains\EPMSystem\servers\EPMServer0\.... in place of ....user_projects\domains\EPMSystem\servers\Planning_0\.... in my path. Planning_0 is replaced by EPMServer0 in this version. Rest is all same.
    Any clue? thanks in advance,

Maybe you are looking for

  • User Settings are not saved

    Hello, I am setting the values in User settings. It is sucessfully changedand saved, but the changes are not appearing while creating the shopping cart. In pposa_bbp also the value is maintained as default. We are in SRM 5.0 classi scenario. Please l

  • N95 firmware upgrade

    would anyone happen to know when nokia will release there next firmware upgrade for the n95 i am currently running 12.0.013....just curious, and whats APAC how do u know if your n95 is APAC>. NOKIA N96 rocks

  • Using MBP as LCD Display.

    I just bought a VGA Cable for the Xbox 360 as I was planning on using my MBP as a HD TV. I plugged all the cables in and I was wondering how to show the 360. Can anyone help me.

  • No of RFC connections for a period of time

    Dear all, Is there any possibility to find the number of RFC connections hit to a server  over a certain period of time? I could not find any more details using AL08 since it gives the cumulative users rather than specific user type. Regards, Kumar E

  • My computer is not recognizing my ipod even being plugged in what do i do?

    my computer is not even recognizing my ipod is plugged in what do i do?