Forum Discussion
Anthony-123
Apr 06, 2023Iron Contributor
Make a value clickable in an SPO List Gallery View
When in List view, I have values that can be clicked to enact a desired action. When I display the list as a gallery, clicking on a value opens the item on the right side of the browser window. ...
muhammad_kekereekun
Iron Contributor
In order to make the values clickable in Gallery view, you will need to add an OnSelect action to the gallery item. Here are the steps:
1. Select the gallery control and click on the Edit button to open the Gallery control in Edit mode.
2. Click on any gallery item to select it.
3. In the right-hand pane, scroll down to the OnSelect property and click on the Edit button (pencil icon).
4. In the formula bar, enter the action that you want to perform when the gallery item is clicked. For example, if you want to start a chat in Teams, you could use the formula: TeamsChat.StartNewChat('email address removed for privacy reasons')
5. Click outside of the formula bar to save the formula.
6. Repeat steps 2-5 for each gallery item that you want to make clickable.
Once you have added the OnSelect action to each gallery item, clicking on the item will trigger the action that you specified.
1. Select the gallery control and click on the Edit button to open the Gallery control in Edit mode.
2. Click on any gallery item to select it.
3. In the right-hand pane, scroll down to the OnSelect property and click on the Edit button (pencil icon).
4. In the formula bar, enter the action that you want to perform when the gallery item is clicked. For example, if you want to start a chat in Teams, you could use the formula: TeamsChat.StartNewChat('email address removed for privacy reasons')
5. Click outside of the formula bar to save the formula.
6. Repeat steps 2-5 for each gallery item that you want to make clickable.
Once you have added the OnSelect action to each gallery item, clicking on the item will trigger the action that you specified.
Anthony-123
Apr 07, 2023Iron Contributor
I've already customized the right hand pane in PowerApps so I don't think your instructions are applicable. I've been able to use OnSelect in PowerApps using the following formula
Launch(Concatenate("https://teams.microsoft.com/l/chat/0/0?users=",DataCardValue4))
Although, the pane needs to be in Edit more for the item to be clickable which is not ideal. Do you have a solution for this?
- muhammad_kekereekunApr 07, 2023Iron ContributorOne possible solution would be to add a custom card to the Gallery view that contains the clickable values. This can be done by adding a new card to the Gallery template and then adding controls to the card to display the desired values and actions.
For example, you could add a card to the Gallery template that includes a button control with a formula like the one you're using for OnSelect, along with any other information or controls that you want to display.
Then, when a user clicks on the card in the Gallery view, they would be able to click the button to initiate the desired action without having to enter Edit mode.
To add a custom card to the Gallery template, follow these steps:
1. Open the Gallery control in Edit mode.
2. Click on the "Edit template" button to open the Gallery template.
3. Add a new card to the template by clicking on the "Add card" button.
4. Customize the card by adding controls and setting their properties as desired.
5.Save and publish the changes to the app.
I hope this helps! Let me know if you have any further questions.- Anthony-123Apr 10, 2023Iron ContributorThe question I've posted in this SharePoint forum is "Make a value clickable in an SPO List Gallery View". Do you have something to offer that's not related to PowerApps?