I have a collection called Records and I want to see if I can return true if the collection contains a specific string.
The idea I had was to hide a button if the title of that selected item is in the collection. The selected item is pulled off from my SharePoint list.
I was hoping I could use something like this:
if (Count(LookUp(Registered, BrowseGallery1.Selected.Title = Title)) > 0, true, false)
This doesn't work because Count expects to have a table passed to it and my lookup returns records.
Any ideas how I can get this working or pointers?
Thank you.
Found the solution - hopefully this helps others.
We need to set a condition on the "Visible" property of a button. So, first step is to make sure you are adding the following formula to the visible property.
IsBlank(LookUp('Registered', Course_x0020_Registered_x0020_To = ThisItem.Title).Course_x0020_Registered_x0020_To)
In the above code:
IsBlank returns no values (blank) from the Lookup - and so the returned values will be true or false. If the Lookup is blank, it means no matches were found.