Skip navigation
1 2 Previous Next 3235 Views 16 Replies Latest reply: Sep 21, 2013 10:26 PM by dmshimself RSS
Nic Apprentice 56 posts since
Mar 31, 2010

Has received 1 of 9 achievements.
Currently Being Moderated

May 9, 2011 7:35 AM

Pop Ups

Does anyone know of any way to set a flag on a user which will produce a "pop up" when raising an incident in that user's name?

 

Thanks

Nic

  • dmshimself ITSMMVPGroup 2,248 posts since
    Dec 16, 2007

    Has received 7 of 9 achievements.
    Currently Being Moderated
    1. May 9, 2011 3:03 PM (in response to Nic)
    Re: Pop Ups

    You can write a calcualtion that does this but it will only work in Console, not webaccess.  I can dig this out if that would work for you?  We use it to indicate if the raise user is a VIP.

  • dmshimself ITSMMVPGroup 2,248 posts since
    Dec 16, 2007

    Has received 7 of 9 achievements.
    Currently Being Moderated
    3. May 10, 2011 5:01 AM (in response to Nic)
    Re: Pop Ups

    The calculation itself is pretty simple

     

    #VIP Alert#
    #BeforeSave#
    #Dependecy on raise user#
    import System
    import System.Windows.Forms
    static def GetAttributeValue(Incident):
    Value = ''
    Value = Incident.RaiseUser._CustomerFlag1._CustomerFlag
    if Value == 'VIP':  MessageBox.Show("Incident comes from VIP", "VIP Alert",MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
    return Value

     

    My attribute is on the incident object with this calculation is called Alert.  Note my use of manual dependencies here.  YMMV on the type of list or checkbox you have on raise user to detect if someone is such a person. I return this value so it can be painted on the screen as well.

     

    On the incident window itself, set the property for the attribute (Alert in my case) to have 'Is calculate on change' set to be true.

     

    I'd exit/go back in/iis reset and if all else fails reach for the TPS trace diagnostics!

  • dmshimself ITSMMVPGroup 2,248 posts since
    Dec 16, 2007

    Has received 7 of 9 achievements.
    Currently Being Moderated
    5. May 11, 2011 2:47 AM (in response to Nic)
    Re: Pop Ups

    I understand.  Get Stus diagnostic guide handy and start with something simple!  I managed to get this implemented hands free at another site of ours, so you are in good company.

  • Stu McNeill SupportEmployee 1,072 posts since
    Nov 11, 2008

    Has received 7 of 9 achievements.
    Currently Being Moderated
    7. May 11, 2011 6:40 AM (in response to Nic)
    Re: Pop Ups

    I think Dave is referring to my calculation troubleshooting document here: Calculations: A general guide to troubleshooting.

  • elizabethcombrink Employee 473 posts since
    Dec 19, 2008

    Has received 6 of 9 achievements.
    Currently Being Moderated
    8. Mar 23, 2012 3:37 AM (in response to dmshimself)
    Re: Pop Ups

    Just to say that got an error message when trying to compile DMS's calculation until I spotted that the "import System.Windows.Forms" in the example which is not in the standard basic calc.  Then I was able to save the calculation.

     

    I was not however able to get it to work to generate a popup box - but I was trying to do it on a window to add a new collection item.

     

    And I'd think long and hard before exploring this more unless the popup actually works in WebDesk as well :-)

  • darren.bradshaw@durham.gov.uk Apprentice 54 posts since
    Nov 23, 2009

    Has received 1 of 9 achievements.
    Currently Being Moderated
    9. Mar 23, 2012 11:30 AM (in response to dmshimself)
    Re: Pop Ups

    We used the example Dave gave and it worked on our VIP Type Field, just to test the concept.

     

    We then tried this on the category field, so if a certain category is selected the analyst gets a popup window on their screen asking them something.

     

    Here is the code we used:

     

    import System
    import System.Windows.Forms
    static def GetAttributeValue(Incident):
    Value = ''
    Value = Incident.Category.FullName
    if Value == 'Fault - Hardware - Miscellaneous' or Value == 'Fault - Network - Miscellaneous' or Value == 'Fault - Software - Miscellaneous':  MessageBox.Show("Are you sure you need to use a Miscellaneous Category?" + "\n" + "\nHave you checked the other Categories?", "Incident Category",MessageBoxButtons.OK, MessageBoxIcon.Question)
    return Value

     

    We are looking into how we can use this on other categories and other fields.

     

    One thing we had to do though was to add the Calculation Handler (OnValueChanged) for the category field.

     

    I have attached another example.

    Attachments:
  • dmshimself ITSMMVPGroup 2,248 posts since
    Dec 16, 2007

    Has received 7 of 9 achievements.
    Currently Being Moderated
    10. Mar 25, 2012 4:25 AM (in response to elizabethcombrink)
    Re: Pop Ups

    Pop ups don't work in webdesk as far as I know Elizabeth :-(

  • hewy06 Expert 293 posts since
    Nov 8, 2010

    Has received 7 of 9 achievements.
    Currently Being Moderated
    11. Sep 17, 2013 9:13 AM (in response to dmshimself)
    Re: Pop Ups

    Hi Dave

     

    After stealing your code and a lot of faffing about finally have managed to get this to work.  It's brilliant , however am I doing something wrong as the OK on the popup box has to be clicked 3 times before it goes away???  No doubt it's me having done something completely stupid.

     

    Thanks

     

    Helen

  • dmshimself ITSMMVPGroup 2,248 posts since
    Dec 16, 2007

    Has received 7 of 9 achievements.
    Currently Being Moderated
    12. Sep 17, 2013 6:17 PM (in response to hewy06)
    Re: Pop Ups

    Nothing springs to mind I'm afraid Helen.  I do have at least one client using this method, although they are migrating quite rapidly to WebDesk and hence have accepted this will not work any more.  About all I can think of is that for some reason the calculation is being fired off several times.  Perhaps a window copy rule into the same attribute with always execute set?  I'd turn on calcualtion diagnostics in the framework and see if that gives any clues.

  • hewy06 Expert 293 posts since
    Nov 8, 2010

    Has received 7 of 9 achievements.
    Currently Being Moderated
    13. Sep 19, 2013 4:12 AM (in response to dmshimself)
    Re: Pop Ups

    Hi Dave

     

    I had a copy rule set to always execute.  I've removed the always execute and now it's down to twice.  On my user window I have a boolean attribute (True/False) which is used to indicate whether the user is a VIP or not and then a copy rule to copy this info to a string attribute - think it was set up this way for the Incident matrix.  Anyhoo when I was setting up the calculation for the pop-up I tried to get it to query the VIP boolean attribute but it wouldn't work.  As soon as I got it to look at the string it worked but I have to ok the pop-up twice. 

     

    For your customer is it a boolean attribute you're checking in the calculation?  Should I be able to use a boolean??

     

    As always thanks for the help

     

    H

  • dmshimself ITSMMVPGroup 2,248 posts since
    Dec 16, 2007

    Has received 7 of 9 achievements.
    Currently Being Moderated
    14. Sep 19, 2013 3:39 PM (in response to hewy06)
    Re: Pop Ups

    1 down and 2 to go then :-)  Sounds like the Americas cup (go NZ Go!)

     

    In my case there is a drop down list on the customer table as that allows for different levels of VIP-ness

1 2 Previous Next

More Like This

  • Retrieving data ...

Bookmarked By (5)

Legend

  • Correct Answers - 20 points
  • Helpful Answers - 10 points
LANDESK Community powered by Jive SBS® 4.5.7.1  |  Legal Notices  |  Privacy Policy  |  Icon 

TweeterOn Twitter  |  Icon FacebookOn Facebook © 2007 LANDESK Software