1

I am a beginner of SharePoint. I want to create a calendar form to use it as a team members out of office info, a meeting request to a manager, etc.

The form includes; Name, Title, Start/End Time and Category. Under Category, there are options such as "Out of office", "Meeting Request", "Holiday" etc.

If a member selects "Meeting Request", I want to show 4 additional columns in the form.

These 4 should be hidden until "Meeting Request" is selected from drop down list.

  1. Meeting Type
  2. Document Prepared By
  3. Document Reported By
  4. Purpose of the Meeting

Could someone please help me with column formatting code and where to add these codes?

1
  • Are you using SharePoint Online modern experience lists & forms? – Ganesh Sanap Apr 29 at 15:27
0

If you are using SharePoint online modern experience, you can achieve this using conditional formulas.

You can use formula like:

=if([$Category] == 'Meeting Request', 'true', 'false')

Steps to add conditional formulas:

  1. Go to the list where you want to show or hide columns in the form.

  2. Open an item to view the item details in the display form OR open the new list item form.

    enter image description here

  3. Click on Edit form icon at the top, then select Edit columns.

    enter image description here

  4. Navigate to the desired column for which you want to set a conditional formula (your 4 additional columns)

  5. Select the far right hand edge of the column name to display the options menu (...)

  6. In the more options, select Edit conditional formula.

  7. In the Edit conditional formula dialog, specify a conditional formula like above

  8. When you are finished, select Save.

    enter image description here

  9. Repeat the same steps for all 4 columns.

Important Points:

  1. Do not make 4 additional columns as required
  2. In conditional formulas, you have to use internal name of your columns.

Documentation: Show or hide columns in a list or library form

4
  • Thank you very much for your help! I am trying to follow your instruction, but I don't see "Edit Conditional Formula". I can go to Calendar -> List settings -> Columns -> Edit columns and see "Column formatting" box in the bottom saying "Change the display of this column by adding JSON below. When I add the code you provided me above into this box, nothing happens. Could you help me how to make it work? Thank you very much. – Rachel Apr 29 at 17:32
  • Are you using "modern experience" custom list or classic experience "Calendar" type list? You don't need to go to list settings. you can select "new" form within list. check images in updated answer. – Ganesh Sanap Apr 29 at 17:33
  • How can I tell which one I am using (Modern or Classic)? When I click "New Event" in the calendar, I can create a new event in the calendar but I don't have an option to edit the form. – Rachel Apr 29 at 17:59
  • Also I don't have a permission to use Sharepoint Designer. It is restricted by the IT dept in my company. – Rachel Apr 29 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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