質問

I have a SharePoint list for Doctors appointments, this list has two Date&Time columns with name Visit Starts and Visit Ends.

Now, I need to create a List view as Monday's Guests which should display only those items/appointments whose Visit Starts and Visit Ends date falls within Monday.

Similarly I have to create other views like Tuesday's Guests for dates falling within Tuesday and Wednesday's Guests for dates falling within Wednesday.

SharePoint List View, doesn't allow any formulas in the the filter, except [Today] and [Me]. Suggestions please!

役に立ちましたか?

解決

So, you have to include saturday to tuesday appointments in your Monday calculation

IF( AND( WeekDay([Start Date])<=1 , WeekDay([End Date])>=1 )
  ,"Monday"
  ,"Week"
  )

You can replace "Week" to include the Tuesday appointment calculations

IF( AND( WeekDay([Start Date])<=1 , WeekDay([End Date])>=1 )
  ,"Monday"
  ,IF( AND( WeekDay([Start Date])<=2 , WeekDay([End Date])>=2 )
     ,"Tuesday"
     ,"Week"
     )
  )

Note that a saturday to wednesday appointment will always be listed as Monday. you will have to use Seperate calculated columns to also 'catch' Tuesday and Wednesday for that one appointment. Depends on your use case.

Update#1

This does not work for saturday-nnn because saturdaynr = 7

Can we make it as simple as: The First Workingday after the Start Date

=TEXT(  CHOOSE( WEEKDAY([Start Date]) ,2,3,4,5,6,2,2)  ,  "dddd" )

他のヒント

You can create a calculated column based on Start and End dates to get the day like so: =TEXT(WEEKDAY([StartDate]),"dddd"). You can then filter your view based on this column.

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top