forked from microsoft-search/pnp-modern-search
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'microsoft-search:main' into main
- Loading branch information
Showing
130 changed files
with
65,608 additions
and
67,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
|
||
|
||
If you are looking for inspiration, you can find a selection of custom layouts in the | ||
[Custom layouts repository](https://github.com/microsoft-search/pnp-modern-search-layouts/blob/main/README.md) | ||
|
||
If you have a custom layout you want to share, please submit a PR to the repository. | ||
|
||
|
||
## [Scenario Create your first custom template](create-your-first-custom-template.md) | ||
|
||
Create your first custom template | ||
|
||
## [Store custom templates in SharePoint](howto-store-custom-templates-in-sharepoint.md) | ||
|
||
Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control. | ||
|
||
## [Edit custom templates in SharePoint](edit-custom-templates-in-sharepoint.md) | ||
|
||
Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control. | ||
|
||
## [Edit custom templates locally in Visual Studio Code](edit-templates-using-vscode-and-onedrive.md) | ||
|
||
When you have your templates in SharePoint, it is easy to setup a way to edit locally on your computer and still get the result in SharePoint almost instantly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
docs/scenarios/Setup-Results-web-part-to-show-birthdays.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
A common requirement for intranets is to show birthdays of employees and as the SharePoint User Profile Application has a property for birthdays, it is a natural choice to use search to show birthdays of employees. In addition, at the time of writing (2023), the Graph API does not have a property for birthdays, so we can't use the Graph API to get the information. | ||
|
||
|
||
The tricky part is that in the User profile application the birthday value is store is a rather unusual datatype: "date no year" | ||
|
||
![Birthday in the User Provisioning Service](../scenarios/assets/Setup-Results-web-part-to-show-birthdays/BirthdayUPA.png) | ||
|
||
|
||
In my tenant the SPS-Birthday property was mapped to RefinableDate00 and the actual value in the property is 2000-[the date]: | ||
|
||
![Managed Property value](../scenarios/assets/Setup-Results-web-part-to-show-birthdays/RefinableDate00.png) | ||
|
||
(use the magnificent [SP Editor tool](https://chrome.google.com/webstore/detail/sp-editor/ecblfcmjnbbgaojblcpmjoamegpbodhd) or [SP Search Query Tool](https://github.com/pnp/PnP-Tools/blob/master/Solutions/SharePoint.Search.QueryTool/README.md) to inspect the managed properties) | ||
|
||
|
||
|
||
So, the query had to be something like "those accounts where RefinableDate00 = 2000 + the value of today's date | ||
|
||
|
||
|
||
In KQL we have the token "today" that will give us today's date, but as far as I know, we can't get the components the date consist of, like Month and Day. | ||
|
||
Luckily, the PnP Modern search provides additional Tokens, see [Tokens](https://microsoft-search.github.io/pnp-modern-search/usage/search-results/tokens/) | ||
|
||
|
||
|
||
So the final query is: | ||
|
||
**RefinableDate00=2000-{CurrentMonth}-{CurrentDate}T00:00:00Z** | ||
|
||
|
||
|
||
( and of cause a criteria to exclude former employees, like SPS-HideFromAddressLists<>1) | ||
|
||
![Birthday web part](../asserts/../scenarios/assets/Setup-Results-web-part-to-show-birthdays/birthdays.png) | ||
|
Oops, something went wrong.