2 Replies Latest reply: Jan 3, 2013 1:11 AM by Bijay Soren-Oracle RSS

    field validation check using another field


      Please show me how to edit field validation check.I thought it's easy but it does'nt work correctly.
      I want to check like the following.

      1.Status field
      If SalesStage field="A", I can input Status field.
      If SalesStage field<>"A", I can't input Status field and error message is shown.

      2.SalesStage field
      If Status field IS NOT NULL, I can't change SalesStage field.

      About 2,I can't edit because it's system field,so please tell me another way.

      Thank you.
        • 1. Re: field validation check using another field
          Bijay Soren-Oracle

          Below Field Validation should work for Status Field

          Field Validation for Status Field:
          ( [<SalesStage>]<>'A' AND (IfNull([<Status>],'Invalid')=IfNull(PRE('<Status>'),'Invalid'))) OR [<SalesStage>]='A'

          As it is not possible to write Field Validation for Sales Stage, what you can do it to create a custom field and populate it with current Sales stage value. It can be done through workflow. Trigger Event of the workflow should be "Before Modified Record is Saved" and workflow condition [<Status>] IS NOT NULL

          You can then write field validation on the Custom Field like below.

          Field Validation for Custom Sales Stage Field
          [<Status>] IS NOT NULL AND [<stCustom_Sales_Stage_ITAG>]=PRE( '<stCustom_Sales_Stage_ITAG>')

          Hope this helps

          • 2. Re: field validation check using another field
            Bijay Soren-Oracle
            Hi ,

            For 2nd case, you can use following field validation on Sales Stage Id field. On this field you can enter field validation and it will work for Sales Stage.


            Hope this helps