cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lorde022
New Member

OnSelect not working

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

1 ACCEPTED SOLUTION

Accepted Solutions
WiZey
Super User
Super User

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?

View solution in original post

5 REPLIES 5
Lorde022
New Member

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

WiZey
Super User
Super User

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.

@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). 

 

WiZey
Super User
Super User

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?

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! 🤗

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,520)