Skip to main content

Fixed: Environment Variables Don't Show in Dynamic Content in Power Automate

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

My flow was in a solution, but its dynamic content had no Parameters group, and searching for the environment variable I needed said There are no results for your search. I had opened the flow from My flows. Opened from its solution, with Edit on the flow's own page, the same flow listed every environment variable.

What I Was Doing​

I was building Import Old Overtime Timesheet, a flow of the Overtime Timesheet app that copies an old Excel timesheet into a SharePoint list. I'd created it inside the app's solution, Overtime Timesheet (How to Create an Instant Cloud Flow Inside a Solution in Power Automate), saved it, and opened it again later from My flows > the flow > Edit.

The solution has environment variables for the SharePoint site and its lists, so no flow has a fixed site address (How to Use Environment Variables in a Power Automate Flow). I added a SharePoint Get items action, chose Enter custom value in Site Address, and opened the dynamic content list to pick the variable Overtime Timesheet Site.

What I Expected​

A group called Parameters in the dynamic content list, with the solution's environment variables in it, as in the flows I'd built in the same solution before.

What I Got​

No Parameters group. Searching for the variable's name found nothing:

The Get items pane with an empty Site Address marked 'Site Address' is required. and an empty List Name marked 'List Name' is required., beside the dynamic content list searched for Overtime Timesheet Site, saying There are no results for your search, with search tips

Without a search, the list had only the outputs of the flow's two earlier steps, the Excel action List the old rows and the trigger, Manually trigger a flow:

The dynamic content list with two groups only: List the old rows, the Excel action, with See more (20), and Manually trigger a flow with See more (14), and no Parameters group

What I Checked​

The flow was in the solution. The solution's Overview listed it under Recent items, as a cloud flow.

How I'd opened it. I'd opened the flow from My flows. The editor's address read …/solutions/~preferred/flows/<flow ID>: it wasn't the flow's own solution. Opened from the solution, a flow's address carries that solution's ID instead.

Microsoft's documentation. Use environment variables in Power Automate solution cloud flows starts with:

  • Environment variables can be used in solution cloud flows since they're available in the dynamic content selector.
  • Step 1: Edit or create a cloud flow in a solution.

Why It Happens​

Microsoft's steps start in the solution, and the variables appeared when I followed them. My reading of the evidence: the editor I opened from My flows wasn't working in the flow's solution, so it had no solution's variables to offer, though the flow itself was in one.

The Fix​

  1. Leave the editor. Save first if you have changes you want to keep: leaving shows If you leave this page, you will lose all changes since your last save.

  2. Open the solution. In Power Automate, select Solutions, then the solution, Overtime Timesheet here.

  3. Open the flow from the solution. On the solution's Overview, select the flow's name under Recent items. Objects > Cloud flows lists it too:

    The Recent Items list of the solution's Overview with Import Old Overtime Timesheet, of type Cloud Flow, in the first row and its display name outlined in red

    The flow's page opens in a new tab. The solution's tab waits with a message until you come back to it:

    The dialog Currently editing a cloud flow: When you're done editing the cloud flow, click Done below to return to the page. This will refresh the page and fetch your changes., with a Done button

  4. Select Edit on the command bar of the flow's page. The Edit link on the Details card opens a panel for the flow's name and description instead.

    The command bar of the flow's page with Edit outlined in red, followed by Share, Save As, Delete, Run, Send a copy, Export, Process mining (preview) and Analytics, above the breadcrumb Flows > Import Old Overtime Timesheet

  5. Pick the variable. In Site Address, choose Enter custom value, open the dynamic content list and search for the variable. The Parameters group is there:

    The same Get items pane with the dynamic content list searched for Overtime Timesheet Site, now showing a Parameters group with Overtime Timesheet Site (dewiride_OvertimeTimesheetSite)

  6. Go back to the solution's tab when you've finished, and select Done.

After the Fix​

Site Address and List Name both took their environment variables, and the action read the right list:

The Get the departments pane with Site Address set to the Overtime Times… variable, List Name set to the Departments (d… variable, and Top Count 5000 under Advanced parameters

The Same Symptom After Adding Variables​

Later, in the editor opened from the solution, the Parameters group once listed only the two variables I'd just put into Get items, the site and Departments. A search for OvertimeEntries, the third list, found nothing.

The same page of Microsoft's documentation lists, under its limitations, that the variables in the selector are unfiltered, and that if an environment variable is added in another browser tab, the flow needs to be reopened in the flow designer to refresh the dynamic content selector. I hadn't added a variable anywhere, but reopening was the documented way to refresh the list: I selected Save draft and reloaded the editor. The Parameters group listed all the variables again. It happened once, and I couldn't make it happen again.

Common Mistakes​

MistakeWhat happensDo this instead
Opening a solution flow from My flowsNo Parameters group in dynamic contentOpen it from the solution, then Edit
The Edit link on the Details cardA panel for the name and description opens, not the editorEdit on the command bar
Looking for variables in a drop-downThey're only in dynamic contentEnter custom value first
Leaving the editor without savingYou will lose all changes since your last saveSave draft first

Troubleshooting​

SymptomLikely causeFix
There are no results for your search for a variable's nameThe flow was opened outside its solutionOpen it from the solution
Only some variables listedThe list wasn't refreshedSave draft, then reload the editor
Variables of other apps in the listThe list shows every variable in the environmentSearch for the name you need
The flow isn't in Recent itemsIt was changed a while agoObjects > Cloud flows

FAQ​

Is the flow outside the solution when I open it from My flows?​

No: the solution still lists it, and it runs the same way. Only the editor I opened from My flows lacked the variables.

Do I need to open the flow from the solution every time?​

Each time you need to pick an environment variable. Variables already in the flow stay in it however you open it.

Why does the list show variables from other solutions?​

Microsoft's limitations note says the variables in the selector are unfiltered. In my environment, the Parameters group listed every environment variable, including other apps'. Searching for the name finds the one you need.

Conclusion​

When a solution flow's dynamic content has no Parameters group, open the flow from its solution: Solutions > the solution > the flow > Edit on the command bar. The variables are listed there, and if the list ever looks short, saving the draft and reloading the editor refreshes it.

Additional Resources​