Monday, February 28, 2011

Highlighting Cells Containing Specific Text

=NOT(ISERR(SEARCH("RUNNING",A1)))



You can use the conditional formatting feature in Excel to help draw attention to cells that contain specific text in which you are interested. For instance, if you have a range of cells and you want to know which ones contain the letters "shawn," then you can do the following in versions of Excel prior to Excel 2007:

Select the range of cells.
Choose Conditional Formatting from the Format menu. Excel displays the Conditional Formatting dialog box. (Click here to see a related figure.)
In the drop-down Condition list, choose "Formula Is".
In the formula box, enter the following formula. (Make sure you replace A1 with the cell address of the cell in the upper-left corner of the range selected in step 1.)
=NOT(ISERR(SEARCH("Shaw",A1)))
Click on Format. Excel displays the Format Cells dialog box. (Click here to see a related figure.)
Using the controls in the dialog box, specify a format that you want used for those cells that contain the specified text. For instance, you may want bold text in a red typeface.
Click on OK to close the Format Cells dialog box.
Click on OK to close the Conditional Formatting dialog box.
If you are using Excel 2007 then you should follow these steps, instead:

Select the range of cells.
With the Home tab of the ribbon displayed, click the Conditional Formatting option in the Styles group. Excel displays a palette of options related to conditional formatting.
Choose Highlight Cells Rules and then choose More Rules from the resulting submenu. Excel displays the New Formatting Rule dialog box.
In the Select a Rule Type area at the top of the dialog box, choose Use a Formula to Determine Which Cells to Format. (Click here to see a related figure.)
In the Format Values Where This Formula Is True box, enter the following formula. (Make sure you replace A1 with the cell address of the cell in the upper-left corner of the range selected in step 1.)
=NOT(ISERR(SEARCH("Shaw",A1)))
Click Format to display the Format Cells dialog box.
Using the controls in the dialog box, specify a format that you want used for those cells that contain the specified text. For instance, you may want bold text in a red typeface.
Click OK to dismiss the Format Cells dialog box. The formatting you specified in step 7 should now appear in the preview area for the rule.
Click OK.
You can make this approach even more general-purpose in nature by specifying a cell that contains what you want to search for. For instance, if you type "Shaw" in cell F7, then you could replace the formula in step 4 or step 5 with the following:

=NOT(ISERR(SEARCH($F$7,A1)))
Now, you can search for something different just by changing the characters in cell F7.



REF: http://excel.tips.net/Pages/T002671_Highlighting_Cells_Containing_Specific_Text.html

Friday, February 25, 2011

View SQL ran in Maximo Logs

GOTO > System Configuration > Platform Configuration > Logging

Search for SQL

Change log4j.logger.maximo.sql Log Level to DEBUG

Log Level:DEBUG
key:log4j.logger.maximo.sql
Inherited Appenders: Console,Rolling

Hit SAVE
then Apply Changes

Thursday, February 24, 2011

Import a Report Design File into Maximo

1) GOTO > Administration > Reporting > Reporting Administration

2) Search for and select wms_woprint.rptdesign
3) Select Action Import Report
4) Upload to Report Design File
5) OK on override message
6) OK on the Resource file message

7) Verify all the settings and update them as below

Limit Rec? - checked
Max Rec Limit - 200
Priority - 2
Toolbar Seq - 4
Browser view - checked
Browser loc - ALL
Direct Print - checked
Drct Prnt loc - All
Drct Prnt atch - checked
Drct Prnt atch loc - All

8) Press the Generate Request pages button
9) SAVE

Wednesday, February 9, 2011

Scheduled Task to keep Business Objects Up

If you have issues with your BO server falling over durning hours, Setup a Scheduled Task in windows to Start the "Central Management Server" every few hours.

Run: C:\WINNT\system32\net.exe start "Central Management Server"

Start in: C:\WINNT\system32

Run as: 'service account of some kind'

Wednesday, February 2, 2011

Rename Log files with unique name when greater than a certin size

@echo off

::Set vars
SET LOGFILE=\\\SUPPORT\LOGS\log.txt
SET LOGNAME=log

:CHECK_FILE
:: Create file if does not exist
IF EXIST %LOGFILE% (goto:CHECK_SIZE) ELSE (
echo Created %DATE% > %LOGFILE%
goto:CHECK_FILE
)

:CHECK_SIZE
FOR %%? IN (%LOGFILE%) DO (SET FILESIZE=%%~z?)
::Check if less than 10kb
If %FILESIZE% LSS 10000 (
GOTO:EOF
)
::Check if greater than 10kb, if so rename to unique name
If %FILESIZE% GTR 10000 (
ren %LOGFILE% "%LOGNAME%-%date:~4,2%-%date:~7,2%-%date:~10%-%time:~0,2%%time:~3,2%%time:~6,2%"
pause
echo Created %DATE% > %LOGFILE%
)
GOTO:EOF

Rename the file using the current system date

Here's how you'd rename the file using the current system date.

ren test.txt test%date:~4,2%-%date:~7,2%-%date:~10%.txt

or even better

ren test.txt test-%date:~4,2%-%date:~7,2%-%date:~10%-%time:~0,2%%time:~3,2%%time:~6,2%.txt

:Unique - returns a unique string based on a date-time-stamp, YYYYMMDDhhmmsscc

:Unique - returns a unique string based on a date-time-stamp, YYYYMMDDhhmmsscc

:Unique ret -- returns a unique string based on a date-time-stamp, YYYYMMDDhhmmsscc
:: -- ret [out,opt] - unique string
:$created 20060101 :$changed 20080219 :$categories StringOperation,DateAndTime
:$source http://www.dostips.com


SETLOCAL
for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('"echo.|date"') do (
for /f "tokens=1-3 delims=/.- " %%A in ("%date:* =%") do (
set %%a=%%A&set %%b=%%B&set %%c=%%C))
set /a "yy=10000%yy% %%10000,mm=100%mm% %% 100,dd=100%dd% %% 100"
for /f "tokens=1-4 delims=:. " %%A in ("%time: =0%") do @set UNIQUE=%yy%%mm%%dd%%%A%%B%%C%%D
ENDLOCAL & IF "%~1" NEQ "" (SET %~1=%UNIQUE%) ELSE echo.%UNIQUE%
EXIT /b

DOS BATCH - (Read File Properties)

http://www.robvanderwoude.com/battech_fileproperties.php


Many times we need to check a file's size, its last-modified date, its location, or we may require its fully qualified path in short (8.3) notation.

Arguably CMD's most versatile internal command to the rescue: FOR.

FOR %%? IN (file_to_be_queried) DO (
ECHO File Name Only : %%~n?
ECHO File Extension : %%~x?
ECHO Name in 8.3 notation : %%~sn?
ECHO File Attributes : %%~a?
ECHO Located on Drive : %%~d?
ECHO File Size : %%~z?
ECHO Last-Modified Date : %%~t?
ECHO Parent Folder : %%~dp?
ECHO Fully Qualified Path : %%~f?
ECHO FQP in 8.3 notation : %%~sf?
ECHO Location in the PATH : %%~dp$PATH:?
)
pause


Note: Not all of these properties can be read this way in every Windows version. With every new Windows version, more options became available.
Type FOR /? for more details.

Many of these properties can be combined, as is shown for the s option (short, or 8.3 notation).

Play with it, experiment, and learn. Have fun.