Hello everybody,
I am working on a time clock using a grid and a custom UX component. Each record has an in and out value. I have clock out buttons on each row, and I also have an action button (ClockIn) that I want disabled if any records for that employee have not been clocked out on. Accordingly, the row buttons should be disabled if there is no clock ins.
I figured the easiest way to do this would be to enable/disable the buttons based off of whether or not the other button is enabled or disabled. For example, if ClockIn button is disabled, then all ClockOut buttons will be enabled (and there would be a show/hide expression on the out buttons to limit them to just the row that has an in and not out value).
My issue comes when I am trying to setup the javascript on the onGridRenderComplete event, specifically when trying to set the pointer to the clock out button which is _UNBOUND_BUTTON_1.
var ClockInBtn = {grid.componentName}_BUTTONS_CLOCKIN; <--- works just fine
var ClockOutBtn = {grid.componentName}_UNBOUND_BUTTON_1; <--- throws up script error
var ClockOutBtn = {Grid.ComponentName}.V.R{Grid.RowNumber}._UNBOUND_BUTTON_1; <--- also throws up script error
Once I learn what the proper syntax is I can then continue to build the code that will determine which button should be enabled/disabled.
Thank you in advance.
I am working on a time clock using a grid and a custom UX component. Each record has an in and out value. I have clock out buttons on each row, and I also have an action button (ClockIn) that I want disabled if any records for that employee have not been clocked out on. Accordingly, the row buttons should be disabled if there is no clock ins.
I figured the easiest way to do this would be to enable/disable the buttons based off of whether or not the other button is enabled or disabled. For example, if ClockIn button is disabled, then all ClockOut buttons will be enabled (and there would be a show/hide expression on the out buttons to limit them to just the row that has an in and not out value).
My issue comes when I am trying to setup the javascript on the onGridRenderComplete event, specifically when trying to set the pointer to the clock out button which is _UNBOUND_BUTTON_1.
var ClockInBtn = {grid.componentName}_BUTTONS_CLOCKIN; <--- works just fine
var ClockOutBtn = {grid.componentName}_UNBOUND_BUTTON_1; <--- throws up script error
var ClockOutBtn = {Grid.ComponentName}.V.R{Grid.RowNumber}._UNBOUND_BUTTON_1; <--- also throws up script error
Once I learn what the proper syntax is I can then continue to build the code that will determine which button should be enabled/disabled.
Thank you in advance.
Comment