Is it possible to Display Popup box (Message Window or Dialog window )

chanikya
Tera Guru

Hi ,

it 's became hard challenge to me, i hope you will help me on this.

Issue:

When user is clicked on     YES or NO button in KB ARTICLE     then immediately     Make Comments box mandatory       OR     display Prompt box(message box) with message .

for this i tried to check UI Macro's(it is in readonly)   , UI pages   but   i am unable to understand where need to do changes.

At least please tell me is it possible or not to display POPUp box on article form

find_real_file.png

Need Rusult like this , not exactly like this, need this kind of format.

find_real_file.png

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Karthik,



I did find the Helpful message is out of box and here is the way you can add an alert on click of Yes.


Go to UI Macro -> search for XML contains Helpful? you should find this ui macro 'kb_view_ratings'.



within this UI macro you will see that a function feedback is being called on click of Yes search that and update as per below screenshot:



ui macro-know.JPG



Test it now.


Working fine screenshot below:



know-working.JPG


Remember that this will be a global change since this ui macro is applicable for all records.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi Chanikya,



Let me tell you how I found where to edit it. Lucky, this time everything was visible for us users. Sometimes you hit a deadend since it's points to stuff that we can't see and exists only in the famous black box and only for ServiceNow developer




You go to the article, you can see in the url that it's using the ui page "kb_view".


Now go to ui pages and find kb_view.



Looking here, you can understand that the code for the html isn't here, since to mostly just jelly code and javascript.


at the end you see a couple of g:inline. This pretty much means, insert ui macro here. Now the hunt begins. after looking through


the names, kb_view_common seems like a good place, so go to ui macro and find kb_view_common.



and in here.. there is more ui macros.. in the end, kb_view_common_body seem like a good try. lets see that



And another bunch of macros... kb_view_common_footer seems to be the place 😃



And in there.. you got a kb_view_ratings.... lets head there



And here it is... here you can manipulate what happens when you press "yes or no".


Hey Goran,



Could you suggest me what are the function lines of code I have to right here.



Really to say I don't have knowledge on UI Macros.



That make understand me


Hi Karthik,



I have answered similar question in below link. It should be helpful to you:


How to Display POP-UP Box [ Message Box] when we click on Button



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Karthik,



Any update on this?


Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.



Regards


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader