Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Environment Variables and Choices() function issue



I have an issue with using a combination of Environment Variables with SharePoint as a Data Source. Here are the steps taken:

  1. Created a SharePoint List with couple of different fields: single line of texts, person, choice, etc. Nothing fancy. 
  2. Created a solution in one environment, added environment variable for previously created site and list
  3. Created canvas app in that solution, added connection to SharePoint with usage of previously created environment variables. Created screens for listing and editing items. All works fine for that part.

After that wanted to move that solution to a different environment in a different tenant. Here are steps taken:

  1. Removed current value of Environment Variables
  2. Published all customization
  3. Exported solution
  4. Created fresh site in other environment using PnP Provisioning
  5. Imported solution to other environment, choosed new site and list.

Now what happens is that after doing all of these steps, app itself runs okay but when trying to edit or create a record an error is thrown, saying that "The specified record was not found. List not found". When opened app in edit mode all of the fields that are using Choices() function are failing with that error, others are working fine. I could fix that by removing data sources and re-adding them again but then whole purpose of Environment Variables is lost. Is there anything that I am doing wrong? Or is it some kind of a Ms bug? (among others...)


Thanks in advance,


Super User
Super User

Microsoft is already deploying a fix to some customers as far as I am informed. Will take some time till it will reach all Tenant I guess. Actually all complex field Types are not working as expected. 

​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @leksi31.  Yes, I have. I have been declaring something like this on the OnStart:

ClearCollect(lovStatus, Table( {Value: "Enable"}, {Value: "Disable"}));    //lov --> List Of Values


And replacing "Choices( <SomeList>.Status )" with "lovStatus".


Probably I'm going to create a new list called LOV with two columns: Title and Value. 


Title                    Value

----------             ------------

Status                  Enable

Status                  Disable


And load the lovStatus with a something like this:

ClearCollect(lovStatus, ShowColumns( Filter(LOV, Title = 'Status'), Value));




Regular Visitor

This was resolved in Power Apps version 3.22022.31. 


how do we find the PowerApps version running?

When editing your canvas app, go to File > Settings > Support.  It is displayed as Authoring version.

Post Partisan
Post Partisan

 I made a new test importing a solution (with environment variables) in a new tenant. Complex type fields seems to be working this time (Lookups, choices )

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,618)