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:
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:
Thanks!
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
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
202 | |
69 | |
49 | |
45 | |
20 |
User | Count |
---|---|
258 | |
120 | |
84 | |
77 | |
69 |