microsoft / powercat-creator-kit

This toolkit helps create well-designed Power App experiences on the web & mobile. It contains a component library; PCF controls and other utilities that increase developer productivity.
MIT License
296 stars 49 forks source link

[Creator Starter Kit] BUG: Getting an error on the OnButtonSelect property of the Dialog control from the Creator Kit by Power CAT Team. Error: Expected Record Value #424

Closed kimxaviernati-alm closed 4 months ago

kimxaviernati-alm commented 7 months ago

Getting an error on the OnButtonSelect property of the Dialog control from the Creator Kit by Power CAT Team. Error: Expected Record Value

To Reproduce Steps to reproduce the behavior:

  1. Create a canvas app
  2. Add the Dialog control from Power CAT Component Library
  3. Write formula to the OnButtonSelect property.. UpdateContext({showHideDialog: false})
  4. See error "Expected Record Value"

Expected behavior I expect no error. The error came up all of a sudden on 11/10/2023. Error was not there before that date and PowerFX was fine.

Additional context Using version 1.0.20230421.1 of the Creator Kit by PowerCAT Team Error doesn't make sense.

AB#946

VishChandra commented 7 months ago

Came here to raise the same issue. This is happening on Panel component as well.

endub-22 commented 7 months ago

Encountering the same issue. If i put a record value of {value:0} i get a new error which says "The record passed in has none of the expected fields: Color, Fill, Label".

Not sure if related or not but get a similar issue on the Header component OnBackSelect property which is now saying "Expected Boolean Value"

krispcad commented 7 months ago

Encountering the same issue. If i put a record value of {value:0} i get a new error which says "The record passed in has none of the expected fields: Color, Fill, Label".

Not sure if related or not but get a similar issue on the Header component OnBackSelect property which is now saying "Expected Boolean Value"

based on your test, I tried ading "Self.SelectedButton" as the record and it removes the error and reinstates the expected functionality. So you can do something like: Switch( Self.SelectedButton.Label, "Cancel", Notify("You pressed Cancel"); Self.SelectedButton, "OK", "Notify("You pressed OK"); Self.SelectedButton )

Litoss90 commented 7 months ago

Same Problem here, The Solution with the Self.SelectedButton does not work on my Side - but i have also bit more complex logic than the example from above.

Would be great to get a quick fix for this otherwise i need to change all dialogs and panels in my Apps if i want to publish a new change.

Just a note - At the moment the failure just appears in the PowerApps Studio the published Versions function properly. I did not test how it behaves when i publish a new Version.

WhereCodeGoesToDie commented 7 months ago

I am having the same issue with the Panel Control. Noticed also that my own compoents using "Action" as the type are now asking for the boolean value that they were not before. Could be related?

krispcad commented 7 months ago

Same Problem here, The Solution with the Self.SelectedButton does not work on my Side - but i have also bit more complex logic than the example from above.

Would be great to get a quick fix for this otherwise i need to change all dialogs and panels in my Apps if i want to publish a new change.

Just a note - At the moment the failure just appears in the PowerApps Studio the published Versions function properly. I did not test how it behaves when i publish a new Version.

Hi, My logic is more complicated also, just tried to show a simple example... here is my full code behind the OnButtonSelect: image

The Self.SelectedButton statement is the last statement within each case of the switch, which is working for me at least.

phadjipetrou commented 7 months ago

Hello All; I am also getting the same issue that happened this morning when accessing my environment the creator kit panel isn't working. For some reason the onButtonSelect is disabled I even tried editing the panel. Please, we need an urgent fix on this issue as this is affecting the majority of my core functionality.

phadjipetrou commented 7 months ago

Power Cat Creator Kit is showing the same error with the Panel onButtonSelect. Please look into this I can't use the Panel at all I will need to look into a workaround.

JamesSnaps commented 7 months ago

I've been seeing this on a bunch of components too. Seems to be some chatter about it on the forums related to the latest publishing versions. https://powerusers.microsoft.com/t5/Power-Apps-Experimental-Features/BUG-component-Event-not-being-triggered-since-update/m-p/2450417#M841

For the Panel and Dialog components here, I just edited them muself in the Creator Kit component library, changing the types from Boolean / Record to text. Updated in my apps and all seems to be working properly.

Lunet95 commented 7 months ago

I've been seeing this on a bunch of components too. Seems to be some chatter about it on the forums related to the latest publishing versions. https://powerusers.microsoft.com/t5/Power-Apps-Experimental-Features/BUG-component-Event-not-being-triggered-since-update/m-p/2450417#M841

For the Panel and Dialog components here, I just edited them muself in the Creator Kit component library, changing the types from Boolean / Record to text. Updated in my apps and all seems to be working properly.

I have the exact same issue, which I have addressed to the Microsoft support.

Could you inform me how to edit the library if this solves the issue until it will be fixed in a update release?

Lunet95 commented 7 months ago

I don't really understand why it needs a return type, but when adding this record at the end of my code, I got rid of the error: { Color: ""};

phadjipetrou commented 7 months ago

Thanks for that it works fine for now, if this new change is related to "Enhanced Component properties" it shouldn't be applied as its Experimental. Thank you Lunet95 your workaround has fixed the panel issues.

Before: Switch( Self.SelectedButton.Label, "Cancel", UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4), "Ok", Notify("Notification Settings set",NotificationType.Success);UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4) )

After: Switch( Self.SelectedButton.Label, "Cancel", UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4), "Ok", Notify("Notification Settings set",NotificationType.Success);UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4) );{ Color: ""};

From: Lunet95 @.> Sent: Tuesday, November 14, 2023 11:11 AM To: microsoft/powercat-creator-kit @.> Cc: HADJIPETROU Peter @.>; Comment @.> Subject: Re: [microsoft/powercat-creator-kit] [Creator Starter Kit] BUG: Getting an error on the OnButtonSelect property of the Dialog control from the Creator Kit by Power CAT Team. Error: Expected Record Value (Issue #424)

I don't really understand why it needs a return type, but when adding this record at the end of my code, I got rid of the error: { Color: ""};

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/powercat-creator-kit/issues/424#issuecomment-1809909983, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BD6KZUP5KUQIWGRGXZHKHLDYEM7S7AVCNFSM6AAAAAA7GUEQ6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBZHEYDSOJYGM. You are receiving this because you commented.Message ID: @.**@.>>

Classification: WIPO FOR OFFICIAL USE ONLY

World Intellectual Property Organization Disclaimer: This electronic message may contain privileged, confidential and copyright protected information. If you have received this e-mail by mistake, please immediately notify the sender and delete this e-mail and all its attachments. Please ensure all e-mail attachments are scanned for viruses prior to opening or using.

JamesSnaps commented 7 months ago

Actually editing the buttons type only fixed the errors for me. But my code still wouldn't run properly. Some bits would if I deleted the functions after it but it didn't like multiple commands. I rolled back to publishing version 3.23104.18 and it all started working again without any component changes at all. 3.23105.17 seems to be the cursed one.

Dohsan commented 7 months ago

We have also noticed this issue:

In the interim we've remained on the same authoring version and have gone with adding additional code/record value to fix

Edit: The code work around only worked for us in simple cases, anything involving patch / remove etc. would compile, but no code was run on the button press. The work around was to put the code in a button and do a SELECT() from within the button code block. Certainly a code smell

Reverting the authoring version did correct it though without said workarounds

grahamdr commented 7 months ago

Experiencing same issue with panel OnButtonSelect on Version 3.23105.18.
Reviewing suggested options to resolve, I've reverted to version 3.23104.18 which seems to have resolved the issue.

endub-22 commented 7 months ago

This post seems to describe the cause of the issue. according to one of the later posts, the change was rolled back. Can confirm my apps are working as expected again.

ericregnier commented 1 month ago

Thanks for that it works fine for now, if this new change is related to "Enhanced Component properties" it shouldn't be applied as its Experimental. Thank you Lunet95 your workaround has fixed the panel issues. Before: Switch( Self.SelectedButton.Label, "Cancel", UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4), "Ok", Notify("Notification Settings set",NotificationType.Success);UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4) ) After: Switch( Self.SelectedButton.Label, "Cancel", UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4), "Ok", Notify("Notification Settings set",NotificationType.Success);UpdateContext({ showHideDialogGrid: false });Set(varToggleAll,false);Reset(Toggle4_2);Reset(Toggle4_3);Reset(Toggle4);Reset(Toggle4_4) );{ Color: ""}; From: Lunet95 @.> Sent: Tuesday, November 14, 2023 11:11 AM To: microsoft/powercat-creator-kit @.> Cc: HADJIPETROU Peter @.>; Comment @.> Subject: Re: [microsoft/powercat-creator-kit] [Creator Starter Kit] BUG: Getting an error on the OnButtonSelect property of the Dialog control from the Creator Kit by Power CAT Team. Error: Expected Record Value (Issue #424) I don't really understand why it needs a return type, but when adding this record at the end of my code, I got rid of the error: { Color: ""}; - Reply to this email directly, view it on GitHub<#424 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BD6KZUP5KUQIWGRGXZHKHLDYEM7S7AVCNFSM6AAAAAA7GUEQ6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBZHEYDSOJYGM. You are receiving this because you commented.Message ID: @.**@.>> Classification: WIPO FOR OFFICIAL USE ONLY World Intellectual Property Organization Disclaimer: This electronic message may contain privileged, confidential and copyright protected information. If you have received this e-mail by mistake, please immediately notify the sender and delete this e-mail and all its attachments. Please ensure all e-mail attachments are scanned for viruses prior to opening or using.

Used this workaround as a quick fix.