web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button/Label Functions...
Power Apps
Unanswered

Button/Label Functions Broken when Inside a Data Card

(1) ShareShare
ReportReport
Posted on by 15

I've got a button I'm trying to use to toggle a basic boolean variable, so I can make a prompt become visible--super basic. The button and other components I've used to replicate this button's OnSelect() behavior aren't actually committing the UpdateContext() function when it's inside the form's custom data card. If I cut and paste the button or similar components to be outside the data card, regardless of whether it's still inside the parent form or totally outside floating over everything, OnSelect() starts updating the variable correctly. I'm not changing any of the button's properties, literally just pasting a copy of it outside the data card.

 

Other properties of these components are also being screwy in a similar pattern. For example, I set up a label to display if the variable's current contents, so I could verify whether the UpdateContext() function is working. I set this label to have a hover fill, because I noticed the button's hover fill wasn't behaving right and wanted to see if it was a quirk of the button tool or if other components would behave the same. Both label and button won't actually change color in response to hovering, while inside the datacard. If I copy/paste the label or button outside the datacard, suddenly the hover fill works.

 

Weirdly, the hoverbordercolor property of the exact some components DO respond inside the data card, even though he hover fill does not.

 

I've tried to make sure there isn't another component higher up in the layering that could be blocking my mouse from interacting with these things correctly. I've verified that the display mode is simply set to edit and isn't referencing the parent's mode etc. that it's inheriting. And I've been able to use buttons inside data cards in other powerapps in the past without a problem

Did something change? Is there another property I'm not aware of that could be affecting these components?

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Did you do NewForm(formName) or EditForm(FormName) before you tried? Forms act weird before they are initialised (and if you click Play at that point they show blank)

  • Commend4623 Profile Picture
    15 on at

    I have a gallery screen that takes me to the form screen via a View(form) click-through and then I'm switching the form to Edit(form) with an edit button I've set up. So by the time I'm testing things out, I've taken that path to make sure that it's actually loading something from my gallery, and am not just hopping straight to the screen in the design tree.

    Thanks for the question!

    For the record, I'm creating a tool that will attach child tasks to a main ticket and associate the child tasks by assigning them the parent's ID in their database (Sharepoint list but whatever). If I can work around it to some extent by doing a New form and instead assigning the child IDs to the parent table, I guess I could do that, but that seems a bit messy to me. Database design isn't my forte though, and that wouldn't really help address potential problems related to adding/removing tasks LATER.

  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Ok cool, s the custom Datacard set to Edit?

    and if you create a new form and insert the controls does it work in existing datacards but then not when the custom datacard is used?

  • Verified answer
    Commend4623 Profile Picture
    15 on at

    My coworker gave me a handy idea that's worked out: I just added another data card and cut and paste all the controls into that new data card. Suddenly everything likes to work in its new "housing."

     

    Specifically, I chose the Attachments data card, just in case it's better at housing more complex controls. I BELIEVE I did that before as well, but maybe the problem is I chose one of the simpler columns for the basis of my data card before I customized it. When I have time I'll try experimenting with it to see if that makes a difference.

  • Commend4623 Profile Picture
    15 on at

    I think you were on a similar track to what we ended up doing, comparing the data cards.

    To answer your question though, just in case, yes the data card was set to edit mode as well. I could confirm which mode it was in because I set things to different colors for the different modes to be sure.

    I just created a fresh data card using the attachments data card for the basis and moved all the controls into that new data card. It worked for some reason--could be a setting I was overlooking or something else I'm not aware of.

    Thank you for responding!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard