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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Perfectly working app ...
Power Apps
Answered

Perfectly working app quits working... "Incompatible type column in the data source you're updating expects a 'Text' type and you're using an 'Error' type". Please advise!

(0) ShareShare
ReportReport
Posted on by 3,347

I was running my final app updates and was quite happy with about 30min of testing with no errors.  I save the app, and publish it...  Now it is broken.  Strange "type" issues.  I thought it had to do with some mixing of Set() and UpdateContext().  That was entirely cleared up an hour ago, but this keeps happening...  App is great... but after save and reload, these type errors appear everywhere that I use these two particular vairables.

 

image.png

Variable is devined in the "X" shown above:

 

UpdateContext({ShowActivateBom:true});

UpdateContext({TempStartwith:Gallery_MD.Selected.MD_PartNumber,CurrentPartNumber:Gallery_MD.Selected.MD_PartNumber});

ClearCollect(PickHistory,({PickID:1,TmpSearch:CurrentPartNumber, CurrentPtNo:CurrentPartNumber})); UpdateContext({CurrentPickID:1});

Concurrent(

Set(AcctProductInfo,LookUp('[dbo].[tbProduct]',ProductID=CurrentPartNumber)),
Set(AcctViewInfo,LookUp('[dbo].[VIEW_POWERAPPS_BASIC_ACCTIVATE_DATA]',ProductID=CurrentPartNumber))

);

UpdateContext({ShowActivateBom:true})

Please dont say this is another issue with using .Selected from a gallery.

Categories:
I have the same question (0)
  • Brentless Profile Picture
    106 on at

    For what its worth, I am seeing very similar weirdness (in another post) - and I dare not publish -- it appears to me the editor has a bug that needs to be addressed asap.

     

    https://powerusers.microsoft.com/t5/General-Discussion/Forms-and-SQL-Views-Broken-Expected-a-value-compatible-with/td-p/260520/jump-to/first-unread-message

     

  • martinav Profile Picture
    3,347 on at

    I have traced the issue down to a statement in a icon OnSelect that I'm using to backup through a selection sequence.  If I delete this statement, all the red "X" go away, and everything works.

     

    The oddest part... if I paste this statement back into the Icon, it works just fine!  Until I save/close/reopen.  When reopened, all of the "X" reappear.  This is repeatable.  I cant think of anything in this statement that could be in question.

     

    Thoughts??

     

    UpdateContext({CurrentPickID:CurrentPickID-1}); UpdateContext({CurrentPartNumber:LookUp(PickHistory,PickID=CurrentPickID,CurrentPtNo)});
    
    UpdateContext({TempStartwith:LookUp(PickHistory,PickID=CurrentPickID,TmpSearch)});
    
    Set(AcctProductInfo,LookUp('[dbo].[tbProduct]',ProductID=CurrentPartNumber));
    Set(AcctViewInfo,LookUp('[dbo].[VIEW_POWERAPPS_BASIC_ACCTIVATE_DATA]',ProductID=CurrentPartNumber));
    
    Reset(Dropdown2);Reset(TextInput6)
  • martinav Profile Picture
    3,347 on at

    Ok... Here's what I narrowed it down to.  

     

    The statement above... the "RED" content is what is causing the issue.  

     

    UpdateContext({CurrentPickID:CurrentPickID-1}); UpdateContext({CurrentPartNumber:LookUp(PickHistory,PickID=CurrentPickID,CurrentPtNo)});
    
    UpdateContext({TempStartwith:LookUp(PickHistory,PickID=CurrentPickID,TmpSearch)});
    
    Set(AcctProductInfo,LookUp('[dbo].[tbProduct]',ProductID=CurrentPartNumber));
    Set(AcctViewInfo,LookUp('[dbo].[VIEW_POWERAPPS_BASIC_ACCTIVATE_DATA]',ProductID=CurrentPartNumber));
    
    Reset(Dropdown2);Reset(TextInput6)

    If I remove that statement, it will save and retrieve, and even publish with no problem.  This is not the solution, but simply finding the specific statement in crisis.  I see nothing fundamentally wrong with how it is written.  Notice the statement in "GREEN".  Its the same syntax but simply getting a different column result.  It seems to not be causing any issue.  PickHistory is a simple collection that is created in the app.  It works great in editor mode, prior to save and subsequent retrievel.  I still need a solution for why, so that I can get this function working ASAP!

  • Verified answer
    martinav Profile Picture
    3,347 on at

    Ok, finally got it.  Since this was a "type" problem, in my definition statement, I explicitly stated Text() to be sure that the type was properly set to string for CurrentPartNumber and TempStartwith variables.  This should not have been required, since the source data is clearly text already.  Some of these values are all numbers, so i'm presuming it was erroneously setting them as integer.  However, why did that not happen when originally edited in edit mode?

    UpdateContext({ShowActivateBom:true});
    
    UpdateContext({TempStartwith:Text(Gallery_MD.Selected.MD_PartNumber),CurrentPartNumber:Text(Gallery_MD.Selected.MD_PartNumber)});
    
    ClearCollect(PickHistory,({PickID:1,TmpSearch:Text(CurrentPartNumber), CurrentPtNo:Text(CurrentPartNumber)})); UpdateContext({CurrentPickID:1});
    
    Concurrent(
    
    Set(AcctProductInfo,LookUp('[dbo].[tbProduct]',ProductID=CurrentPartNumber)),
    Set(AcctViewInfo,LookUp('[dbo].[VIEW_POWERAPPS_BASIC_ACCTIVATE_DATA]',ProductID=CurrentPartNumber))
    
    );
    
    UpdateContext({ShowActivateBom:true})

    I guess this is one of the problems with automatically interpreting variable types, which eliminates variable initialization, but it doesnt always get it right.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard