This topic is locked

Using listpage rowid in click action without displaying rowid

10/3/2017 6:15:13 PM
PHPRunner General questions
H
headingwest author

Hi all,
I'm stuck trying to do a Click Action on a list page.
I want to take action based on a field value (rowid) without displaying the rowid field to the user.



//Client before

params["rowid"] = row.getFieldValue("rowid");
//Server

CustomQuery(" update keytable set reqvalue = 0 where rowid = ".$params['rowid']);
//Client after

location.reload();


If I don't select the "rowid" field in the fields page then rowid value isn't available to work with. If I use $pageObject->hideField("rowid") in Before Display then rowid value isn't available.
Javascript ctrl.hide() and pageObj.hideField('rowid') don't seem to work on list pages.
Any ideas?? Thanks.

jadachDevClub member 10/3/2017



Hi all,
I'm stuck trying to do a Click Action on a list page.
I want to take action based on a field value (rowid) without displaying the rowid field to the user.



//Client before

params["rowid"] = row.getFieldValue("rowid");
//Server

CustomQuery(" update keytable set reqvalue = 0 where rowid = ".$params['rowid']);
//Client after

location.reload();


If I don't select the "rowid" field in the fields page then rowid value isn't available to work with. If I use $pageObject->hideField("rowid") in Before Display then rowid value isn't available.
Javascript ctrl.hide() and pageObj.hideField('rowid') don't seem to work on list pages.
Any ideas?? Thanks.


Maybe use a custom button instead of click action.

H
headingwest author 10/3/2017



Maybe use a custom button instead of click action.


Hi Jerry, I simplified my example for clarity.
There's actually 2 checkboxes on the row and it saves instantly on checking/unchecking - the look and feel are fantastic. A button just looks clunky. Surely there's a way to hide the column - if I set it to "Custom" with $value="" it's almost there but I was hoping for an easier way. With the "click action" for fields we really need access to the row key id at all times, even when not visible.