on 12-18-2009 6:51 AM
Hi Experts,
I have a requirement to set the Date field as mandatory when a particular value is selected in drop down list. I have already tried with MessageBox though it displays the error message but process moves further i.e. on clicking Check & Send button it throws an error message but still it moves further and i can see only Send button. Ideally it should halt there itself.
Thanks & Regards,
Jitesh Talreja
Let's assume you have DropDownList1 and DateTimeField1 fields in your form and if value is EN you want date to be mandatory
Use the following JavaScript in the exit event of the drop-down.
if(this.rawValue == "EN")
{
DateTimeField1.mandatory = "error";
}
else
{
DateTimeField1.mandatory = "";
}
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your valuable inputs
Chintan
I have already tried this. It only highlight the field with the red border but still allow to move further.
Mukesh
Yes, we can definately control this from the backend but that would be the last option i should execute. Ideally, this is something to be controlled in front end itself
Poornima
By setting the field attrbiute Required will set the field mandatory as a whole irrespective of drop down values or any other UI element.
Regards,
Jitesh Talreja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops I forgot in HCM P&F there is submit button in form else the code I gave you would have worked.
My guess is since Adobe form is just used to display/edit data in HCM P&F and the "submit" event is controlled from outside the form, mandatory check would need to done in the backend in some BADI or service class as Mukesh mentioned.
Chintan
Hello Jitesh,
Go to Tcode - HRASR_DT
Select the Process scenario
In the Process Scenario - go to Form Scenarios - Drill down to the Fields - Select the Date field - make it as a Required Entry in the Field Attributes.
Hope this helps.
Regards,
Poornima
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Make the mandatory check in side the Service class.
Kind Regards
Mukesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.