cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

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!

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: 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!

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.

4 REPLIES 4
Highlighted
Brentless
Level 8

Re: Saved app working perfectly. Saved & published... Now it opens broken... Both in Runtime and edit. Please advise!

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-c...

 

Super User
Super User

Re: 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!

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)
Super User
Super User

Re: 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!

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!

Super User
Super User

Re: 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!

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 22 members 4,360 guests
Please welcome our newest community members: