I have started setting up a component library and everything was working fine. Looks all ok in the component library and I am able to add components to the screens within the library. Once I try to import a component to another App I get the error "One or more component behaviour properties, event or action, have a mismatched return type". This is the same for every component in the library. I have checked the types being returned and they all look correct. Any advice on how to debug this?
Hi, Thank you much. Yes, this does remove the most warnings but for some reason one of my button is still asking for a text value (because that's was my default value for the onselect property). It is strange as this happens with only one of my buttons. Your advice still does the job for most of them and I can compromise with the faulty button. This can save the situation for now, at least until I can spare more time to go over every single app/control and fix it. However, my only worry right now is this is definitely not intended solution by microsoft. It might work for a short-term period but I would never be confident if my apps won't break again because of some not announced and global changes by microsoft.
Someone mentioned in a separate post that if you turn on the "Disable component behavior property return type" retired feature in your app settings, it might work. Unfortunately, I can no longer find that post.
Hi, this solves the issue but breaks all apps which use the previous version. When the new update is applied wipe out your previous code in the onselect property. Have anyone found a fix of that because otherwise I will have to go record every single code on every single button within each app and then again manually re-apply them with the new version of the comp. library ;/
Thanks, that did fix it. Not sure if this has always been the case but the component I had to fix wasn't the one I was trying to import also. It was on another component in the same library.
Thanks @syed-j , that worked. I really wish the PowerApps team would just announce all these changes in advance.
I started experiencing the same issue this week. The functionality of component properties seems to have unexpectedly changed. I was able to resolve it within one of my canvas apps. I think the issue in my case was that I had several components with event or action properties where I had left the default return data type as boolean while not actually returning a boolean value in the property's expression. This has always worked in the past but it seems to be throwing a warning now. Seems like PA is tightening this up.
If you're not intending to return data from your property, one way to fix this is to change the return data type to "None". See attached screenshot. The other way is to add something in your expression that actually returns the expected data type. BE AWARE: THIS MAY WIPE OUT ANY EXISITNG DEFAULT EXPRESSION for your component property and within all instances of that component property on your screens. So copy/backup your expressions before changing.
Same error as well with an additional bug I mentioned here:
Re: Components triggering when editing code - Power Platform Community (microsoft.com)
and here
Components executing events automatically when edi... - Power Platform Community (microsoft.com)
Looks like the PA team is playing with our work without consideration 😞
@Dr0idy No, I am not.
@TickoBoston Are you aware of any MS response to this yet?
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional