web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Variables changing to ...
Power Apps
Unanswered

Variables changing to Incompatible type

(1) ShareShare
ReportReport
Posted on by 202
I have a global variable that is included for moving form to form or is included in a gallery.
The variable is Set(CurJob,Job_ID where Job_ID is a varchar text field in a AZURE SQL database.  Variable works fine throughout the application.
Variable Check shows CurJob(Text,"")
 
If I change the source of a gallery in Design mode by adding a filter for a column - from Filter(Gallery1,Builder="AB") to Filter(Gallery1,Builder="YZ"), the variable CurJob will cease to function throwing "Incompatible Type" errors.
Under the Variable Check, the it now shows CurJob(Text:Blank).
 
There seems to be nothing I can do within the Design session to reset the variable, CurJob, to a text type of "" or any other Text, "101".
 
The only way I can resolve this error is to save/publish/close app and then reload in design.  CurJob text variable is again functioning as expected.
 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at
    Hi
     
    Firstly, please provide all the details of the error, not just the "generic", as right now I have no idea where in the App its happening etc as there are no pictures.
     
    If you are getting Compatibility type issue that means only several possible things
     
    1. You changed the source and the data types are different between them so now the Variable doesn't match
    2. You have the variable in many places and at least one of them is trying to change it
    3. My belief is simple, when you are publishing and reloading your are zeroing out all data variables etc. So when it first comes back you are good, but I expect it to happen again, as soon as it hits the code section that the current type doesn't fit
     
    The reason its important to share the other details of an error is honestly most of the time the answer is obvious when you look at it from the perspective of the red squigles and the exact verbiage like
     
    Compatibility Error
    You are comparing Text and Record.
     
    Thats what we need. Then we can help you determine why in that spot is the left side or the right side of the expression changing or not right
     
     
     
     
     
  • lknudson1 Profile Picture
    202 on at

    Original Item data source for gallery – filtered Azure SQL Database View, v_PaintJobList (no errors)
    Original Devault value for gallery (no error)



    Value for tmpJob is ‘Blank’ on gallery open.
    No errors in running gallery with runtime.




    I then go to Design mode to make a change.

    Change gallery source to same SQL View, v_PaintJobList, but I remove the filter.

    Error is introduced.


    Error shown on gallery Default value.

    Every other use of global variable tmpJob now has same error.

    I don’t see value of tmpJob assigned anything other than a new text value in Variable Definitions.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard