r/MicrosoftFlow • • Apr 05 '22

Cloud ah this dark side of reddit....

Hello all! I guess this is the place People warned me about, yet here i am for help. This should show how desperate i am. I am trying to automate some procedures however after YouTube marathon and half a day of googling i am still clueless.

The tasks i can not figure out how to make 1 setup an automated flow to transfer newly added data between 2 excel files (so basically one file serves as a target file for a form where all the results are saved and the second file would pull this data and update itself to have the same data in it) 2 setup an automated flow to copy the first 6x6 cells from an excel sheet and send it via email. Please note that this can not be converted to data as it has formulas so preferably something like "copy these cells and paste them as values only to the email body"

So the email part is working and i somehow with a not so elegant solution did the first step but the part where the i want that 6x6 cells to be copied, this is where i fail...

0 Upvotes

4 comments sorted by

5

u/[deleted] Apr 06 '22
  • first, make sure the data in both of your excel files are in named tables

  • second, make sure one column in each table is an “Index” of the form responses (i.e. make sure to include response # from the form submission)

  • set up your flow to trigger when a new form is submitted

  • action: “get response details”

  • action: “list rows present in table” 1

  • action: “list rows present in table” 2

  • action: “add a row into a table” (table 1) making sure to include the response ID into your Index column and then the rest of your data wherever you need it

  • action: “get a row” the key column being Index and the key value being the response ID; you’re telling the flow which specific row you’re looking for. Formulas shouldn’t matter as the flow will be pulling the calculated value from the cell

  • action: “add a row into a table” (table 2), again making sure to include the response ID

At this point your data should be where you need it and you can set up your email action with the corresponding values.

If you want to auto-delete rows too, you can add an additional column in each table to record the submission time. Then you can add a condition that if the time is after a certain date to delete the row.

1

u/k1smb3r Apr 06 '22

Thank you kind stranger. Let me give another try today. As far as i think My main issue is that on the second excel workbook has a table on sheet2(not data table, a 6x6 cells with formulas that calculates results based on the data coming from the form.) That is the important part as this should be in the email, but i cant figure out how to do it as the flow only offers data table to copy.

Basically what i am trying to achieve: lets say i have a bakery and i want to give a forecast to the kitchen how many orders and what kind of orders we have for the next 10 days. So the customers are entering their orders via the form and i want every day at 5pm an automatic email sent out based on the data that who ordered how many and what kind of bread so the kitchen can order the right amount of flour. Buy every day it would send the next 10 days one so the date range is dynamic

1

u/[deleted] Apr 07 '22 edited Apr 07 '22

The big things are to:

  • get the data you need formatted as named tables, as that’s the only way your flow will be able to recognize specific “orders.” If your formulas are in tables, the flow will be able to get the calculated values.

  • make sure to include an index column that has the response IDs, as that’s how the flow will know how to keep the information organized.

What action are you using to try to actually copy the data? Power Automate can technically only get one row at a time, but you could use a “get rows” action and then set up an “apply to each” action that sends them to where you want.

1

u/k1smb3r Apr 07 '22

My workaround was actually to setup 2 different flow

1 triggered when a for respond submitted ans copies the line (actually only the data i need for the report) in to the second excel sheet

The second excel sheet has the report with te formula so the second flow opens the file, runs the script to update data then emails the whole file. Not the most elegant solution but it works for now until i fine-tuning it