power automate can you make a drop down input with dynamic values - sharepoint

Fairly simple question I have a power automate flow with a for selected file trigger one of the inputs is a dropdown is there any way to create this dropdown to have values based on a dropdown that is in the SharePoint document library the file is in?
this should be populated by these values

Related

How to Create Dynamic List Based on Certain Values?

I have an excel Sheet Contain Data like below
I need to Create Different List based on two Dropdowns, One of Item for eg 100m,200m and another of Section like Senior Boys,Male Etc
How To Achieve this , I am new to Excel
I was able to make dropdowns using data Validations,

How do I refresh an Excel Power Query using Power Automate Online?

I have data being pulled from a SharePoint list to an Excel file and I'm trying to use Power Automate online to create a scheduled flow that will trigger the "Refresh All" button for Power Query in Excel (see image). Due to different protections, I'm unable to simply schedule the refresh directly in Power Query in Excel and Power Automate cannot pull the SharePoint list in the format I need. There doesn't seem to be an option in Power Automate online that would connect to Power Query in Excel. Any suggestions?
Power Query Button
Power Automate doesn't have a feature to allow you to refresh connections or open/close a document. I was also encountering the issue of the document not refreshing on "open" because it was locked by another user (due to using One Drive). I couldn't use Power BI, scripts, or MACROS either.
I needed my workflow to add rows to a spreadsheet, update the pivot tables, and then send an email with the results. Here is what I did to get around the pivot tables not updating.
In Excel:
Open the pivot table options and select "Refresh data on file open".
Refresh Data
On the worksheet with your pivot table(s), create a table in a cell that has similar information as below (in the workflow we will update this table so it forces the system to re-open the document and refresh). Once the table is created, select the column and "Hide columns".
Updated Column
If you are using One Drive or a shared document like I did, when you have made all the changes you need, you will want to change the session to "viewing", and then close the document. 
*Any time you make changes manually in the document, make sure to "close" the session by changing it to "viewing" or else the workflow will not complete properly due to the doc being locked.
Viewing
In Power Automate: I have my trigger set to a schedule at the end of the month but your trigger or schedule and parameters can be whatever you set them as. I'm going to show you the steps that are important to the spreadsheet.
*Workflow snapshot:
Workflow Snapshot
Add a row into a table > Select the file location and the table > Update all the fields from the SharePoint list (Value= outputs('Get_items')?['body/value'].
I used this step to update the spreadsheet automatically with items added to a SharePoint list (so it can be extracted into a report monthly).
Add A Row
Delay 1: 10 minutes. This allows One Drive time to close and end the current session.
Update a row: Select the location of the file (this is the table we created and hid earlier).
Update Row
Delay 2: 2 Minutes
Get file content (One Drive) > Select the file. I was limited to only being able to see my individual One Drive so make sure your excel workbook is saved in a location you can select in Power Automate.
Convert file (One Drive)> Select the file. 
Convert File
Send an email > Attachment Name: (File Name= outputs('Convert_file') > Attachment Content: (Body= outputs('Convert_file'). It may be listed as "File content" in the Converted File section.
Send Email
There may be a simpler option if there is a way to refresh power query from Power Automate, or if you could use Power BI which is connected to Power Automate.
But there is also dataflows in Power Automate that can work similar to power query.
https://youtu.be/8IvHxRnwJ7Q
Then you can do any additional transformations in Power Automate & use Excel batch actions to import all the data to Excel from a flow.
https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Excel-Batch-Create-Update-and-Upsert/td-p/1624706

How can I pull data from an excel spreadsheet and compare it to a field in powerapps?

I am trying to make a login system for a powerapps project I have and I want to be able to pull data from my excel spreadsheet and compare it to what inside the field the user entered.
I am currently able to insert data from the powerapps into the excel spreadsheet but cant find out how to pull data and compare it.
Normally, your Excel spreadsheet is a datasource in your PowerApps application, so you can use formulas like "LookUp" to filter your datasource a compare datas from your app :
LookUp([Your Excel data source], [Your column to compare] = [Your user field].Text)
Please refere to the documentation for more informations
Have a good day

Exporting joined list from sharepoint to excel

I have two lists in sharepoint: one list is a customer list with customer id, name and state, the other is an order list that has a lookup column that refers to the customer id, order date and order amount. I would like to join both lists on customer id and export the joined list to excel so that I can create a pivot table that, say, lists sales by state.
I'm able to create a linked datasource using the sharepoint designer. I haven't been able to find a way to export that to excel however. Can someone offer advice?
Regards
You can do it by opening both lists in Excel.
Use Open in Excel button in the first list. It will open this list in Excel. Let Excel opened and use the same button in the second list. Excel will pop up dialog where you can choose how to open it. Choose table and new Sheet option.
After that you will have 1 excel file with 2 lists imported in it each on separate sheet.
Next step is using Relationships button in Data ribbon which allows you to join imported lists.
And the final step is to insert PivotTable (Insert - PivotTable). Use External data source option in Insert dialog - Choose Connection... button - Tables tab - and select joined table from previous step (This workbook data model section).
At the end you have Excel with Pivot table where you can drill down data using columns from both lists.

Excel Show Data Based on user Choice

Excel 2007: I get my data from Access tables the Excel sheet is called "Data". My Excel report cells are populated by linking to those data cells(=Data!A1) and some report cells have simple code. But my question is this; my report needs to specify one record. Example: Data record 1: Name=Joe, Birth=7/29/62, Country=USA: record 2: Name=Sam, Birth=4/13/74, Country=China... How do we control the report display to a specific record? If I add a DropDown or ListBox, how do we make only the records for the name picked show in the report. Is there a way to put the code behind the listbox, or should I scrap the list and create a macro, what is the best way for a user to pick the data to be displayed on the report? Suggestions please...
There are two approaches I would use.
When you embed a query object in Excel (which is, I assume, how you are fetching the data from Access) you have the ability to edit that query in the little Query Editor tool.
You can add criteria to that query in this tool - there's a filter icon, you select let's say the Name column, and then type "Sam" in the box below, and that will produce a SQL statement that now includes "Where Name = 'Same'" at the end.
However, that's not that helpful for reporting, since most likely we want the name to be a parameter passed in from the Excel sheet itself. If in the criteria box, you type "[enter name]" instead of "Sam", the square brackets tell the Query tool that this is a user supplied parameter. When you run the query from the tool now you get a pop up box asking you each time for the name.
Now when you exit the query tool and return to Excel, you can edit the Query Parameters for that embedded query object. The parameter you made (name) is there, and it can either take on a static value, prompt the user, or take the contents of a cell. You can even set a flag to refresh the query when the cell contents change.
The other approach goes a little further and manipulates the query object in some VBA code. If you need to do some heavier lifting, or other logic, for example, and you don't want to deal with writing it all out as spreadsheet formulas. An easy way to do that is to drop in a button on the report sheet and have the VBA code start on that button's click event.

Resources