Validation rule in text widget

195 views
Skip to first unread message

al...@wedosoft.net

unread,
Jan 27, 2018, 8:09:55โ€ฏAM1/27/18
to Fujitsu RunMyProcess Developer Community
Hello,

I made one filed called "age" and it's identifier is "id_age".
and I entered validation rule like this.

"[[sex]]"=="M"?[[age]]>18:"[[sex]]"=="F"?[[age]]>15:true;

The "sex" field is radio button and the values are "M:", "F".

Here are the test scenario.

1. WI loaded firstly (or reloaded)
- A page loaded firstly, when I execute "RMPApplication.validate()", age filed is prompted as invalid state.
- A page loaded firstly, when I execute "id_age.setValue("")", age field is prompted as invalid state.

2. A value input as invalid or valid
- When I select sex as "M" and enter 19, age field is prompted as valied state. (validation rule returns true) and I deleted 19. It is still valied state even though that field is empty.

- When I select sex as "M" and enter 17, age field is prompted as invalid state. (validation rule returns false) and I deleted 17. It is still invalied state even though that field is empty.

So as a result, I guess validation rule doesn't check empty value of field.

Here are my questions.

I want to disable the age field when the value is empty. How can I do that?
I want to reset the age field if needed as id_age.setValue() method. As you refer to attached video, the page loaded firstly, and when I execute id_age.setValue(""), it rurned as invalied state. How can I do that?

How can I handle the validation rule of the field when a field is empty?

Regards,
Alan.

recording.mov

Prachi Chandak

unread,
Jan 30, 2018, 12:04:32โ€ฏPM1/30/18
to ์ด์šฐ์„ (Alan Lee), Fujitsu RunMyProcess Developer Community
Hello Alan,

We have implemented the above described scenario and getting the same issue while validating.
We are checking this with our team. Will update you soon.

Do feel free to contact us for any further query.

Thanks & Regards,
Prachi Chandak
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/8273c42e-cfb2-4116-ac66-1be1842cde1f%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

al...@wedosoft.net

unread,
Feb 11, 2018, 9:45:35โ€ฏPM2/11/18
to Fujitsu RunMyProcess Developer Community, al...@wedosoft.net
2018๋…„ 1์›” 31์ผ ์ˆ˜์š”์ผ ์˜ค์ „ 2์‹œ 4๋ถ„ 32์ดˆ UTC+9, pchandak ๋‹˜์˜ ๋ง:
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
Hello,

We are facing some trouble for this. Could you let me know when this issue could be fixed?

Regards,
Alan.

Prachi Chandak

unread,
Feb 26, 2018, 10:02:40โ€ฏAM2/26/18
to ์ด์šฐ์„ (Alan Lee), Fujitsu RunMyProcess Developer Community
Hello Alan,

All our apologies for delay in reply.

I have re-check the given scenario to validate age (text input) based on selected gender. I found it working well.ย 
I followed the below steps to execute the function.ย 
1. Select the Gender
2. Input the age and you if find it working.ย 

The cause of error (by referring video) was the flow of inputs entered.
Since you were entering age before selecting gender, the Validation rule referring the '[[sex]]' widget was giving undefined value.
Thus, it was causing error.ย 


Please refer screenshots for clear idea. Let us know if this resolves your issue.


Thanks & Regards,
Prachi Chandak
Fujitsu RunMyProcess Support

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/.
Text_Validation_issue.png

์ด์šฐ์„ (Alan Lee)

unread,
Feb 27, 2018, 10:38:55โ€ฏPM2/27/18
to Prachi Chandak, Fujitsu RunMyProcess Developer Community
Hi Prachi,

Could you try like this?

[Scenario 1]
1. Select gender
2. When a age filed is empty(no input), please execute RMPApplication.validate() or id_age.setValue('');

[Scenario 2]
1. Select gender
2. input the invalid value in age field (as your screen shot, gender: "M", age : 12)
3. Please execute id_age.setValue('');

I figure that the point is empty value checking and how to reset field which has validation rules.

Regards,
Alan.
แง

Prachi Chandak

unread,
Feb 28, 2018, 10:44:12โ€ฏAM2/28/18
to ์ด์šฐ์„ (Alan Lee), Fujitsu RunMyProcess Developer Community
Hello Alan,

I have tested with the scenarios shared by you.

[Scenario 1] - When you select gender and validate empty text widget, it will show invalid value. It is normal behavior of RMPApplication.validate() function. Because if the widget is empty it will check its condition with empty i.e. undefined field and hence it gives error.

[Scenario 2] - According to your assumption when setValue("") function is used, it will clear data of text widget. But, RMPApplication.validate(); function takes the previous value of text widget only. It does not consider the text widget as empty. Thus, it shows error while validating.ย 

I will check this with R&D team and let you know what is the alternative to this.

Please feel free to contact us for any other query.




Thanks & Regards,
Prachi Chandak
Fujitsu RunMyProcess Support

Reply all
Reply to author
Forward
0 new messages