History Widget/Comment issue

284 views
Skip to first unread message

Terrence Glover

unread,
Jun 2, 2014, 11:58:52 PM6/2/14
to suppor...@runmyprocess.com
Hello,

I'm having some trouble with the history widget making the comment portion mandatory from some buttons in my form.

The code below I've loaded into the pre-launch script on the buttons I want comments to be mandatory for. When there is no comment and I click on the button I get a pop-up messages as expected. But when I enter comments and click the button nothing gets triggered.

Thanks in advance!

var comments = document.getElementsByClassName("AddAComment")[0].value

if (comments == "Add a comment" || comments == "") {
RMPApplication.showErrorBox("Action Required","Please Comment");
false;
}
else {
RMPApplication.showErrorBox("","Thank You");
true;
}



Terrence G.
IEEE IT

Abdellatif El Alaoui

unread,
Jun 4, 2014, 5:12:58 AM6/4/14
to suppor...@runmyprocess.com, t.gl...@ieee.org
hello, 

In order to do this, put an identifier to your History Widget for example : id_history and copy/paste this code : 

var comments = id_historique.getComment();
alert(comments);
if (comments == null) {
RMPApplication.showErrorBox("Action Required","Please Comment");
false;
}
else {
RMPApplication.showErrorBox("","Thank You");
true;
}


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/CAOVauyCx2AnQ0r0eWTeSv2mKVf-edFcJPFrhwYbkX82jwLmZFg%40mail.gmail.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.



--

Abdellatif EL ALAOUI

Customer Solution Engineer


Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.
Reply all
Reply to author
Forward
0 new messages