pnp/List-Formatting

Birthday Sample, does not populate birthday.

AkeelEdwardss opened this issue · 5 comments

Sample (which sample are you having trouble with)

Birthday List Formatting Sample
https://github.com/pnp/List-Formatting/tree/master/view-samples/birthdays

What Should Happen

Birthday should be display as expected. Birthday value is not displaying as expected on the Birthday custom view. Birthday is a required field. Column type is date and time as suggested.

image

What Actually Happens

image

image

Birthday value does not display on the custom view.
Confirmed that all spelling is correct include case sensitivity.
Confirmed that column ordering or positioning is the same as explained on the Readme.md

Kind regards,

Hi @AkeelEdwardss !

I tried it in my environment and the BirthMonthDay value is displayed.

image

There are two possible reasons why BirthMonthDay values are not displayed.

Cause 1: The view does not contain a BirthMonthDay column

If the view does not contain a BirthMonthDay column, the values in the BirthMonthDay column will not be displayed. Please check to see if the view contains the BirthMonthDay column from the [Add or remove fields].

image

Cause 2: The internal name of the column is incorrect

If the internal name of the column is not BirthMonthDay, the value will not be displayed. The internal name of the column is the name used when the column was created, not its display name.

You can find the internal name of the column in the URL on the Edit Column screen; the value after Field= is the internal name of the column. Please check this.

image

If the internal name is incorrect, try re-creating the calculated column. (Unfortunately, the internal names of columns cannot be changed after creation.)

Hi @tecchan1107,

I appreciate your insightful response.
Cause #2 was my issue particularly. The internal column name was set to "BirthMonthDay1" as an accident. That leads me to discover another issue. The birthdaymonth column is a calculated column yet it appears the list webpart formats it incorrectly.

The date and time format is displayed:
image

Tabular view displays the birthday correctly:
image

While the column data format is set to date only:
image

That leads me to discover another issue. The birthdaymonth column is a calculated column yet it appears the list webpart formats it incorrectly.

It may be because the type of the aggregate value column is set to a date column. Please try changing the aggregate value column type to a single line of text column.

image

That fixed it. Thanks @tecchan1107!

Resolved