cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jonathanO
Advocate II
Advocate II

Variable Definition Screen: Contributes type

I internmittently get an error in PowerApps:

 

The types of the specified context variables are incompatible with the types specified elsewhere.

 

I know that this error happens when the auto-merge algorithm for data types cannot reconcile the usage/definitions of a variable.  I have a Context variable called Response that is used to store the response from a custom connector call (logic app).

 

Response contains a property called Result (Response.result) which has an error message that is returned from LogicApps if there was a error.

 

I use the Response.result in a text lablel element to show the error to the user.  I am currently getting the "specified context variables are incompatible..." error for the Response variable.  When I look at the Variable definition screen, I see this:

 

PowerApps_Min.PNG

 

 

I assume that "Contributes type" means that this is the type that each definition is attempting to make the variable.  For the definitions where Contributes type is _Min, I am doing this:

 

UpdateContext({Response:Blank()})

 

I do this when the user navigates away from the screen.

 

My questions:

 

  1. What does "_Min" mean?
  2. It looks like "Error" is a type of variable?  Is that true?  I don't see it mentioned on the variable documentation.
  3. If Error is a type of variable, what is the best way to clear it, null it, blank it, empty it, etc so that there is no type conflict?

 

Thanks!

 

1 REPLY 1
v-micsh-msft
Community Support
Community Support

Hi @jonathanO,

 

The Definition panel for the Variables should be the place where the variable has been used for.

And the Contributes type should mean the actual type that the place would generate for this variable.

So for the _Min type, it is recommended to check the custom connector side for the definition.

By the way, there should be Responses pre-defined within the OpenAPI file, which I think the type here should be passed from there.

 

Error should be treated as a type of the variable defined.

 

You might need to define the response part for your custom connector, and then create a collection to hold the response data.

https://docs.microsoft.com/en-us/powerapps/create-update-collection

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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