hello everyone this is the flow which we have created in the previous videos what this flow does
is importing data from an Excel sheet to Ms list and from there filtering data per each employee
and send them by email the link for the videos are in the description of this video if you notice
that in the action list rows present in a table we were using static file name and table name the
issue with this approach is that whenever you are using a different file name or a table name this
flow will run into an error to avoid this we have to use a dynamic file name and a dynamic table
name so let's change our flow from manually to be triggered to trigger whenever a file has created
in a SharePoint folder so search for when a file is created properties only then choose the site
address and Library name then choose that folder where you want to upload the Excel sheet into it
now let's come back to the action which we want to make the file name and table name Dynamic
before we do that we have to update the location from the OneDrive to the SharePoint site and
the library name where you want to upload the associate into it then for the file name let's
get rid of the static file name and replace it with the dynamic content so let's search for the
folder path so the folder path should come from when a file is created click on the folder path
and then search for the file name with extension and this should also comes from there when a file
is created this way we will dynamically select the file name but for the table we need another
action to be added to the flow so click on the plus above the list rows present in the table
and search for get tables click on get tables so here we choose the location and document library
for our Excel sheet and for the file name we use the same way which we used for the action
list rows present in a table so we search for folder path and the file name with extension
now let's go back to our list rows present in a table and for the table name we get it from get
tables action before I write the table name let me explain something in Excel sheet if you have more
than one table each table will have a name and in MS PowerPoint each table will have an index number
the first table will have a zero index number and the second table will have one as an index number
Etc so if you want to use the first table then you have to use 0 as an index number
so in the expression I will write 0 which means I want to use the first table in the Excel sheet
then open a square bracket and between two single quotation right name and then we need
a dynamic content so click in the front of the expression and look for get table the value so
click on the value from the get table so click OK this way we made the table name as a dynamic
and we need a further action to be modified so I will go to the create items in Ms list
as you see the columns were mapped from the action list rows present in a table in state we
have to change this and remote them from another action which is pass Json before I add the parts
Json action let's run the flow first and from the action list rows present in table copy the
value of the output to clipboard I'll tell you why we do that then go back to the edit mode now
let's add new action Parts Json for the contained choose value from the action list rows present
in table and for the schema click on generate from sample and paste the code that we copied
earlier that I told you so now we are ready to go edit your action create items in SharePoint
and then for the apply to each we use the body of the parts Json action and then we'll remove
the columns name with the dynamic contained from the Json action your flow is now fully Dynamic
and ready to go I hope this video was useful for everybody and see you in my next video