What will we do without your knowledge sessions like this? 🤔 .. Thanks, Reza, for this and for all your video sessions. Your service is so very valuable and very much appreciated.
I remember seeing this a couple of years ago and not being able to fully grasp everything. Today I’m using this strategically. I used the video for a refresher… Thanks mate.
Thanks for sharing Reza. This has made me keen to explore how will the updates happen to say your App or flow, once you move your solution from say QA to Production.
this is brilliant , informative and much needed for me to get practical view of solutions and moving them across environments , very much appreciated!!!
Thank You. Managed vs Unmanaged is very well covered in the documentation - docs.microsoft.com/en-us/power-platform/alm/solution-concepts-alm#managed-and-unmanaged-solutions
Completed agreed. On the Power Apps community call next week, there is a lot more on environment variables - powerapps.microsoft.com/id-id/blog/may-19th-power-apps-community-call-multilingual-power-apps-environment-variables-and-more-environment-variables/
Nice! Smart solution to support non-native (non dynamics) components like power apps power automate. It was working well with CDS before. I remember that in some scenarios it doesn't allow you to add existing flows to solution previously. Hoping that it works for everything now. Do we need cds enabled environment for it? How will it work for power apps list form with multi environment support now ( another video on that) ? Thanks Reza for this one. 😊👍Crystal clear.
Dataverse/CDS enabled environment is needed to work with solutions. Process of importing existing flows and apps to solutions has significantly improved. For SP customized list forms with Power Apps, I don't believe there are supported yet. For standalone Apps connected to SP Lists, this will work as demonstrated in the video.
@@RezaDorrani Thanks. Key ALM update announced does say that PowerApps list form will support ALM and multi environments. Roadmap is not clear. Could not imagine how but hoping environment variables will work for them as well. powerapps.microsoft.com/en-us/blog/key-alm-updates/
Excellent Rena as usual!! Thank so much for sharing. I would like to know how to move solutions from one tenant to another. That is painful. Also, I wonder if there is a way to duplicate the SharePoint site and lists so I don’t have to create them manually in production when I’ve already created them in development.
The process of moving solutions from one tenant to another is same as moving from one environment to another. To duplicate SharePoint sites and lists you would need to ensure that you create your lists via site designs feature in SPO. docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview You can even trigger site designs using flow. Long ago I had written an article on this - rezadorrani.com/index.php/2019/01/14/invoking-unlimited-actions-with-site-design-tasks-and-microsoft-flow/
You can also make use of PnP provisioning templates. They work great if to be used by support team rather than end users. They are more powerful as well. For end users Site design make most sense.
Thank u so much! Awesome content. Question, when creating a production sharepoint list(s), i believe the column names need to be the same. Is there an easy way to copy the test SP list to create a prod list or should i just manually create the new list and make sure the columns match?
Thanks for amazing video. Nicely explained. I have one issue- not able to find environment variables in power automate. Even Add dynamic conent is not showing in trigger
I will have to look at your flow in action to provide guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Hey Reza! At 13:00 you mention that we need to remove the Environment Variable site value before we export the Solution- will I need to add that value BACK in after I export the Solution so I can continue work on that development Solution? And is this is a step I need to take EACH time I export a Solution with Environment Variables? I've been doing a lot of learning and work with Solutions, Environments, and Pipelines and your videos have been immensely helpful, thanks for all the great content!
Tks a lot Reza !!!!! Just one question, every time that you bring some features from DEV to Prod environment, you need to compile the solution and import other time to production ???? The link URL to the App will always modified ? TKS so much!!!! 👏🏻
Thanks so much Reza for the amazing content you always produce, it is very much appreciated!! I had a question with regards to a specific scenario and that is having multiple projects and for each project we need to deploy an App and a set a flows every single time. The App will be exactly the same and flows do the same thing but just pointing to a different SharePoint site each time. Would it be possible to create a solution to act as a template in a DEV environment and then basically deploy that template in a PROD environment but each time with a different name and also get it to recreate the resources within the templated solution as new ones (i.e. App and flows)? Hope that makes sense and thanks again very much for all your incredible efforts.
With SharePoint usage inside solutions, all you get is a reference to a data source. When you move from dev to test to prod, you would need to ensure your SharePoint sites and lists are all in place. You can automate that process through flow as well.
Thanks @Reza this is really helpful, I was really struggling with this issue as all apps were created in Production and have to migrate manually. Awesome :)
Thanks for this. I have come up with an issue on the Environment Variable name because the 'The length of the 'displayname' attribute of the 'environmentvariabledefinition' entity exceeded the maximum allowed length of '100'."}}'. The naming convention for the SharePoint site is managed by the customer. Is there a way to get around this limit?
Awesome. Thank you. How would I handle running flows when I import an updated environment? Do I need self-recovering flows that will restart on every item and continue as needed?
Wonderful presentation and highly needed feature. Thank you very much Reza. I have a question: when adding an Existing component e.g. app, how do I enforce the app to produce the Env. Vars? (Note: The app setting "Automatically create environment variables when adding data sources" was set to On and the app was republished consequently)
You will need to remove existing data source connection & re-add. If even after app setting it is not showcasing the environment variable, then it may be a bug.
Thank you so much for your videos. They are extremely helpful! Is there a way of doing this but with a SQL on prem data source instead of Sharepoint Lists?
Hello Reza, Thanks for this wonderful video. I am facing an issue with Choices in PowerApps. Choices('list name'.'choice type column') This statement is giving an error after import - list not found. Is there any issue?
Hi Reza so many thanks for all your tuto I'm learning so much with you thank you again. If you have time I'd like to ask you something... Is that possible to do the same things you do with solution in differents environment than in the same environment ?... One application for two users with differents sharepoint lists : how can I do the same kind of Environement Variables but in the same environnement?....
Thanks a lot for wonderful video Reza.. Your videos are awesome and very much detailed to help beginners as well. I see we can provide environment variables for power app and flows. I want to check if I customized SharePoint list form in power app. How can I deploy that form in production environment? Do we need to follow this solution and variable approach Or is there other way for the customized SharePoint list form?
Thank you so much Reza for this great walkthrough on environment variables. I can understand if we used environment variables in the canvas app and we want to move the solution from dev to prod. it is not needed to re-add the datasource to the app and reconnect it to the form so it will avoid replacing datacards and we will not lose the datacards logic validations in the form right?
thank you for your amazing explanation I've try adding existing power automate flow into solution. but, the original flow in 'my flow' power automate was not there anymore. Thus, I copied back the flow and delete the solution. however, here come my problem. when I run the flow, it become redundant as run at two different places (my flow & solution). how can I turn off the flow in solution as it was not usable anymore?
Within solution, when you go to cloud flows, you should have option to turn them on or off. I will have to look at your solution in action to provide further guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Awesome Reza once again. The explanation was clear and understood. thank you so much!!! If you can answer this. 8:41 I do not see the option to "Add a custom item". Do we need to activate any feature? Or Do we need extra permission at Security Role area?
@@sharepoint2936 Cannot explain without looking at your issue in action. I will recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
Can you go in and modify the environment variable name afterward? It looks like it inherits the name of the datasource you use to create it initially? Small nitpick, but it'd be weird to have the env variable be called "ServiceDeskTest" in the production version of the solution. Also, very informative vid as usual. Thank you!
You can modify it in the Solutions page. However, I have noticed that if you modify it, you will need to go back to your app or flow and re-associate. Not ideal. Im sure these small issues will be fixed soon.
Very good informative video. I have a question - Suppose I imported the managed solution in my test or prod environment from Dev one. Now I have to change some component or add some customization to the app. So do I have to repeat the process again like first change it it dev then export it to test and prod or it will be visible to the environment automatically? 🤔
Thank you Reza for this video much appreciated. SharePoint will have different sites for dev and prod, is the flow shared between dev and prod? If we only have prod, can we go back and create dev and qa then package the prod and push into qa and dev? Thank you.
Great video. I am having issues with Choice fields in PowerApps are not populating data though I set environment variable of the Prod environment. getting "The specified record was not found. Server Response: ListURL failed: List not found ". May be this could be bug from MS?
Hey @Reza and wow that's a great video - I just tried it out with a rather complex flow & app and it works perfectly fine! One question though: if I want to duplicate a solution within same environment, what's the best way to go? It seems that I cannot just export a solution and import it again as it already exists The idea is to use this solution as a template, so others can just customize the app & flow contained within the solution. Thanks in advance
Hello Reza Dorrani, Thanks a lot for the helpful video sessions! I have a doubt, Is there a possibility to move APP and Power Automate Flows from One Environment to the Other Environment, That I want it to be only for the Developers. If So Whether the App and Flow will function which is already linked to data of existing sharepoint and environment ? TIA :)
Welcome! Not sure I understand your question. Solutions can move apps and flows. Once moved to target environment, you can either connect to new site and list using environment variables or connect to existing ones without using it.
Thank you for all your videos! They have helped me tons! I will need to export solutions to different tenants soon. Here i noticed that after creating a Solution, you created new canvas app. If we had to add an existing App that was created prior to enabling Environment Variables from it's settings, it would add the Environment variables to the Default solution and not the one we created. Must we create All apps and flows within the Solution?
SharePoint sites are not environment specific. They are tenant specific. If you need another site with similar config and permissions, you would need to look into site designs, site scripts & PowerShell.
I make videos when I get multiple requests on a particular topic. Every quarter I ask subscribers for topic suggestions on the Community Tab of my RU-vid channel. Subscribers vote for topics and the highest voted topics get added to my backlog.
Hello Reza, You know how to catch pulse of the community. You are a greatest asset for all of us. What needs to be taken care for existing apps and flows. These are the steps I followed but somehow the data sources are still pointing to my source tenant. I have SharePoint lists with the same schema on both source and Target. 1. Created solution and added my existing app and flow. Edited my app and enabled the environment variables setting. Anything else I need to do here? I have not removed and added data sources back. 2. Created environment variables for 1 SharePoint site and 2 SharePoint lists. 3. Removed the current values from all the 3 environment variables of the solution. 4. Exported and Imported the app. While Import it didn't ask me to update environment variables. So I went to default solution and updated the 3 environment variables there. 5. Edited the app and SharePoint lists are still pointing to my source tenant. Where was I wrong?
I noticed everytime you connect to a List, it creates one variable for Site and one variable for List. When you connect to multiple Lists in a Site, it still creates as many Site vairables as the List variables eventhough the Site value is same. Can we get rid of the redundant Site variables, Reza?
When you try and connect to a new list, you do have an option now where you can select an existing environment variable. That way it does not create a duplicate. I think I showed it on the community call. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xCgIwP7EUw0.html
Hi Reza, thanks much for your Knowledge sharing for all out there and me. Can we do this for SQL connection as well? I see only 3 choices, SharePoint, dataverse, sap ERP under data sources in env variable.
I have not done any work with sql hence not sure. I will recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Hey reza, again great video. Do you know if its possible to manipulate the environment variables from inside a app or a flow? Actual i use sharepoint list to store needed variables which i need in runtime of my apps or flows. But think it would great to use a environment variables for it cause i am able to use them in flows without a special initalize.
It's really helpful as new developer of power platform. I'm trying to generate environment variable automatically. However, It pops up an error message says the length of the display name exceeded the maximum allowed length of 100. I've check the property of the column "Environment Variable Definition" but It could not be modified. Could you please kindly give me some hint?
There is a fixed length to the name of the variable. Your site url might be very long. You can also create your environment variable first (so u can name it) and then use it in your App. Check ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xCgIwP7EUw0.html
Thanks again for the video Reza. Clearly explained. Is there any way to automate this entire process by passing environment variables as a parameters using through powershell? I'm going to figure out that option. Pls share your inputs on this.
Yes. Look out for the Power Apps community call this month. Follow me on twitter for more details of the call which we will post about in the coming weeks - twitter.com/rezadorrani
Thanks for the video. I have one question. I have office 365 outlook connector added in my Powerapps app. This app is added in the solution. I was told to create connection reference for this but how do I use this connection reference in powerapps?
@@RezaDorrani yes, it got automatically added when solution was imported in target environment. So I do not need to create connection reference for powerapps, right?
Thanks a lot for this video. I have a question for you if possible. Is it possible to create a variable for a Microsoft form id and use it ? My idea was to create a first step when a form is submited and a second one to get the details. I have created an environment variable in my solution with the form id but wasn't able to use it in the two steps (the environment variable isn't displayed)
I have not tried this scenario but may be it is possible. I will recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com
Again, Thanks for the great tutorial. As always appreciate great insights and tutorials that you provide. I have a problem that I want to see if you have a better alternative. The problem is, I want to display data from different SP list based on User's login. Usually the lists all are in the same site collection. The way I have done is, having connections to each of the list and different gallery control attached to each of this data connection. I show and hide based on user's access. The problem with my approach is when new list comes in, I have to add new connection and new gallery and publish the app. This just isn't efficient. I want to make it dynamic. Is there a way to dynamically change the data connection's site URL (this is not really needed in my case) and List (provided they have the same schema).
You can dynamically define data source in power apps. Your approach will cause performance issues since more lists will require more collections. If security is your issue then may be SharePoint is not the best data source. I will also recommend you post you query on the forums and see if someone has come across this scenario powerusers.microsoft.com
@@RezaDorrani Thanks Reza, Appreciate your insight. We had to use Azure SQL instead of SharePoint. We wanted to use Standard connectors instead of premium. We didn't had choice. Irrespective, always appreciate your responses and videos. Thanks
Hi Reza - thanks for your amazing video. Helps me so much. In my case I exported the solution and i tried to import it on another tenant (I created a SP site and a list which is exactly the same structure as on the dev tenant). Is that also possible or is an export/import between two tenants not possible? Thanks! BR Thomas
Thanks. I tried it exactly the same way as in your video. But I think the variable was not saved during import. After starting the app I got an error - "Unknown error occurred"
@@thmwg Seems like something is not configured right in your case. I will have to look at your App / env variable in action to provide guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Great Video! We used the same approach in our apps but after we export the solution and choose Sharepoint site and list from environment variables, it still somehow pulls data from old values. Not sure if this is a bug. Any idea?
@@RezaDorrani recently I appeared for an power platform interview and in the end I mentioned your name to interviewer that I follow Reza :) and he was aware of you... :) you create nice content and have presentation skills. Keep up the good work 💪
Awesome video, as always :) I was wondering if you have faced similar problem recently (to me it looks like some kind of a bug from Microsoft): I used this approach with SharePoint based application but when ran the app and edited a record it threw an error in message bar: "The specified record was not found". I checked the app in edit mode and it seems that all form elements that were using Choices(DataSource) expression were failing, saying that List that is a Data Source doesn't exist. I had to remove Data Source and add it again but this makes using Environment Variables pointless. Do you have any suggestion where to look at?
I believe it is a bug as of now related to the Choices function specifically. I will recommend you report this on the user voice section on the forums at powerusers.microsoft.com/
Hi Reza, thanks for the wonderful video :) We have a requirement to update an environment variable in a managed solution (production app) ; can you please guide on the same. I saw a blog post which mentioned that there is an existing bug in updating Env Var's in managed solutions.
@@RezaDorrani Okay. But say for eg, I need to update the datasource again in production (eg SharePoint Production Site URL has changed). Is it possible to manually update the value of the env var alone (in the Environment Variable Definition Entity) without re-importing the solution ? Just wondering if that aproach would cause any unforeseen complications.
@@RezaDorrani Thank you Sir !! I think MS needs to have a better way of managing/updating environment variables . Similar to config/xml files that we use for .Net , it needs to be an easy update when required.
Possible but currently reading environment variable in Power App requires querying Dataverse. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xCgIwP7EUw0.html
Hey Reza, awesome information. Do you know if this will also work with flows that are connected to D365F&O. Currently when i deploy the solution to a new env, I have to manually change the d365 url in the flow. Let me know. Again thanks for the video
Hi Bruno, that should not require an environment variable since Dataverse/CDS has the current environment connector. The feature showcased in the video only works with SharePoint.
Hi Reza, thanks for this video. v. useful. Few issues I am facing if you could suggest. I am not getting the option to add the Environment var (you shown in 8:40) in Power Automate. Do we need to enable any settings ? 2. As shown in step 12:21, Flow component didn't add their connection reference - Office Outlook and SharePoint. PS - I am using Trial environment.
Hi Reza, I follow you from a long time, thank you very for your huge support! I have found a strange issue with this flow. If I try your example with a form I got a problem loading choices values. I mean that after that I have imported the solution on the new environment (in a different tenant that has no access to the original source!) the gallery work correctly but I get an access denied on loading choices values coming from the form. Analizing the call I've found that power apps is still searching the choices from the original source. Have you got the same situation? Do you know any possible workarounds? Thank you very much as always!
I have not tried this cross tenant. This is a new feature and has had quite a few bugs which have been fixed recently. This could just be one of them. I don’t think there are any workarounds. This is just a feature that should work out of the box.
@@RezaDorrani Thank you for your response. In the meanwhile I made some tests. The problem is that when I open my App in a new tenant the App continues to reference the original list guid when loading data for the Choices function (whatching the invoke call I see that it search on the new site but with the guid of the original table and so it get 404 and the dropdown breaks). So I tried to remove the datasource from the App and then add it again using the environment variables and then the choices function finally got the correct table. By the way it seems that we still have to detach/atach datasources. Hopeful Microsoft will fix this bug soon because it is a very very useful feature when making app for thirdy party.
@@EmanueleFabbri I had to do that initially for an App in the same tenant as well. Thanks for sharing all your findings. Im sure it will help a lot of folks who are reading the comments.
very well explained and problem solving video for soliution import export, but i have one question at 8:50. in flow i am unable add env variable, or unable to find parameter option. it sows custom value and cant fine env var in it.... pls explain stucked here
Save flow. Edit again and see if it works. If still none shows up, then I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
I followed all your instructions except I used the Patch function instead of SubmitForm. However, after importing the solution to another environment, I encountered a 'Network error when using Patch function: You don't have permissions to edit this row' error when attempting to create a new record. Please help me resolve this issue.
I have not come experienced the mentioned issue and hence not sure what is the cause or fix for it. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
I think I waited too long to do this! When I try to add my cloud flow and add the "when and Item is created", I don't see the option for dynamic content to be able to select the environment variables. Also when I add the cloud flow, though the "maker" environment looks like power automate, the url reflects powerapps (i notice yours at the time pointed to flow). Maybe I need a premium license to add flows to a solution and have all the environment variables? Im going to keep hunting but hoping you have an answer! Thank you for getting me all this way!
Solutions requires Dataverse in environment, but user does not need to have premium license to create and use solutions. As for your issue, I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
@@RezaDorrani Thank you Reza! I heard from someone already that there is a known issue with triggers not working with environment variables. Either something has changed since a year ago when you posted this video or the issue is intermitent (only on some solutions). Im going to start over from scratch and see if the problem persists. Thanks for the prompt response!