Page:JobTestPopUp
Would Please advise how to make below validation.
1. If Status is "Completed", "completion date" must be filled when "Save".
2. If completion date is filled, Status will auto update to "Completed" immediately
Hello Winnie,
I didn't understood your question, you are doing vice versa here.
If the status is completed then Date should get saved and if the date is saved then status should be Completed.
Does that make sense ?
Please explain your question.
Regards,
Komal
Hi Komal,
Sorry for the confuse.
1. If user select status as "Completed" , then "Completion date " cannot be blank when we save
2. If user fill in any date in "Completion Date", status will auto change to "Completed".
If it is possible to make it? If not, then just go for second one, if user fill in completion date, then the dropdown in status will auto change to "Completed".
Best regards,
Winnie Lam
Hi Winnie, for your use case you can go for these steps :
1. In the Save action , check with a if statement that if the status is set as completed and the completion date is NullDate then it should show a validation message .
2. If you are using the datepicker , it has a onselected event , in that handler just set the status variable value to completed.
Hope this helps.
Hi @Winnie LamYou can use this logic in your save action to validate the conditions, you just need to check the same variables that you are using in your inputs.
You can also use these validation separately in status on change and date picker onselect event.
Hi Winnie Lam,
Yes, it is possible through OnChange event,
1. If user select status as "Completed", then "Completion date " cannot be blank when we save
I have updated the OML you can refer it.
Shubham