Last active
December 14, 2020 05:51
-
-
Save tackme31/04d8b8b7a75c63c3955b0d326114c26c to your computer and use it in GitHub Desktop.
A Sitecore PowerShell Extensions script for displaying data of Sitecore Forms without exporting.
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
<# | |
You can use this script as reporting tool by using Forms Data Viewer | |
- [Forms Data Viewer - Sitecore Marketplace](https://marketplace.sitecore.net/Modules/F/Forms_Data_Viewer.aspx) | |
#> | |
$result = Read-Variable -Parameters ` | |
@{Name='formItem'; Title='Form'; Editor='droptree'; Source="DataSource=/sitecore/Forms"}, | |
@{Name='startDate'; Title='Start date'; Editor='date'}, | |
@{Name='endDate'; Title='End date'; Editor='date'} | |
if ($result -ne "ok") { | |
exit | |
} | |
$provider = [Sitecore.DependencyInjection.ServiceLocator]::ServiceProvider.GetService([Sitecore.ExperienceForms.Data.IExportDataProvider]) | |
$provider.Export($formItem.ID.Guid, $startDate, $endDate).Content ` | |
| ConvertFrom-Csv -Delimiter ';' ` | |
| Show-ListView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment