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 / Command button for sel...
Power Apps
Unanswered

Command button for selected subgrid row

(0) ShareShare
ReportReport
Posted on by 122

I have a JavaScript function for a custom command button that attempts to assign the record to the logged in user for any selected row in the subgrid. The command is showing up when no rows are selected but then is gone when I select rows, so I can't actually debug anything lol.  Can anyone tell me what I'm doing wrong when setting up the command button?

 

No selection:
Screenshot 2023-12-03 at 3.20.17 PM.png

Selection:

Screenshot 2023-12-03 at 3.20.33 PM.png

I have the same question (0)
  • Verified answer
    ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @mhomol,

     

    Did you set this button up using the modern command bar, or the classic Ribbon button using the Ribbon Workbench?

     

    If using the classic Ribbon via Ribbon Workbench, you need to create an Enable rule with a SelectionCountRule and Minimum value set to 1. Similar steps are described in this post

     

    If using modern command bar, you'll want to set the Visible property to the following formula: 

    CountRows(Self.Selected.AllItems) > 0

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

     

  • mhomol Profile Picture
    122 on at

    I had it setup as modern and that was exactly the formula I was missing.  Thanks so much!

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