Announcement

Collapse
No announcement yet.

The Front Page

Collapse

vBulletin 4.0 Publishing Suite with CMS

  • Filter
  • Time
  • Show
Clear All
new posts

  • New book by Mike Sanders: Service Manager 9 Tailoring Techniques

    New book by Mike Sanders: Service Manager 9 Tailoring Techniques

    Check it out. Click on the image.

    ...
    See more | Go to post

  • Templates in Problem Management

    Templates in Problem Management

    Someone asked this question in the forums, and I thought this was a good topic to cover. SM has good potential to use Templates, and theoretically has the ability to use that in any module - including completely customized ones. But ironically enough, while some of the groundwork is there to enable Templates on the Problem Management module, it's like HP stopped part way through development and never finished it. So, this sounded like a good place to go through how to enable Templates for Problem Management. There are a couple of ScriptLibrary scripts at the heart of Templates in Service Manager; Template, TemplateFilter, and TemplateTables. I didn't write those at all, and this is just my understanding of how they work based on what they seem to do. The first step is the simpl...
    See more | Go to post

  • Kill User Sessions without being SysAdmin

    Kill User Sessions without being SysAdmin

    I've seen a question like this float around this forum and that other forum (http://forums13.itrc.hp.com/service/...categoryId=695) and it seemed like something that should be possible, and should be included OOB, but for some reason, was never done.

    Let's say you have a user call your Helpdesk group, because they've somehow managed to lock themselves out of Service Manager, and the helpdesk needs to kill that user's session. You don't want to give the Helpdesk access to the System Status where they can do all kinds of harm, but they do need to be able to kill a session. This is my attempt at a solution.

    (I had wanted to do the coding for this in Javascript, but I had a hard time with the structured arrays... so good old-fashioned expressions is what I ended up using.)

    You're going to create one link record, two forms, and three wizard records to accomplish this. You'll also need to put this on a menu so your users can access it. For my purposes, we'll just use the HOME menu, but feel free to make whatever modifications you need.

    First, we'll start with the two forms.
    The first provides a place for your operator to enter which user to kill.

    Form Name: cg.KillUserSessions.User
    Form Element: Label
    Caption: User ID:

    Form Element: Comfill
    Input: $cg.user.id
    Fill Button Visible: true

    Form Element: Comfill
    Input: $cg.user.name
    Fill Button Visible: true

    The second form, is a mimic of the System Status, with information about the specific user's session(s).

    Form Name: cg.KillUserSessions.Sessions
    Form Element: Table
    Columns: Kill, User ID, Date, Idle Time, PID, Host
    Show Columns: true

    Form Element: Column
    Column Title: Kill
    Input: $cg.killSession

    Form Element: Column
    Column Title: User ID
    Input: $cg.sessionInfo.user
    Read Only: true

    Form Element: Column
    Column Title: Date
    Input: $cg.sessionInfo.date
    Read Only: true

    Form Element: Column
    Column Title: Idle Time
    Input: $cg.sessionInfo.idle
    Read Only: true

    Form Element: Column
    Column Title: PID
    Input: $cg.sessionInfo.pid
    Read Only: true

    Form Element: Column
    Column Title: Host
    Input: $cg.sessionInfo.host
    Read Only: true


    Then the link - this is just so users can enter either an operator ID or a user's full name, to bring the ID back for the rest of the wizard.

    Link Name: cg.KillUserSessions.User
    -----------------------------------------------------
    Source Field: $cg.user.id
    Target File: operator
    Target Field: name
    Query: $query
    Expressions -
    if (not null($cg.user.id)) then ($query="name=\"+$cg.user.id+"\"")

    Source Field | Target Field
    $cg.user.id | name
    $cg.user.name | full.name
    -----------------------------------------------------
    Source Field: $cg.user.name
    Target File: operator
    Target Field: full.name
    Query: $query
    Expressions -
    if (not null($cg.user.name)) then ($query="full.name=\""+$cg.user.name+"\"")

    Source Field | Target Field
    $cg.user.id | name
    $cg.user.name | full.name


    Then, the meat of the work, are the three wizards.

    The first gets the information about who is going to be killed, and checks to make sure that user is logged in to SM. Once we get the operator id, the system gathers information about that operator, like the time they logged in, how long they've been idle, etc.

    Wizard Name: cg.KillUserSession.1
    Start Node: true
    Window Title: Kill User Session
    Title: Select User:
    Prompt: Enter the User ID or the User Name of the user whose session you want to kill.

    File Selection -
    Select $L.file by: No $L.file (use typecheck)
    Wizard Usage -
    Request User Input
    Subformat to display: cg.KillUserSessions.User
    Actions -
    Perform Actions On: Current File ($L.file) Actions to Perform: Expressions: $L.processes=processes("USER");$cg.sessionInfo.user={};$cg.sessionInfo.date={}; $cg.sessionInfo.idle={};$cg.sessionInfo.pid={};$cg .sessionInfo.name={};$cg.sessionInfo.id={} $cg.i=0;while ($cg
    ...
    See more | Go to post

  • SQL - How to find columns that have not been used

    SQL - How to find columns that have not been used

    Have you ever been asked to add a new column to a table and wondered if there is a column already there that is not being used?

    I have come across this a few times and not been able to find anything that answers my question.
    So i have written some T-SQL code that looks over your table and asks if any column contains only NULL values.
    This will help to decide whether you can use an existing column, instead of expanding your schema.

    Note: Of course, you should always test using an existing field thoroughly in a test environment to make sure there are no adverse effects.

    Firstly you need a table to store your results, so select your test SM7 database and open a new query window:

    Code:
        CREATE TABLE temp2 (
        [columnName] [va
    ...
    See more | Go to post
There are no articles in this category.
  • Filter
  • Time
  • Show
Clear All
new posts
Please log in to your account to view your subscribed posts.

Categories

Collapse

Article Tags

Collapse

Latest Articles

Collapse

  • Globicon Selvbetjening
    tommy
    2014-04-10, 17:17
  • Forumrunner now supported
    tommy
    You can now access ServiceCenter Resources on your smartphone (iPhone / Android) through Forumrunner.

    http://forumrunner.com/
    2012-05-04, 14:47
  • New book by Mike Sanders: Service Manager 9 Tailoring Techniques
    tommy
    Check it out. Click on the image.

    ...
    2012-01-10, 10:32
  • SMHTMLemail - send html formatted emails from ServiceCenter / ServiceManager
    tommy
    With this application you will be able to

    - send nice formatted emails in both html and plain text format
    - easily add new templates
    - send emails with different from addresses
    2011-01-27, 20:25
  • Templates in Problem Management
    Jacob.Heubner
    Someone asked this question in the forums, and I thought this was a good topic to cover. SM has good potential to use Templates, and theoretically has the ability to use that in any module - including completely customized ones. But ironically enough, while some of the groundwork is there to enable Templates on the Problem Management module, it's like HP stopped part way through development and never finished it. So, this sounded like a good place to go through how to enable Templates for Problem Management. There are a couple of ScriptLibrary scripts at the heart of Templates in Service Manager; Template, TemplateFilter, and TemplateTables. I didn't write those at all, and this is just my understanding of how they work based on what they seem to do. The first step is the simpl...
    2010-09-15, 06:14
  • Kill User Sessions without being SysAdmin
    Jacob.Heubner
    I've seen a question like this float around this forum and that other forum (http://forums13.itrc.hp.com/service/...categoryId=695) and it seemed like something that should be possible, and should be included OOB, but for some reason, was never done.

    Let's say you have a user call your Helpdesk group, because they've somehow managed to lock themselves out of Service Manager, and the helpdesk needs to kill that user's session. You don't want to give the Helpdesk access to the System Status where they can do all kinds of harm, but they do need to be able to kill a session. This is my attempt at a solution.

    (I had wanted to do the coding for this in Javascript, but I had a hard time with the structured arrays... so good old-fashioned expressions is what I ended up using.)

    You're going to create one link record, two forms, and three wizard records to accomplish this. You'll also need to put this on a menu so your users can access it. For my purposes, we'll just use the HOME menu, but feel free to make whatever modifications you need.

    First, we'll start with the two forms.
    The first provides a place for your operator to enter which user to kill.

    Form Name: cg.KillUserSessions.User
    Form Element: Label
    Caption: User ID:

    Form Element: Comfill
    Input: $cg.user.id
    Fill Button Visible: true

    Form Element: Comfill
    Input: $cg.user.name
    Fill Button Visible: true

    The second form, is a mimic of the System Status, with information about the specific user's session(s).

    Form Name: cg.KillUserSessions.Sessions
    Form Element: Table
    Columns: Kill, User ID, Date, Idle Time, PID, Host
    Show Columns: true

    Form Element: Column
    Column Title: Kill
    Input: $cg.killSession

    Form Element: Column
    Column Title: User ID
    Input: $cg.sessionInfo.user
    Read Only: true

    Form Element: Column
    Column Title: Date
    Input: $cg.sessionInfo.date
    Read Only: true

    Form Element: Column
    Column Title: Idle Time
    Input: $cg.sessionInfo.idle
    Read Only: true

    Form Element: Column
    Column Title: PID
    Input: $cg.sessionInfo.pid
    Read Only: true

    Form Element: Column
    Column Title: Host
    Input: $cg.sessionInfo.host
    Read Only: true


    Then the link - this is just so users can enter either an operator ID or a user's full name, to bring the ID back for the rest of the wizard.

    Link Name: cg.KillUserSessions.User
    -----------------------------------------------------
    Source Field: $cg.user.id
    Target File: operator
    Target Field: name
    Query: $query
    Expressions -
    if (not null($cg.user.id)) then ($query="name=\"+$cg.user.id+"\"")

    Source Field | Target Field
    $cg.user.id | name
    $cg.user.name | full.name
    -----------------------------------------------------
    Source Field: $cg.user.name
    Target File: operator
    Target Field: full.name
    Query: $query
    Expressions -
    if (not null($cg.user.name)) then ($query="full.name=\""+$cg.user.name+"\"")

    Source Field | Target Field
    $cg.user.id | name
    $cg.user.name | full.name


    Then, the meat of the work, are the three wizards.

    The first gets the information about who is going to be killed, and checks to make sure that user is logged in to SM. Once we get the operator id, the system gathers information about that operator, like the time they logged in, how long they've been idle, etc.

    Wizard Name: cg.KillUserSession.1
    Start Node: true
    Window Title: Kill User Session
    Title: Select User:
    Prompt: Enter the User ID or the User Name of the user whose session you want to kill.

    File Selection -
    Select $L.file by: No $L.file (use typecheck)
    Wizard Usage -
    Request User Input
    Subformat to display: cg.KillUserSessions.User
    Actions -
    Perform Actions On: Current File ($L.file) Actions to Perform: Expressions: $L.processes=processes("USER");$cg.sessionInfo.user={};$cg.sessionInfo.date={}; $cg.sessionInfo.idle={};$cg.sessionInfo.pid={};$cg .sessionInfo.name={};$cg.sessionInfo.id={} $cg.i=0;while ($cg
    ...
    2010-08-04, 21:29
Working...
X