Here is our deal:
We have a datagrid with the list of employees. We have a Datagrid instead of a table because of a many functionalities we have in it.
In the Datagrid with an action column. This action Colunm link to the employee details screen throw a client action:
Now, we need to add an icon/button (maybe a new actionColumn) that is going to be Visible according of some condition of the employee. If the user click this icon/button we have to execute a different action.
Any ideas on the best approach to achieve this?
Hello @Jesus Reategui
Might not be the best but I can suggest that if you are adding an Icon/Button, you can add an action to the On Event for Icon/Button and in that action you can further proceed on to check for the if conditions depending on your case. And for the different actions that will be executed, you can create the logic in a server action and you can set the public status to yes so that it can be used wherever you need. Let me know if it helps or if there are any better solutions to this.
Best Regards,
Jiing Heng
Hi @Jiing Heng Mong, thanks for your answer. But,how can i add an icon to a Action column in a datagrid. The only way that I found adding a Icon to an Datagrid Action column is adding the "html" directly to the TextFixed input parameter. and like this, i'm not able to handle any icon event.
Not familiar with this but from what I have researched and played with the oml, what I can think of that could be a workaround is that you can add another action column with the TextFixed of what you want and then add another action to add the specific actions that will be executed, since you can get the details of the items, you can check which action to be executed based on the employeeId (Refer to img1 and img2 for reference). Img 2 is what I am suggesting.
The original OML is in the forum from the original creator, DataGridSampleEdited.oml is edited by me regarding your case. Hope this helps.
References:
Original OML
https://www.outsystems.com/forums/discussion/78169/column-in-datagrid-to-be-made-linkable/