{"id":472,"date":"2021-06-23T14:53:14","date_gmt":"2021-06-23T14:53:14","guid":{"rendered":"http:\/\/www.torontohelpdesk.ca\/blog\/?p=472"},"modified":"2021-06-23T15:14:04","modified_gmt":"2021-06-23T15:14:04","slug":"creating-daily-logs-of-forms-responses-in-office-365","status":"publish","type":"post","link":"https:\/\/www.torontohelpdesk.ca\/blog\/creating-daily-logs-of-forms-responses-in-office-365\/","title":{"rendered":"Creating daily logs of Forms responses in Office 365"},"content":{"rendered":"\n<p><strong>Problem:<\/strong><\/p>\n\n\n\n<p>You have a Microsoft Forms form that you want to have a daily output on. Basically, every day, you want to pull all the data from an MS Forms form and output to a unique file with the date\/timestamp on it.<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<p>I&#8217;m going to break this down into its elements. This should be done by the author of the Forms form<\/p>\n\n\n\n<p><strong><em>Forms<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Load up your form<\/li><li>Click on Responses<\/li><li>Click on Open in Excel<\/li><li>Save to a unique location in OneDrive (and name accordingly)<\/li><\/ol>\n\n\n\n<p><strong><em>Collecting all the data into the above created Excel file<\/em><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Go into Power Automate<\/li><li>Create a new flow<\/li><li>Set it to type &#8220;When a new response is submitted&#8221;<\/li><li>If Form Id does not show up with your MS Forms<ol><li>Go back into your MS Forms form<\/li><li>Click on Share<\/li><li>Under anyone can respond, you&#8217;ll have a long URL<\/li><li>Copy the URL (into notepad)<\/li><li>Strip out everything before id= (including id=) so you end up with a long string of characters<\/li><li>Paste it into the Form Id field<\/li><\/ol><\/li><li>Click on + New Step<\/li><li>Select Get Response Details<ol><li>Paste the same id as in 4F above<\/li><li>Under response ID, select Response ID<\/li><\/ol><\/li><li>Click on + New Step<\/li><li>Search for Add a row into a table<ol><li>Location: OneDrive for Business<\/li><li>Document Library: OneDrive<\/li><li>File: Select the file you created originally<\/li><li>Table: usually it&#8217;s Table1 but whatever the table name is<\/li><li>Rest of info:<ol><li>ID: Response ID<\/li><li>Map all the other fields you need to track<\/li><\/ol><\/li><\/ol><\/li><li>Save<\/li><li>Test<ol><li>You should see output from the Forms form appear in the Excel file<\/li><\/ol><\/li><\/ol>\n\n\n\n<p><strong><em>Creating the daily Output &#8211; this will daily copy the file to a new file name that has the day&#8217;s date on it as the file name<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\"><\/div>\n<\/div>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a new Flow<\/li><li>Set it as type Recurrence and set the schedule<ol><li>Note that you should set it at a time when you know that all the data should have been collected by<\/li><li>Maximize Recurrence<\/li><li>Click on Edit to the right of the scheduled days<\/li><li>Click on Show advanced options<\/li><li>At these hours: select the Hour<\/li><li>At these minutes: select the Minutes<\/li><\/ol><\/li><li>Click on + New Step<\/li><li>Set it as Copy file (OneDrive for Business)<ol><li>File: Select the Excel file from earlier<\/li><li>Destination File Path:<ol><li>Click on the field<\/li><li>Select Expression<\/li><li>Search for utcNow()<\/li><li>The format that I used was utcNow(&#8216;dd-MM-yyyy&#8217;)<\/li><li>Copy the destination from the File field<\/li><li>Append .xlsx at the end of the file<\/li><\/ol><\/li><\/ol><\/li><li>Click on + New Step<\/li><li>Set as List rows present in a table<ol><li>Location: OneDrive for Business<\/li><li>Document Library: OneDrive<\/li><li>File: Select the Excel File<\/li><li>Table: Table1<\/li><\/ol><\/li><li>Click on + New Step<ol><li>Search for Apply to each<\/li><li>Select an output from previous steps: value<\/li><li>Add an Action<\/li><li>Select Delete a row<ol><li>Location: OneDrive for Business<\/li><li>Document Library: OneDrive<\/li><li>Select the Excel file<\/li><li>Table: Table1<\/li><li>Key Column: ID<\/li><li>Key Value: ID<\/li><\/ol><\/li><\/ol><\/li><li>Save<\/li><\/ol>\n\n\n\n<p>What&#8217;s effectively happening here, is all the data gets collected over a period of time. Every day, that Excel file gets copied to a new file that gets renamed with the day&#8217;s date. Then the system goes in and deletes all the rows of the main Excel file<\/p>\n\n\n\n<p>To test, add data to the form and run the test function<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: You have a Microsoft Forms form that you want to have a daily output on. Basically, every day, you want to pull all the data from an MS Forms form and output to a unique file with the date\/timestamp <a class=\"more-link\" href=\"https:\/\/www.torontohelpdesk.ca\/blog\/creating-daily-logs-of-forms-responses-in-office-365\/\">Continue reading <span class=\"screen-reader-text\">  Creating daily logs of Forms responses in Office 365<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-472","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/comments?post=472"}],"version-history":[{"count":2,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/472\/revisions"}],"predecessor-version":[{"id":478,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/posts\/472\/revisions\/478"}],"wp:attachment":[{"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/media?parent=472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/categories?post=472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.torontohelpdesk.ca\/blog\/wp-json\/wp\/v2\/tags?post=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}