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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / OnSelect not working
Power Apps
Answered

OnSelect not working

(0) ShareShare
ReportReport
Posted on by 14

Hi,
I have defined the OnSelect property for a button with the following code:

 

ForAll(colTypes;Patch('2023';LookUp('2023';January2023Date=SeqDate);{AT:VacID}))

 

There are no red lines or error messages; all the sources are properly linked etc. No delegation warnings or error warnings either. But when I try to execute the command the mouse icon remains an arrow (doesn't turn into a hand) and it isn't "clickable"). I don't know what else to try; any pointers would be greatly appreciated!!!

Thanks

Categories:
  • Lorde022 Profile Picture
    14 on at

    One additional piece of information: "January2023Date" is from the "2023" Sharepoint list, "SeqDate" is from the collection "colTypes" in "ForAll".

  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Lorde022 ,

     

    If I understand your issue, you can "execute" your command, but can't see any "result". Is that right?

     

    Is "January2023Date" and "SeqDate" both Date-type? If so, my first pointer would be to check if either of those contains a date AND a time. For example, if "January2023Date" is equal to "06/10/2022 17:35:00" and "SeqDate" is equal to "06/10/2022 00:00:00", then your "LookUp()" will not return any data.

     

    Also, what do you mean by "not clickable"? Is the button disabled after you select it? That means the app is doing some back-end work with your "ForAll()" which could take some time to finish.

     

    Your formulae seems correct, the only issue I could see is how many items you have in your collection. The way you wrote it, you're going to send two calls to SharePoint for "LookUp()" and "Patch()" for each item, and that is time-consuming if you have lots of items.

  • Lorde022 Profile Picture
    14 on at

    @WiZey 

    Sorry for not being precise enough. 

    I cannot execute the command. While previewing the app (or clicking while pressing Alt) the cursor turns into a hand on executable buttons. It doesn't for the one in question - I am not able to select it in the first place.

     

    Both fields are date type without a time. I even tried adding DateValue in front of both just in case that was the problem, but it isnt (I've double checked in sharepoint just to be safe). 

     

  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    So you can't click on the button?

     

    Is it perhaps "hidden" behind a transparent control which masks the button?

     

    Is your button's "DisplayMode" property correctly set to "Edit"?

     

    Can you move it elsewhere and see if it becomes clickable?

     

    If worse goes to worst, can you try deleting the button and recreating from scratch?

  • Lorde022 Profile Picture
    14 on at

    Ahhhh, I fixed it! I had tried saving and reopening the app - no success. I tried copying the button - no success! 

     

    So this time I copied the code, deleted the button and created the new button with the copied code - and now it works for some reason!

     

    I have no idea what happened; thanks anyways for your willingness to support! 🤗

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard