Alright, this is unlikely to be an official long term method, but I found that you can use the #_ _#
tags to denote that the value field contains Javascript. This Javascript appears to be run with a scope that grants access to the trans
object. This object has many useful methods on it, such as dataView
.
For my use case, I was attempting to create “Prev Row” and “Next Row” buttons on a slide out panel. These buttons allow the user to cycle through their grid result details without needing to close the slide out and select the next row. For instance:
This is accomplished within the onClick event of the next and previous buttons and the row-current-set
action. In row-current-set’s parameters, specify the data view you’re cycling through and enter the following inn the Row
parameter:
#_(trans.dataView('SubAssemblyView').row < trans.dataView('SubAssemblyView').count - 1) ? trans.dataView('SubAssemblyView').row + 1 : trans.dataView('SubAssemblyView').row_#
This code will increase increase the row number in the specified dataview. If you are already on the last row, it will simply return the last row again, ensuring you don’t go out of bounds.
For the previous button, create another onClick event with the row-current-set
action and specify the opposite:
#_(trans.dataView('SubAssemblyView').row > 0) ? trans.dataView('SubAssemblyView').row - 1 : 0_#
This one is a bit simpler since you’re just checking to see if you’re already at index 0.
If anyone know if properties like row
and count
are available without resorting to Javascript, I’d love to hear.