cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DamoB
Frequent Visitor

Make button visible/not based on gallery selection

I am working with the Room Booking template power app which links to Exchange to find the org's rooms. 
Some of the org's locations have a floor plan available, some do not. 

I have stored available floor plan pdfs in a SP site 'Floor Plans'

I cannot figure out the logic for 'Does the name of the selected Room List contain the same string as the ShortName column in Floor Plans SP site?''  

I think the value that the template app creates is 'RoomsListsGallery.Selected.Address'; do I need to compare this to the text in my ShortName column? 

If the selected Room List does have a floor plan I want a button to be visible; OnSelect that button to launch the corresponding floor plan pdf. I should be Ok on that part if I can just get the button to show correctly!

My googling and seaches with the forums lead me towards 'If' in conjunction with 'Lookup' but I just can't work out how to code this properly. 
Any advice please Community? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @DamoB ,

 

If the value is 'RoomsListsGallery.Selected.Address', then you should check whether it is blank comparing to SharePoint Library the specific column value using formula in Visible as below:

!IsBlank(LookUp(SharePointLibrary, ShortName = RoomsListsGallery.Selected.Address))

 or in DisplayMode property:

If(
    IsBlank(LookUp(SharePointLibrary, ShortName = RoomsListsGallery.Selected.Address)), 
    DisplayMode.Disabled, 
    DisplayMode.Edit
) 

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @DamoB ,

 

If the value is 'RoomsListsGallery.Selected.Address', then you should check whether it is blank comparing to SharePoint Library the specific column value using formula in Visible as below:

!IsBlank(LookUp(SharePointLibrary, ShortName = RoomsListsGallery.Selected.Address))

 or in DisplayMode property:

If(
    IsBlank(LookUp(SharePointLibrary, ShortName = RoomsListsGallery.Selected.Address)), 
    DisplayMode.Disabled, 
    DisplayMode.Edit
) 

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,890)