cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
finalfant111
New Member

Invalid use of '.' error on several properties after PowerApps releases new version

I have inherited this application development for our company from the previous IT guy. So far I have been able to relearn the system and continue on with its development. Everything has been fine until today.


I saved my changes and published them as I always do. Next thing I know, I am getting tons of emails from everyone that the app is not showing data in several places. When I went to those places I noticed the friendly red "X" on everything. I thought I broke something on this last development. The formula checker tells me that there is an invalid use of '.' (the period) in everything. When I went to the versions to republish the last working version I noticed that the Power Apps version changed between the last one and this one. Note: there is only about a week between these versions:


3.20124.20 - Old Working Version

3.21013.30 - New non-working


The way I have it designed is that on one page, I have a gallery that gets data from a sharepoint list. I have the following code for the OnSelect property:

 

If(Gallery2.Selected.drafter_assigned = "unassigned",Navigate(tasks_errorassigndrafter),Set(drafterrecord, ThisItem);Navigate(tasks_mytask))

 

The part I have in bold is giving the error: Incompatible Type. We can't evaluate your formula because the context variable types are incompatible with other ones in your app.

 

Then after you click on that gallery item, it opens a page where it displays information from the sharepoint list that the Onselect property puts into the drafterrecord variable. All these items have a simple formula: drafterrecord.ae_notes or drafterrecord.drafter_assigned for example but they are giving the "invalid use of '.'" error.

 

All of this has been working fine for several months and is still working on the older published version. However, nothing is working in the editor and newer version of Power apps!!! I need help, at this point the entire app is broken because it all relies that set variable. Did Microsoft change something I was unaware of?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@finalfant111 

Your problem is that somewhere in your App, you are setting the drafterrecord variable to something not compatible (same record schema) with the Gallery2 Items property.  

I would look at your variable definitions for drafterrecord in your app (through the variable viewer).  Look at all the places you might be setting that variable and see where you are setting it to something beside the exact schema of the Gallery2. 

NOTE: a flag to you, if you have changed the Items property of the Gallery2, that would also be a good place to look as, if you used something like an addcolumns or dropcolumns or other data shaping functions, this will alter the schema.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@finalfant111 

Your problem is that somewhere in your App, you are setting the drafterrecord variable to something not compatible (same record schema) with the Gallery2 Items property.  

I would look at your variable definitions for drafterrecord in your app (through the variable viewer).  Look at all the places you might be setting that variable and see where you are setting it to something beside the exact schema of the Gallery2. 

NOTE: a flag to you, if you have changed the Items property of the Gallery2, that would also be a good place to look as, if you used something like an addcolumns or dropcolumns or other data shaping functions, this will alter the schema.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Thank you for your response. After looking at variables I found that some of the pieces were saying Contribute type is Record and others it was saying Error. Specifically, when I deleted a button that wasn't being used for one that was showing Error for one of the variables , it fixed the drafterrecord issue. However, the other variable is still broken and I can't figure out why. See pictures

 

Here are the variables having issues

variables.PNG

 

This one is the drafter record. Where I circled it is where there was one for a button showing error. After deleting the button, it now shows record and everything fixed.

old drafter record.PNG

 

Here is the project detail variable. It is showing the same error, but all the types are the same?

project detail question mark.PNG

None of this makes sense. This stuff was working fine in the previous version of Power Apps. After they updated, this is all broken.

project detail uses.PNG

project detail uses2.PNG

project detail uses3.PNG

finalfant111
New Member

Just a quick update. So I seem to have fixed it by simply recreating a new variable and setting everything to that new variable. Specifically I took my ProjectDetail variable and added an "S" to make it ProjectDetails and then updated all instances with the "S". Now everything works. The ProjectDetail variable now shows it has no instances. In a nutshell, nothing really change or was deleted, only made "anew". Why it broke in the first place, I don't know, but it is fixed now.

RandyHayes
Super User III
Super User III

@finalfant111 

Just be cautious with setting a variable to a record.  This is acceptable, but changes in the underlying record schema will negatively impact things just like this.

I am glad you got past this one.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,503)