How to Capture a list prompt value

365 views
Skip to first unread message

mosa.gh...@gmail.com

unread,
Nov 20, 2016, 9:40:17 AM11/20/16
to Fujitsu RunMyProcess Developer Community

Hello,

I have a list with Prompt "Select an item" , I am trying to set my list as required (Mandatory field) when the user select "Select an item" (prompt), to enforce user to select another value.

Could you please assist me to capture the prompt value in that list(When the user select ("Select an item")(Prompt).


P.S I tried with == null but with no luck , dose not work.

Pankaj Kumar

unread,
Nov 20, 2016, 11:09:01 AM11/20/16
to Fujitsu RunMyProcess Developer Community
Hi Mousa,

Please try belowcondition to check if any value is selected in the list or not:-

id_list.getSelectedLabel() == "Select an item"

Note:- "Select an item" is the prompt value given in the List.


Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://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/72e6f3bd-7cb2-4375-81fb-f8cf97e2c8d4%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

mosa.gh...@gmail.com

unread,
Nov 21, 2016, 3:16:00 AM11/21/16
to Fujitsu RunMyProcess Developer Community
On Sunday, November 20, 2016 at 6:09:01 PM UTC+2, Pankaj Kumar wrote:
> Hi Mousa,
>
>
> Please try belowcondition to check if any value is selected in the list or not:-
>
>
> id_list.getSelectedLabel() == "Select an item"
>
>
> Note:- "Select an item" is the prompt value given in the List.
>
>
>
>
>
>
>
> Thank you,
> Pankaj Kumar
> Fujitsu RunMyProcess Support
>
>
> On Sun, Nov 20, 2016 at 8:10 PM, <mosa.gh...@gmail.com> wrote:
>
>
> Hello,
>
>
>
> I have a list with Prompt "Select an item" , I am trying to set my list as required (Mandatory field) when the user select "Select an item" (prompt), to enforce user to select another value.
>
>
>
> Could you please assist me to capture the prompt value in that list(When the user select ("Select an item")(Prompt).
>
>
>
>
>
> P.S I tried with == null but with no luck , dose not work.
>
>
>
> --
>
> Fujitsu - RunMyProcess
>
> ---
>
> You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.

mosa.gh...@gmail.com

unread,
Nov 21, 2016, 3:29:11 AM11/21/16
to Fujitsu RunMyProcess Developer Community
Hello Pankaj,

I can now capture the promt for my list by deleteing the prompt and fill "Select an item" in the list as below :

a=new RMP_List();
a.addItem("Select an item","Select an item");

However, Now I can capture "Select an item" value , and set the list required if the user select it , But unfortunately the user can go to the next activity and stamp the form, although that this value is mandatory .

My Question is how to prevent the user to stamp the form and go to the next activity when they select "Select an item"?

Best Regards,

Mousa Gharaibeh
Analyst , Business Process Automation
SITA

E-Mail: Mousa.G...@sita.aero
Direct: +9625805928
CVS: 7299 5928
Mobile: +962796579097
Address: SITA | Bldg #2 | King Hussien Business Park | King Abdullah Street | Amman | Jordan

Pankaj Kumar

unread,
Nov 21, 2016, 4:22:03 AM11/21/16
to Fujitsu RunMyProcess Developer Community
Hi Mousa,

Please use below method to make a mandatory value.

id_list.setRequired("booleanValue");  // true or false

Reference Link:-

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

mosa.gh...@gmail.com

unread,
Nov 21, 2016, 6:12:17 AM11/21/16
to Fujitsu RunMyProcess Developer Community
Hi Pankaj,

As I told you, I already used this function, But unfortunately does not prevent user from stamping the form and go to the next activity, Although that the red start has appeared beside the list, but does not appear any message that show this field is required to prevent the user from stamping the form.

Your help is highly appreciated.

mosa.gh...@gmail.com

unread,
Nov 23, 2016, 8:28:14 AM11/23/16
to Fujitsu RunMyProcess Developer Community, mosa.gh...@gmail.com
Hi Pankaj,

Any Update?

Pankaj Kumar

unread,
Nov 23, 2016, 11:26:08 PM11/23/16
to Fujitsu RunMyProcess Developer Community
Hi Mousa,

Since you are using:-

a=new RMP_List();
a.addItem("Select an item","Select an item"); // prompt is deleted.


when you are setting setRequired to true, so List becomes a mandatory field and user already selected a value ("Select an item"), it pass the validation and user is able to submit the form.

Please update "List" validation rule to invalidate the "Select an item" selection. Please refer to attach screen-print for more details.


 Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

Hi Pankaj,

Any Update?
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
1.png
2.png
3.png

mosa gharaibeh

unread,
Nov 27, 2016, 5:09:50 AM11/27/16
to RunMyProcess Support Forum
Hello Pankaj,

I have just tested and it's not working, What I am experiencing now that the setrequired script working for all cases so I can not stamp the form , kindly find the below:

Inline image 1

Please advise.

Best Regards,

 

Mousa Gharaibeh                                                                                                                                  

Analyst , Business Process Automation                                                                                                

SITA                                                                                                                                               




You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/u_-CDuhonfI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.



--
 
 
 
 
Regrads,
Mousa Gharaibeh

Pankaj Kumar

unread,
Nov 27, 2016, 5:22:33 AM11/27/16
to Fujitsu RunMyProcess Developer Community
Hi Mousa,

Kindly share the script you are using for validation.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

mosa gharaibeh

unread,
Nov 27, 2016, 7:37:26 AM11/27/16
to RunMyProcess Support Forum
Hi Pankaj,

Thanks a lot for your support , it's working fine now.

Sorry I missed ")"  :-)

Best Regards,

 

Mousa Gharaibeh                                                                                                                                  

Analyst , Business Process Automation                                                                                                

SITA                                                                                                                                              

 

E-Mail:       Mousa.G...@sita.aero                                                                                                                                                             

Direct:        +9625805928

CVS:             7299 5928

Mobile:      +962796579097

Address:  SITA | Bldg #2 | King Hussien Business Park  | King Abdullah Street | Amman | Jordan




--
 
 
 
 
Regrads,
Mousa Gharaibeh

mosa gharaibeh

unread,
Dec 4, 2016, 9:15:50 AM12/4/16
to RunMyProcess Support Forum
Hello Pankaj,

I have another scenario now , I have to connect the above code with the below scenario :

we have a list (Valid Request and Junk Request), if the user has selected the Valid request then the sub process should be required as we implemented the above code (Working perfect), now the other scenario it's not working (if the user has selected a Junk Request, then they can not proceed because (Sub process is already set to required (The above implemented code), So My Question is : how to set the sub process list is  unrequired when the user has select Junk Request??

I already implemented the below code, but with no luck (it's working perfect when the user has selected the Junk request direct, but if the user has selected a valid request then change to junk for example , since that the subprocess has set to required , then he can not proceed and stamp the form , since that the subprocess list has set to required  

"
function valida(PP)
{
if("[[pv_RequestType]]"=="Valid")
{
if(PP == null || PP == ""|| PP =="Select an item")
{
return false;
alert("false");
}
else
{
return true;
}
}
else if("[[pv_RequestType]]"=="Junk")
{
alert("true");
return true;
}
"
--
 
 
 
 
Regrads,
Mousa Gharaibeh

Murali

unread,
Dec 4, 2016, 12:40:43 PM12/4/16
to Fujitsu RunMyProcess Developer Community, mosa.gh...@gmail.com
Hi Mousa,

It seems you are returning TRUE in both scenarios(Valid &Junk). Can you please verify the script once at your end.

Regards,
Murali
Fujitsu RunMyProcess Support


mosa gharaibeh

unread,
Dec 4, 2016, 3:25:39 PM12/4/16
to Murali, Fujitsu RunMyProcess Developer Community
Hi Pankaj,

For sure is not , As I sent you above , kindly find it again:

===================================================================================================
function valida(PP)
{
if("[[pv_RequestType]]"=="Valid")
{
if(PP == null || PP == ""|| PP =="Select an item")
{
return false;
alert("false");
}
else
{
return true;
}
}
else if("[[pv_RequestType]]"=="Junk")
{
alert("true");
return true;
}
==================================================================================================================

Please Advise.

Best Regards,

 

Mousa Gharaibeh                                                                                                                                  

Analyst , Business Process Automation                                                                                                

SITA                                                                                                                                              

 

E-Mail:       Mousa.G...@sita.aero                                                                                                                                                              


--
 
 
 
 
Regrads,
Mousa Gharaibeh

Pankaj Kumar

unread,
Dec 5, 2016, 2:16:36 AM12/5/16
to Fujitsu RunMyProcess Developer Community
Hi Mousa,

Please create a new js widget that will listen to any changes in List1 (List which values "junk" and "valid" is selected), and based on the value selected, you can make set required  of your List2 ( List containing subprocess list) to true/false using "setRequired" method and reinitialize the List2  (remove previous selection to subprocess list)

Also please make sure variable "pv_RequestType" is accessible in "valida" function and referring to latest selection make by the user in list1.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

mosa gharaibeh

unread,
Dec 5, 2016, 3:58:03 AM12/5/16
to RunMyProcess Support Forum
Hello Pankaj,

I have followed the above recommendation, everything is working fine Except the below scenario:

when the user select the valid then subprocess("Select an item"), if the user change to the Junk request , then can not proceed to the next step , can not stamp the form, since the sub process is "Select an Item" is required.

Kindly find what I have implemented :

Identified a JS widget , Listen to Pv_Request with below code :
if("[[pv_RequestType]]"=="Valid")
{
Id_SubProcess.setRequired(true);
}
Else
{
Id_SubProcess.setRequired(false);
}

and already identified another function that run the below function

"
function valida(PP)
{
if("[[pv_RequestType]]"=="Valid")
{
if(PP == null || PP == ""|| PP =="Select an item")
{
alert("Valide");
return false;
}
else
{
return true;
}
}
}

"

Please Advise.

Regards,
Mousa Gharaibeh

You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/u_-CDuhonfI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.



--
 
 
 
 
Regrads,
Mousa Gharaibeh

Pankaj Kumar

unread,
Dec 5, 2016, 6:25:31 AM12/5/16
to Fujitsu RunMyProcess Developer Community
Please try below code because if value selected is "Junk, in old function, no value is returned. 

function valida(PP)
{
if("[[pv_RequestType]]"=="Valid")
{
if(PP == null || PP == ""|| PP =="Select an item")
{
alert("Valide");
return false;
}
else
{
return true;
}
}else {
return true;
}
}




Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

mosa gharaibeh

unread,
Dec 5, 2016, 7:18:48 AM12/5/16
to RunMyProcess Support Forum
Hello Pankaj,

I've implemented your code , but with no luck, It's not working.

However,  I have implemented the below and it's finally working fine:

Subprocess ---> pass two parameters in the Validation Rule : valida("[[SubProcessRequired]]","[[RequestType]]");

and in the JS widget, I 've implemented the below :

========================================================================================

function valida(PP,RequestType)
{
if((PP == null && RequestType=="Valid") || (PP == "" && RequestType=="Valid")|| (PP =="Select an item" && RequestType=="Valid"))
{
alert
("Valid");
return false;
}
else if (PP =="Select an item" && 
RequestType=="Junk")
{
return true;
}
else 
{
return true;
}
}
 
=========================================================================================



Thanks a lot for your special support :-)

Best Regards,

 

Mousa Gharaibeh                                                                                                                                  

Analyst , Business Process Automation                                                                                                

SITA                                                                                                                                         




--
 
 
 
 
Regrads,
Mousa Gharaibeh
Reply all
Reply to author
Forward
0 new messages