I am new to building flows within Solutions, so I could need som help with how best to use environment variables. I am creating a flow which moves a file from one folder to another within the same site.
So far I have been able to create EVs for both the Site and the Library. Is there any way to create an EV to specify which folder it should move to? (See image: now "/Documents/FolderName")
And if this is not possible, what is best practise? Do you just have to manually enter the folder when moving the Solution to another environment?
I appreciate any help,
Thank you!
Hi @sdedic,
I guess it depends on what your trigger is. But in my case I am using a Sharepoint trigger "When a file is created". In the actions following you can directly choose the file identifier from this file from the dynamic content menu. You can search for "identifier" if you have english set as language. (See images)
This only works I guess, if you both have a trigger that relates to a specific file, and that it is this file you are trying to access.
Hi @Anonymous,
Thank you for your help. Unfortunately, I got the same error when tried entering the path without first '/'.
I think I didn't understand quite well your first scenario, where you say I don't need env variable. Could you please explain it a bit more?
Anyhow, I am using env variables as I am importing a solution do a different environment and mapping them to production lists. Hope this provides a bit more context why I need env variables.
Once again, thnx for the help.
Best
Hi, @sdedic
When I am choosing File identifier I always use it relative to one of the files in the flow, so I would just use
This worked for me!
I was hoping there was an option to chose from dropdown menu of existing folders like you can for sites and libraries, to reduce possibilities for manual mistakes.. But this will do. Thank you 🙂
Hi @Tristan_D,
I've tried your idea, however I am getting an error. Please see the screenshot below to get more context:
Here is the action in edit mode to confirm that environment variable is there:
Any idea why throwing such error when the path is exactly the same as when I select it through the 'folder' icon?
Best
Hi @Anonymous ,
I would suggest you to use a text Environment variable :
You can also consider concatenate two Environment Variables to build your folder/sub folders chain.
Let me know if it helps.
T
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2