2 Replies Latest reply on Apr 1, 2019 11:23 AM by 3690888

    Make a field required based on another field value

    3690888

      I need to make a field required conditionally based on another field value.

       

      If work from home flag is set to yes then work location need not be mandatory while if its not set to yes then it is mandatory.

       

      Any ideas how this can be done. ?

       

      Regards,

      NK

        • 1. Re: Make a field required based on another field value
          AshishHCM

          Hi 3690888,

           

          Not exactly what you are looking for but a little bit similar ( the given post has a word document which shows how to make a field read only basis value of other field). I guess this should be able to give some hint:

           

          https://cloudcustomerconnect.oracle.com/posts/a32e4d9dad

           

          Hope this helps!

           

          Kind Regards

          Ashish

          • 2. Re: Make a field required based on another field value
            3690888

            Hi Ashish,

             

            I have another problem.

             

            Right now the working location needs to be required only when working from home field is set to No for the employee.

             

            Now I have written the following if then else condition to handle this situation on the required property of the field work location:

             

            #{bindings.WorkAtHome.inputValue=='N'? true : false}

             

            But the bind variable used above retrieves the value from the database in case of update/correct or takes the default value of work from home in case of new hire.

             

            I need to know how we can retrieve the value selected in the dropdown sicne the bind variable only retrieves the database value.

             

            Any thoughts ?

             

            The partial trigger that I used in the work location does work but the value retrieved for "Working from Home" does not get refreshed and it still takes the value from the database.

             

            Regards,

            Nirmal Khanduri