0

I'm trying to create a list where contact details of stakeholders are associated with a number of projects. Sometimes it is only 1 project and sometimes it is up to five different projects.

Currently I have the following columns:

Stakeholder name (from Active Directory) and then Project Name 1, Project Name 2, project Name 3 etc. (all from a lookup table).

What I tried to do is to add a supplementary column named 'Add Project Name 2?' with a choice of 'Yes' and 'No'. If 'Yes' is selected, I'd like a 'Project Name 2' column to appear. And so on.

After some researching I tried a custom formula of:

=if([$Add Project Name 2?] == 'Yes', 'true', 'false')

However, this hasn't worked for me. Would you have any advice on where I am going wrong?

Thanks for your time!

1 Answer 1

0

If "Add Project Name 2?" column is of type Choice, Use formula like:

=if([$InternalNameOfAddProjectName2Column] == 'Yes', 'true', 'false')

In case of Yes or No (boolean) column, use:

=if([$InternalNameOfAddProjectName2Column], 'true', 'false')

Make sure you are using correct internal name of column in your formula as it works with internal name only.

The column is represented by specifying the internal name of the field surrounded by square brackets and preceded by a dollar sign: [$InternalName]. For example, to get the value of a field with an internal name of "ProductName", use [$ProductName].

References

  1. Find the internal name of SharePoint column
  2. Show or hide columns in a list or library form
7
  • Thanks Ganesh for your help. I have tried both options but unfortunately it's still showing all columns. I even tried a different browser but it's still the same.
    – Marlena
    Commented Feb 9, 2023 at 10:53
  • Can you show us the internal name of your column and where exactly you are adding this formula (add screenshot to your original question)? Also, you have to add formula for all the columns you want to show/hide based on other column values. Commented Feb 9, 2023 at 11:05
  • Thank you Ganesh - I have added a number of images - I hope this will help
    – Marlena
    Commented Feb 9, 2023 at 11:18
  • You are adding formula in wrong place. Follow the steps given in this documentation for adding formula in correct place: learn.microsoft.com/en-us/sharepoint/dev/… Commented Feb 9, 2023 at 11:27
  • 1
    Thank you - perfect! All works as intended! Many thanks for yoru guidance and prompt responses!
    – Marlena
    Commented Feb 9, 2023 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.