'Hide when...' calculation prevents button function

Discussion created by justinc on Sep 15, 2015
Latest reply on Sep 17, 2015 by justinc

I have run into a problem where the 'Hide object when...' calculation appears to prevent a button action from firing.


I have made up a demo file that demonstrates this problem.  The layout is a list view of records; there are two types of records: Odd and Even.  The 'Description' field is hidden for odd-rows and shown for even-rows.  There is a button on each row called 'Test' that is set to display a custom dialog.
It is when the focus is in an even-row 'Description' field, and you try to click the 'Test' button on an odd-row the button doesn't fire.


What is happening is that the field-in-focus tries to jump to the same field in that newly-clicked-into record, i.e. 'description'.  But since 'description' is hidden in the odd-rows the focus can't shift to that field and it interrupts the clicking of the button.  If you click the button a 2nd time it will fire normally.  If I remove the Hide condition, the focus will jump from the even-row 'description' field to the odd-row 'description' field, and the button will fire.


Which seems a bit strange because if I click into empty space on the odd-row record (i.e. not a field or a button), the record pointer still shifts to the odd-row record, but it doesn't try to make the source field active.  So why if I am clicking on a button in that row does it need to make that field active?


This is just a normal button, not a button bar or an object with a button setup.  Wonder if either of those would work better.  Any suggestions on work-arounds that still allow me use the Hide feature?