Forum Discussion

Imam1375's avatar
Imam1375
Copper Contributor
Mar 02, 2023
Solved

Use Column Validation so that single text column requires an answer from a range of answers

Hi everyone,

 

Hope you're well. I have a SharePoint list, and in it, one of the fields is a single text field (that is used for a cascading dropdown on the form). Some users, instead of using the form, will copy and paste lines of data from Excel straight into this SharePoint list, via grid view. This is if they have lots of data to put in where its too time consuming to fill out the form each time...they'd only want to use Excel for this.

 

I need it so that the answer they put in for this particular single text field (called variance driver), has to be a specific answer from a specific range of answers. So for example, the 3 possible answers they should put in for 'variance driver' are machine costs, employee costs, tech costs. Users must put any one of these in, if they misspell it then the SharePoint list will flag it during grid view that they must enter them correctly.

 

Is there some sort of column validation I could use for this? Have been trying but no progress so far.

 

Appreciate your help.

  • Imam1375 

    1. You have to add formula to variance driver column
    2. You have to use the correct display name of column enclosed within []
    3. If not working using above suggestions, follow below classic experience approach:

    Go to SharePoint list > Click on Settings (gear) icon > Select List settings > Scroll down to "Columns" section and click on variance column name.

     

    Scroll down to Column Validation section and copy paste the formula in correct format like: 

    Click "OK" button at the bottom of the page to save the changes to column settings.


    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. If the post was useful in other ways, please consider giving it Like.

    For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

  • Imam1375 Use column validation formula like: 

     

    =OR([Variance Driver]="Machine Costs",[Variance Driver]="Employee Costs",[Variance Driver]="Tech Costs")

     

    Column settings

    Output


    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. If the post was useful in other ways, please consider giving it Like.

    For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

    • Imam1375's avatar
      Imam1375
      Copper Contributor

      ganeshsanap Hi Ganesh, thanks for your answer. Problem is, that it doesn't seem to work for me. The formula keeps returning #NAME? where variance driver is written. 

      I have made sure that it is spelt exactly as it should be.

      • Imam1375 

        1. You have to add formula to variance driver column
        2. You have to use the correct display name of column enclosed within []
        3. If not working using above suggestions, follow below classic experience approach:

        Go to SharePoint list > Click on Settings (gear) icon > Select List settings > Scroll down to "Columns" section and click on variance column name.

         

        Scroll down to Column Validation section and copy paste the formula in correct format like: 

        Click "OK" button at the bottom of the page to save the changes to column settings.


        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. If the post was useful in other ways, please consider giving it Like.

        For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

Resources