For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
Hi, I have to display a checkbox as part of an Interactive Grid in APEX 19.2. If it contains J then display as checked else as unchecked. Can I change from checked to unchekced and vice versa? Please help me. Regards Siegwin
Not quite sure what you mean. But I assume you like reverse checkbox values. For that see column attributes "Settings" select list and change that to "Custom". Then define Checked and Unchecked values
I cannot change anything How can I change the lookout
I think IG should be in edit mode, before checkbox shows. Sorry, it might I don't quite understand what is issue. Please explain more or create example to apex.oracle.com.
Of course checkboxes may have changed since 19.2, but on apex.oracle.com (20.2) checkboxes work just fine:
The only problem you may have: If it contains J then display as checked else as unchecked. Do you mean "else" as in "for any other value", even null? Checkboxes are binary and work with two values, like 0/1 or N/J.
Of course checkboxes may have changed since 19.2, but on apex.oracle.com (20.2) checkboxes work just fine: Things have changed. Those are a new checkbox item type introduced in APEX 20.2: New Checkbox item type. This single checkbox offers an alternative to the Switch item type for Boolean columns. Also works in Interactive Grid, including outside of edit mode. The previous Checkbox type is renamed Checkbox Group.
Sorry but I have to use 19.2
Sorry but I have to use 19.2 Then as Jari said above: "IG should be in edit mode, before checkbox shows". Prior to the introduction of the new item type in 20.2, checkbox columns are only rendered as checkbox form controls when the grid is in edit mode. In navigation mode or a read-only grid the checked/unchecked labels are displayed:
If the checkbox field is a simple binary value, like Yes/No or True/False, you might consider making it a Switch instead of a checkbox. But a simple binary checkbox is possible as long as you are okay with a null as the unchecked value. Just configure the LOV with only one choice, the "J" in your case. But in an interactive grid, you only see the currently selected value, and don't see the checkbox until you are in Edit mode. Same for Switch.
Thank you, I changes it to a Switch Column. Is it possible to use a Javascript or so to see the checkbox in the IG lines?
You could check the cookbook (page 11) APEX IG Cookbook Update for 19.1 – HardLikeSoftware
You can use a checkbox plugin in Apex 19: https://github.com/rafael-trevisan/apex-plugin-ig_simple_checkbox It's not 100% (the box moves up when clicking), so we modified the code a bit for our use.
I downloaded the application 261 with a test checkbox (page 11) with the .js and .css files. Works fine. Now I tried to copy the page for my application, changes the columnname in the select statement to DONE, the column content from J to Y. select LOTP_ID, LOTP_NAME_KURZ, LOTP_NAME_LANG, case when LOTP_GKZ = 'J' then 'Y' else 'N' end as DONE, LOTP_DGV, LOTP_DGB, LOTP_DLA, LOTP_BEN, LOTP_INFO from lotp; copied the page Javascript and CSS, copied the css class and Javascript Initialisierungscode. I only see an empty checkbox and cannot change (from select statement the checkbox should be activated) to active or inactive. Where is my error?
Do you see the blue tick on click of the checkbox? If it is there that means value is being changed from yes to no or vice versa but your css class is not reflecting. In this case verify the name of the class and modify accordingly.
I see the blue tick. Now I created a new application and copied the page with the checkbox, downloaded and uploaded the shared components . It doesn't work. I am not so familiar with css an js scripts so I left both unchanged Please help me again
I think in the issue is in display value set, as a workaround you can also add the below css to set the box checked.
.checkStateY.fa-square-o::before { content: "\f046"; }
I copied your help into page CSS inline but how can I call it from DONE (checkbox) column?
how to simulate the when-checkbox-checked trigger in oracle forms in oracle apex?