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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,202)