Hide command button on rule in Power Apps using PowerFX
To set visibility of command button using Power FX follow below steps:
Add Command button using Edit in Preview method of Power Apps. Open any model driven app, click 3 dots to choose Edit in Preview and choose entity for which you want to add button.
Choose where you want to add button. You can use Main grid, Main form, Sub-grid and Associated view to add buttons.
Let’s choose main grid. The command editor will open. Click on + New command button, rename the button and in Action choose Formula. In formula window type. Notify power FX of your choice. In the Visible property you can add below formula. The below formula will only let the button visible if at least one row is selected from the view.
If(CountRows(Self.Selected.AllItems) > 0,true,false)
Hope this helps.
Check the video practical here.
To learn more check YouTube channel here: https://www.youtube.com/channel/UCx28J1vtdIZId2ztVgFiJPQ
Follow my blog for more trending topics on Dynamics 365, Azure, C#, Power Portals and Power Platform. For training, Courses and consulting, call to us at +91 832 886 5778 I am working more for community to share skills in Dynamics 365 and Power Platform. Please support me by subscribing my YouTube Channel. My YouTube Channel link is this : https://www.youtube.com/user/sppmaestro