I have a column which returns a group_name (eg "5th Portsmouth", "33rd Portsmouth" etc). This is displayed in a UX table.
When displayed on a phone or tablet [CONTEXT("Host") = "Device] I want to display a short version of the name 5th, 33rd etc to maximise use of the screen 'real-estate'.
I have tried a number of solutions, without luck, including:
IF(
CONTEXT("Host") = "Device" ,
LEFT([v_1st_nearest].[L_group_name], (FIND(" ", [v_1st_nearest].[L_group_name]) - 1)),
[v_1st_nearest].[L_group_name]
)โ
This does not work, I assume because the virtual column is calculated without access to the CONTEXT, so always defaults to the IF THEN FALSE condition (the full length name).
How else can I approach this, or is it a case of living with the complexity of having two views to maintain in line with one another?
Thanks in advance.
Guy
Hi there, not sure about the virtual column, but I do tried before, a dynamic column display name which depending on CONTEXT, you may refer to the video below:
https://www.youtube.com/watch?v=sOqnwEj2VuI
You can have an action button, linked to a parameter in the user table, and let the user toggle between full and abbreviated values. A virtual column, this is the one to display in the table, would calculate the values based on the user's choice.
Note: Virtual columns do have access to the different CONTEXT() options, but the "Host" option will return "Server".
User | Count |
---|---|
43 | |
29 | |
29 | |
14 | |
14 |