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 / OnSelect button not wo...
Power Apps
Answered

OnSelect button not working on existing items

(0) ShareShare
ReportReport
Posted on by 12

Hello. I want to customize a form in SP by dividing my fields in two dropdown Lists, thus I added a button for each section and set the OnSelect property to:

  • Set(varshowfields, If(varshowfields=1, 0, 1) )

The button works perfect when adding a new item, but with existing items, it doesn't work. Any idea of how to implement it to work both in existing and new items?

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @casr133 ,

     

    Could you please share more details about your scenario? What do you mean by dividing fields in two dropdown lists?

     

    Maybe you can try UpdateContext({varshowfields : !varshowfields}) instead. And OnStart needs UpdateContext({varshowfields : true) to initialize this variable as true/false.

     

    Best regards

  • casr133 Profile Picture
    12 on at

    I have a List with over 200 fields, thus, I want to minimize the length of the form by adding headers/sections, which, when clickable, will display the fields  aggregated to that header/section. Just like an accordion. I created the buttons and it works perfect on new items (edit mode). However, once I have created a new entry, if I try to open it, I cannot click on the headers to display the corresponding fields (view mode). A solution I found was to add the buttons outside the form, that way, they are clickable even in view form, but the problem is that the position of each button is fixed and consequently every time I open a specific header, the button doesn't move accordingly.

     Thanks in advance.

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @casr133 ,

     

    This scenario called tabbed form, please refer to below blog or you can search for it on the web.

    Best Way To Create Power Apps Tabs Control - Tabbed Form In PowerApps | Power Apps (devoworx.net)

     

    So, generally speaking, we will use a Gallery to include the tabs, which will make those buttons independent to display mode of forms, and also easier to adjust their appearance.

     

    Best regards,

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard