Popup message for specific field (812 Views)
Reply
Highlighted
Advisor
Posts: 33
Registered: ‎07-24-2014
Message 1 of 6 (812 Views)
Accepted Solution

Popup message for specific field

Hello,

My client wants SM9.3 to pop up a warning as an incident or request is being created for a specific location.

For more details kindly view the attachement.


Can anyone help?

Honored Contributor
Posts: 3,987
Registered: ‎07-13-2007
Message 2 of 6 (797 Views)

Re: Popup message for specific field

[ Edited ]

Note that you cannot force the field-help to popup and the message will be popup window, and not look like field help.

 

You can assign a data-changed event to that form object. A data changed event is really just a display option that is called whenever the data in a field changes.

 

Step 1: Add the display option for Incident Open:

  1. The display screen for opening an incident (assuming non-Process Designer) is apm.first (it is in the lower right corner of the screen in your screen shot). 
  2. We need to add a display option for that display screen. Type do in the command bar, press enter.
  3. Enter apm.first in the screen name field.
  4. In the Display Option ID field enter apm.first_customer_name_locale_pop or something like that.
  5. Select "do nothing" in the upper right combo box.
  6. Enter GUI ID 888, In bank, enter 1. In the other one nearby  enter 5 (I'm not at an SM system, ....). If another display option is already using this number, then use somehting else (you'll need to use the same value in step 3 of the next section).
  7. In the Condition field, enter location in $L.filed="LOCATION X" where "LOCATION X" is the name of the location for which you want the warning to display.
  8. On the Pre-RAD exressions tab, enter the following: $L.message="The message you would like to display" with the quotation marks.
  9. On the RAD tab, enter mb.ok as the RAD application. Then enter text in the parameters list, and $L.message in the values list.
  10. Save. I may have forgotten a field, it you get a prompt the update as needed.

Step 2: Update the open incident format:

  1. In forms designer, search for IM.open.incident (or your custom form).
  2. Enter design mode, and select the location comfill object.
  3. In the properties for the comfill, enter 888 in the Data Changed Event property.
  4. Click OK to exit design mode.
  5. Click OK to save changes.

Step 3: Test

Open a new incident.

Change the location to "LOCATION X"

A popup window should display. The user must click OK to dismiss the popup.

 

The popup may not appear until you mouse outside of the field (this varies). 

 

Repeat for the Request Open display screen and associated format.

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
Advisor
Posts: 33
Registered: ‎07-24-2014
Message 3 of 6 (790 Views)

Re: Popup message for specific field

thank you john ....
what i need when choose specific location to give me a message that i pre-define .and if i choose another location didn't show up the message.
Honored Contributor
Posts: 3,987
Registered: ‎07-13-2007
Message 4 of 6 (776 Views)

Re: Popup message for specific field

[ Edited ]

Yes, that is what the above configuration will do. 

 

Line 7 above:

In the Condition field, enter location in $L.filed="LOCATION X" where "LOCATION X" is the name of the location for which you want the warning to display.

You will replace "LOCATION X" with the location that requires the warning. (The form field may be location.code, not location, so adjust accordingly. You must use the fieldname, not the caption value.)

--If the user selects the super-special location, the display option condition will evaluate to TRUE and the message code will execute and a popup message will display.

--If the user selects any other location, the display option condition will evaluate to FALSE and the display option will not execute, and no message will display.

 

Line 8 above:

On the Pre-RAD exressions tab, enter the following: $L.message="The message you would like to display" 

You will replace the message text in the quotes with the message you want.

 


Do not copy/paste from here. Type the data manually when making the modifications. 

Pasting content from websites, Word, Excel, etc. often includes invisible characters that will not parse correctly at runtime and will prevent code from executing in SM.

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
Advisor
Posts: 33
Registered: ‎07-24-2014
Message 5 of 6 (740 Views)

Re: Popup message for specific field

thank you john i will apply it and get back to you....thank you very much.
Advisor
Posts: 33
Registered: ‎07-24-2014
Message 6 of 6 (706 Views)

Re: Popup message for specific field

Thank you john i tried your solution and it worked if i follow the below steps:

1-chose the contacts 

 

2-remove the association location which assigned to the contact

3- left the site(location) filed empty.

4-trying to close the incident screen using (X) sign then the message will be appeared.

 

So could you please help me if you have solution for the below scenario :

When choose a contacts that he has "X location" view the popup message.

 

Kindly view the attachment.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.