Forum Discussion

Riz_K375's avatar
Riz_K375
Copper Contributor
Jun 26, 2023

Conditional field as per option selected

Hi team,

I am not sure if this has been posted before or not. I had a look at the other posts but couldn't find the solution. 

I am trying to create a simple Change management tracking in Sharepoint where user can submit  change request for reviewal. What I am trying to setup is when the Change category (drop down field) selected to Medium, it should make "Technical review by" (user field) mandatory. 

 

Similar I will setup for the Major change as well.

Currently I have this field available but did not make it mandatory as there is other options like "Minor" and Standard which does not require technical review.

 

Further in the details, I have created a flow which send an email to the person selected in Technical review which seem to be working fine. 

 

I will appreciate if someone can assist how I can achieve this task. Thanks

  • tdprem's avatar
    tdprem
    Copper Contributor

    Riz_K375 

     

    • Go to list settings-> Validation Settings.
    • Write in the formula to validate

    =IF(Category="Medium",IF([Technical Review By]<>"",TRUE,FALSE),TRUE)

     

     

    Kindly mark as answer after reviewing the answer.

    -

    Thanks,

    Prem

    Premkumar T D | LinkedIn

    • Riz_K375's avatar
      Riz_K375
      Copper Contributor

      Hi tdprem ,

      Thank you for your response. I just tested your solution and I am getting below error:
      "Sorry, something went wrong
      One or more column references are not allowed, because the columns are defined as a data type that is not supported in formulas."

      Is that because your Technical Review By is a text field and mine is Person?

      • tdprem's avatar
        tdprem
        Copper Contributor
        Yes person or user column will not work out for this.
    • Melow28's avatar
      Melow28
      Copper Contributor

      tdprem  why the formula is having error 

      =IF(Budget Shift Needed="Yes",IF([Budget Shift EURO]<>"",TRUE,FALSE),TRUE)

       

      • Melow28 

         

        You have to wrap the column names in square brackets if there is space in the column display name, like [My Column Name]. Try using formula like: 

         

        =IF([Budget Shift Needed]="Yes",IF(ISBLANK([Budget Shift EURO]),FALSE,TRUE),TRUE)

         


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

  • Riz_K375 Person or group columns are not supported in list validation formulas.

     

    Also, currently there is no other SharePoint out of the box way for your requirements. So, you will have to customize the list form using Power Apps to achieve your requirements.

     

    Check below documentations/links for more information:

    1. Customize a Microsoft Lists or SharePoint form by using Power Apps 
    2. Customize a form for a SharePoint list 
    3. Make a field required based on another field 

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    • Riz_K375's avatar
      Riz_K375
      Copper Contributor

      Thank you Ganesh and apologies for the long delay.
      Ok so we know that we cannot use Person field for validation. I am thinking for using the text field instead which can fill Person.
      Is it possible if a user name filled in text box can fill the Person field. It is just to make sure user name is filled correctly so the flow can trigger for approval?
      In another scenario if Person field  is filled it can fill the text field?

      • Riz_K375 You can fill email address in list instead of user name. 

         

        Then when flow runs on the list after item creation, you can use Office 365 users connector to get all the details of user based on email address in the list.

         

        Then you can use those details to send emails / approvals and fill person field in the list.


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources