How to disable check box (row selector) in a tabular APEX report
I have a tabular report with check boxes that gets populated by a SQL query. For certain rows, I want to disable (or not render) the check box, depending on the value of one of the columns for that particular row (if the value of a column defined as Date is less than sysdate, I don't want to display the check box for that row). I tried using the Conditional Display in the Column Attribute section of the check box, but I am unable to access this Date column which is being selected from a view in the source SQL. I used variable such as :name-of_column, V(':name-of_column'), but always get a NULL value for this Date column in the SQL that I am trying to code in the Conditional Display section. For this reason, my condition does not work correctly.
What am I doing wrong? Is my approach above correct?
Hi Ajay,
I don't think you can handle this with a conditional display, as that works on column level rather than row level.
The way I see it, there are two things you can do:
1) an sql approach, where youo render the checkbox as part of your query using apex_item.checkbox, check the oracle docs for detailed info on the usage APEX_ITEM
You'll end up with a query like
select case when YOUR_DATE_COLUMN < sysdate
then null
else apex_item.checkbox2( p_idx => 1
, p_value => YOUR_DATE_COLUMN
, <rest of your query here>
from YOUR_TABLE
2) an JavaScript approach in which you create a dynamic action that check your tabular form date column and, when necessary hides and disables the checkbox for that row.
First option is more robust, but will require a bit more work. Second option is faster to develop, but might have different effect across various browsers and browser versions.
Regads,
Vincent
http://vincentdeelen.blogspot.com
Similar Messages
-
How do I add a row selector?
Hi,
I have a report. Region is of type 'SQL query'.
How do I add a row selector to this type of report?
ToonHi,
on the "Report Attributes" tab of your report region. It's on the right side in the "Task" frame.
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com
Check out the ApexLib Framework: http://apexlib.sourceforge.net -
. How to put Check box in every row in Table
Hi Friends,
I have one doubt in Webdynpro with java. How to put Check box in every row in Table?
For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in SecondView. So in Second View I will taken Table that data will displayed in rows. I need each and every row first I need check box.
Here Select Check Box of particular row then click GetData button. That row data will be displayed in one popup window.
In table suppose 6 rows available in table. Every Row first Check box available.
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
empid, name, sal ,firstname, last Name
How to put Check box in every row in Table? can you send any examples applications
Regards
VijayHi Friend,
When we are getting BAPI From ECC System. that BAPI Have nodes and Attribues...in under node we can't create "CheckBox"
attribute.
So i am doing like this.I am create on Checbox attribue out side of Node. Check Box data type is boolean.
next i am creating table ( that table having rows and columns) Right click on table-->Click on Insert GroupedColumn->again right click on nsert GroupedColumn---> Here Select Check Box.
Okay...here i am getting one problem. i have got Check boxes .But i am select check box in first row. that time all check boxes will be selected.
i need select first row check box that only first row will be selected suppose i selected second row check box that only second will be selected.
i need this can u help me....
Regards
Vijay -
How to enable/disable check boxes in a table.
hi Gurus,
i am new to webdynpro for abap.
the problem i have is.
i have a table with two columns. first one is a check box column and the second one is a value field. the table is populated with data(second field only) upon pressing some button.
while populating data i want to make check box field/row ticked and disabled when second field row value is 'X' . if not leave the check box row/field enabled and unticked ( if i want i can tick the check box later). hope you guys me. this is sort of urgent. please reply with some code.
thanks in advance.
SreeHi
Issue what i am facing is,i want to display column of CHECKBOXes in my ALV.
for that i declare atrribute of type CHECKBOX.
And i write the following code.
lr_column_settings ?= l_value.
lt_columns = lr_column_settings->get_columns( ).
loop over table - in each loop another column can be modified
LOOP AT lt_columns INTO ls_column.
IF ls_column-id = 'CHK_BOX'.
CREATE OBJECT lr_chk_box
EXPORTING
checked_fieldname = ls_column-id.
lr_chk_box->set_read_only( ABAP_FALSE ).
lr_chk_box->set_read_only_fieldname( 'ALV_FINAL_STATUS' ).
ls_column-r_column->set_cell_editor( lr_chk_box ).
even i cant able to get checkbox in my ALV.
IT is displaying as general field.
Regards,
Ravi -
How to create a custom row selector
I am using APEX_ITEM.CHECKBOX in a form. How can I add a row selector checkbox to the heading of the table to select/deselect all of my custom checkboxes? I tried to simply add the build-in row selector function to the report but that just added an additional column of checkboxes. I just need the header row checkbox added.
This is Apex 3.2.x
Edited by: user9108091 on Oct 14, 2010 1:32 PMHello,
>> How can I add a row selector checkbox to the heading of the table to select/deselect all of my custom checkboxes?
Please check the following. I believe it’s simpler than the hijacking business.
Re: How to add row selector column attribute to report region?
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More -
How to insert check box fields in a htmlb: tableview
Hi,
Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
Thanks in advance,
Aruna.Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
<b>Layout:</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content id = "content"
design = "design2002+design2003"
controlRendering = "SAP"
rtlAutoSwitch = "true"
forceEncode = "ENABLED" >
<htmlb:page title="Test " >
<htmlb:form>
<%
data TV_ITERATOR Type Ref To zcl_itr.
data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
create object tv_iterator exporting appl_cons = application.
iterator = tv_iterator.
%>
<htmlb:tableView id = "fligts"
headerText = "Flight"
width = "100"
headerVisible = "true"
design = "alternating"
visibleRowCount = "10"
fillUpEmptyRows = "true"
showNoMatchText = "true"
filter = "server"
sort = "server"
onHeaderClick = "MyEventHeaderClick"
table = "<%= APPLICATION->itab %>"
iterator = "<%= ITERATOR %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>Event Handling:</b>
DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
CASE EVENT_ID1->EVENT_SERVER_NAME.
IF NOT event_id1 IS INITIAL.
if event_id1->server_event+0(9) = 'chkevent'.
SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
endif.
endif.
method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
CLEAR p_column_definitions.
CLEAR p_overwrites.
DATA: tv_column TYPE TABLEVIEWCONTROL.
tv_column-COLUMNNAME = 'FLDATE'.
tv_column-edit = 'X'.
tv_column-sort = 'X'.
tv_column-TITLE = 'Flight Date'.
tv_column-WIDTH = '100'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CONNID'.
tv_column-TITLE = 'Conn.ID'.
tv_column-WIDTH = '70'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CHECKBOX1'.
tv_column-TITLE = 'Check Box'.
tv_column-WIDTH = '30'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
endmethod.
METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
DATA: L_EVENT TYPE STRING.
CASE P_TABLEVIEW_ID.
WHEN 'fligts'.
CASE P_COLUMN_KEY.
WHEN 'CHECKBOX1'.
* CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
ONCLICK = L_EVENT CHECKED = 'false' ).
ENDCASE.
ENDCASE.
ENDMETHOD.
Hope this will solve your problem.
<b><i>* Reward each helpful answer.</i></b>
Raja T
Message was edited by:
Raja T -
How to display check box in atable control
hi
here is my requirement
how can i display check box in table control and also when i check that check box it has to dispaly one pop up screen with the records of table control row
points will be rewarded
Thanks&Regards
Nagesh.ParuchuriHi,
See this code for how to display check box in atable control
*---- Table declaration.
TABLES: KNA1.
CONTROLS TC1 TYPE TABLEVIEW USING SCREEN 200.
CONTROLS TC2 TYPE TABLEVIEW USING SCREEN 300.
*---- Data declaration.
DATA:OKCODE LIKE SY-UCOMM.
DATA:V_KNA1 LIKE KNA1.
*DATA:ERROR TYPE C.
*---- Internal Table declaration.
DATA:BEGIN OF IT_TAB OCCURS 0,
CHK,
VBELN TYPE VBELN_VA,
KUNNR TYPE KUNAG,
ERDAT TYPE ERDAT,
AUDAT TYPE AUDAT,
VBTYP TYPE VBTYP,
END OF IT_TAB.
DATA:BEGIN OF IT_TAB1 OCCURS 0,
VBELN TYPE VBELN_VA,
POSNR TYPE POSNR_VA,
MATNR TYPE MATNR,
MATWA TYPE MATWA,
PMATN TYPE PMATN,
END OF IT_TAB1.
*& Module USER_COMMAND_0100 INPUT
MODULE USER_COMMAND_0100 INPUT.
OKCODE = SY-UCOMM.
CASE OKCODE.
WHEN 'DISP' OR SPACE.
SELECT *
FROM VBAK
INTO CORRESPONDING FIELDS OF TABLE IT_TAB
WHERE KUNNR = KNA1-KUNNR.
IF SY-SUBRC <> 0.
MESSAGE 'No sales document exists'(001) TYPE 'I'.
ENDIF.
LEAVE TO SCREEN 200.
CLEAR OKCODE.
*--- To leave Transaction
WHEN 'BACK' .
LEAVE PROGRAM.
CLEAR OKCODE.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module validate_kunnr INPUT
MODULE VALIDATE_KUNNR INPUT.
V_KNA1 = KNA1.
SELECT SINGLE *
FROM KNA1
WHERE KUNNR = KNA1-KUNNR.
*-----Process error condition
IF SY-SUBRC <> 0.
CLEAR KNA1.
KNA1-KUNNR = V_KNA1-KUNNR.
CASE OKCODE..
WHEN 'BACK' OR 'EXIT' .
LEAVE PROGRAM.
ENDCASE.
MESSAGE 'Customer Does Not Exist'(002) TYPE 'I'.
LEAVE TO SCREEN 100.
ENDIF.
ENDMODULE. " validate_kunnr INPUT
*& Module STATUS_0100 OUTPUT
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'PF'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0200 INPUT
MODULE USER_COMMAND_0200 INPUT.
CASE OKCODE.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 100.
CLEAR OKCODE.
CLEAR IT_TAB1.
WHEN 'DISP' .
CLEAR OKCODE.
READ TABLE IT_TAB WITH KEY CHK = 'X'.
IF SY-SUBRC = 0.
SELECT VBELN POSNR MATNR MATWA PMATN
FROM VBAP
INTO TABLE IT_TAB1
WHERE VBELN = IT_TAB-VBELN.
IF SY-SUBRC = 0.
SORT IT_TAB.
DESCRIBE TABLE IT_TAB LINES TC1-LINES.
LEAVE TO SCREEN 300.
ELSE.
MESSAGE E016(YBHV).
ENDIF.
ELSE.
MESSAGE 'Please select one record' TYPE 'I'.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Module STATUS_0200 OUTPUT
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'PF3'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_C.OMMAND_0300 INPUT
text
MODULE USER_COMMAND_0300 INPUT.
SET PF-STATUS 'PF3'.
CASE OKCODE.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
CLEAR OKCODE.
LEAVE TO SCREEN 200.
ENDCASE.
ENDMODULE. " USER_COMMAND_0300 INPUT
*& Module modify INPUT
MODULE MODIFY INPUT.
MODIFY IT_TAB INDEX TC1-CURRENT_LINE.
ENDMODULE. " modify INPUT
*& Module okcode OUTPUT
text
MODULE OKCODE OUTPUT.
CLEAR OKCODE.
ENDMODULE. " okcode OUTPUT
Reward Pointsa If usefull
Regards
Fareedas -
how to display input disabled check box in selection screen.
plz give me sample code.i think we have to use at selection-screen output. so using it how we have to build codeBelow is the code we can use:
REPORT zrjntrial_tree LINE-COUNT 65
LINE-SIZE 80
NO STANDARD PAGE
HEADING.
TABLES : vbrk.
PARAMETERS : p_radio AS CHECKBOX USER-COMMAND opt1.
SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln,
s_fkdat FOR vbrk-fkdat.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_RADIO'.
screen-input = 0.
screen-output = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards,
Himanshu -
Set check in row selector checkbox of report via javascript
This may be a stupid question. I thought I saw the answer here before. I just can't seem to find it.
I have an updateable report that allows users to enter data. The issue is unless they check the row selector checkbox, when they submit, the row is not processed. I want to put an onchange event on the columns to automatically check the rowselector box when something is changed on the row. Any ideas? Possibly a link to a previous post.
Thanks
Kevin
Message was edited by:
kdparOn the field that you update set the onchange event to call a function similar to the following: onchange=setRowSelectorState(this);
In the HTML Header section put a function definition similar to the following:
<script type="text/javascript">
function setRowSelectorState(pThis){
-- get current row number
-- thanks Patrick Wolf (http://www.inside-oracle-apex.com/2007/01/accessing-tabular-form-cell-with.html)
var vRow = pThis.id.substr(pThis.id.indexOf('_')+1); -- gets current row number
-- get row selector for current row assuming its field 'f01_'
var cbxField = html_GetElement('f01_' + vRow);
-- add some logic if need be
var mytest = 0;
if (mytest == 0) {
cbxField.checked = true;
} else {
cbxField.checked = false;
</script>
Simple example but it works. See Patrick's link above to a more detailed example.
Brent -
How to print Check Box in smartform
HI,
How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
Thanks
Raghavendrahi,
u can print a check box in different ways.. by inserting symbols and making window as check box..
once go through the thread u will get to k now differnt ways
putting checkboxes in smartform?
Please Close this thread.. when u r problem is solved. Reward all Helpful answers
Regards
Naresh Reddy K -
How can multiple check boxes be added at one time to a form?
How can multiple check boxes be added at one time to a form?
Thanks for your response, but copying and pasting creates a link. If the user places a check mark in one of the boxes, all the rest of the boxes will have a check mark also. I will research this some more.
Carol Deatherage
Receptionist
Novar/Honeywell
1000 SE 14th Street
Bentonville, AR 72712
Office: (800) 341-7795
Fax: (479) 271-0657
[email protected]<mailto:[email protected]>
Your feedback is important to us! Please take a moment to rate this response.
Click Here to Access the Survey<https://www.surveymonkey.com/s/NovarSurvey>!
This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately.
Novar Confidential *** -
How to disable a Entire row in a Matrix in Find Mode (User Form)
Hi,
How to disable a Entire row in a Matrix in Find Mode (User Form)
Regards
JambuHi,
Iam using Bubble event = false in click event but the matrix row
is allow to edit but we cant save the document in Find Mode That is fine.
What is my actual requirement is In find mode matrix Row not allow to enter the data .
For examble In ADD mode i enter the data in Three rows (Item Section - Matrix) and
save the document. Whwn i open the document in find mode the three row is not allow
to editable like the same functionality of PO, sales Order, etc ..
Regards
Jambu -
How to insert check box value in table?
Hi all
kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
thanx in advanceHi,
There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
(you cannot define boolean as a datatype for a column).
If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
(for the rest if it's Oracle Forms then everything is already said).
Edited by: user11268895 on Aug 17, 2010 10:44 AM -
How to create check box in tabular form
Dear Friends
i have craeaed tabular form .Recently all column are default text field but i want to change some column from text field to check box .
i have try it with simple check box but there is no option to pass return value in to table.
How to create check box in tabular from.
select
"CLAIM_ID",
"CLAIM_ID" CLAIM_ID_DISPLAY,
"EMPLOYEE_ID",
"CLAIM_DATE",
"START_FROM",
"END_TO",
"REIMB_NAME",
"REIMB_AMOUNT",
"REMARK",
"ACTIVE_FLAG",
"STATUS",
"APPROVE_NO",
"APPROVE_FLAG"
from "EMP_REIMBURSEMENT_DTL
{code}
i want to change column from text field to Check box
Cplumn Name :
1.ACTIVE_FLAG Return value 'Y'
2.STATUS Return Value "APPROVE"
How to pass it with check box in tabular form.
ThanksVisit this demo app:
http://apex.oracle.com/pls/otn/f?p=31517:1
Section VI has a lot of tabular form stuff with checkbox handling.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
How to insert check box in pages?
This may be a dumb question, but how to insert check box in Pages? Thanks
Hi ...
Try this thread > Checkboxes in Pages?: Apple Support Communities
Maybe you are looking for
-
I am embarrassingly ignorant of the wonders of my MacAir.
Want to type list of names only of my Christmas card recipients which can be alphabetized, added to or subtracted from. Labels will not be needed. MacAir or IpadAir available. I looked at templates in Pages and Numbers but none SEEMED to be the an
-
Purchase and Configuration Advice
Good morning, I've read a number of posts like this in the past, but would still like to solicit a bit of advice, as I find the advice of Camelot and some others to be invaluable. Currently, I am a Novell house for my file sharing and I have an exist
-
Iphoto cannot see my old library or photo files
in fact even finder can't see the jpegs but the old library icon shows 90GBs of content. If I look inside this using "show package content" i can see all the various iphoto folders and all the jpegs thumbnails etc. Really wierd. I've done a disk util
-
Statistics - To get how many time a report has been run
Hi Gurus, I would like to know how many times each of the reports on the portal has been run. If I could get this by user id, that would be great. Do you know where I can get such information? Regards Mathew
-
Unknown error occurred (0xE800002E).
After downloading updates to applications and syncing to iphone I got error message: Some of the applications in your iTunes library were not installed on the iPhone "(my name) iPhone because one or more errors occurred. Example of error: "The applic