Oracle APEX: How can I hide IG APEX$ROW_SELECTOR programmatically - oracle-apex

Is there a way to hide APEX$ROW_SELECTOR programmatically to make it read only when a certain condition is met?
For example if I do a check for a value of a hidden page item on page load and based on the value of that page item what to hide selector column in my grid

I am not sure why you want this to be done programatically when we have an easy solution.
You can Hide/Show using the the Server-side condition of the column (Refer screenshot)
In this example if the Page Item (P44_SHOW_HIDE_RS) is 'Y' then the APEX$ROW_SELECTOR column will be visible else it will be hidden.
You can try out this link
https://apex.oracle.com/pls/apex/workspace_akil/r/test/hide-show-row-selector

Related

Apex: 22.1.1 - Based on the selection of the radio groups the form must be displayed dynamically

I am a newbie to APEX. I am currently working on radio buttons.. There are radio button groups in my page 1. For example :Radio 1 and Radio 2.Based on the selection of the radio button in these 2 groups , I need to dynamically show a Page items of the region in the same page. For a particular selection of the radio button groups, certain page items will be visible and certain will be hidden.
Also based on the values entered in the page items, on submit,the next page must display all the values which I entered in the region of the page elements.
What should be my approach to this. Please guide.
enter image description here
The way you described it, you'd use dynamic actions (Show / Hide) because they let you "dynamically" (and immediately) manipulate other items on the page.
You could use Server-side conditions as well, but they require page to be submitted first so - I guess that's not what you're after.
Therefore: initially hide all items you don't need (that's the same dynamic action, just set it to fire on initialization, i.e. when page is first rendered), and then show them as radio buttons' values change.
As of your next question: if you navigate to the next page using a button (so its action is to "Redirect to page in this application"), you can set next page's items' to values of items on this page. To do that, use Target - Link builder property (right below "Action").

Dynamic action is not trigger if i will put the LOV select list value in where condition on click button event

I am selecting a value from LoV.Then i am clicking a button to trigger dynamic action(When->event=click,selection type->Button,Button name).Then in Server-side Condition i am putting (rows return->select * from tab)--Its triggering as expected,But if i will change sql query (select * from tab where col=:Lov)(there is 1 record,but its not triggering).
The reason why it is not triggered, is because a server-side condition tells APEX whether or not to load the defined Dynamic Action when rendering the page.
In your first example, the query select * from tab will return rows. So when rendering the page, the dynamic action will be loaded and executed when the button has been pressed.
In your second example, including the where clause select * from tab col=:Lov, page item :lov is most likely still empty when rendering the page and therefore the dynamic action is not being loaded and doesn’t exist for the browser at the moment you press the button.
Server-side condition is not the right solution here.
If you want the dynamic action only being executed when the selected lov item also exist in a table.
In APEX 5.1 you can execute an AJAX call in your DA to check the row existence before executing the actual logic.
In APEX 19.2 you can define extra output columns in a LOV, which you can use to set an additional page item. Set that item as an indicator (Y/N) to run the DA. Then you can use the Client-side condition to determine whether or not the DA should be executed, based on the indicator.
Hope this helps. Let me know when you need further assistence with one of the two solutions.

How to use APEX$ROW_SELECTOR with Dynamic Actions within an Interactive Grid

Environment: Oracle APEX 5.1.2 / Oracle 12c
I'm currently using an Interactive Grid (IG) with the APEX$ROW_SELECTOR set to single record selection (i.e. radio group). What I am attempting to do, is use a Dynamic Action "Click" event off this APEX$ROW_SELECTOR, but unfortunately it's not firing when I click on the radio group selector.
I have the following questions based on the above:
How to add a Dynamic Action on row selection (APEX$ROW_SELECTOR) to fire when clicked?
When clicked, how to set a column value in session state to be used within a classic report?
Assuming the above is NOT possible with a Dynamic Action as part of an IG, how else can I perform something similar when a user selects a row with my IG?
You can search the class in the dom
.u-selector
Create a dynamic action using this class
And the result is
You need to follow the below steps:
You need to set a static class to the clickable column.
Create a new dynamic action of type "click"
The selection type would be JQuery Selector.
in the Selector field you need to fill the static class you mentioned in the column attributes.
You need to put the html id of the column as the id of the row and capture the value of it as follow in javascript:
this.triggeringElement.id -- it will capture the clicked item.
-Once you catch the value, you can set it to Page item and do whatever needed.

Formula help on IF ELSE on Smartsheet

I want to have a condition where IF Delivered column checkbox is checked, then that whole row will be deleted. Is that feasible?
How can I start with it?
Formulas can't change the condition of an item (like a row), only the value in a cell. So, in other words, you can't delete a row with a formula.
You "could" do this with an external script using the Smartsheet API, but you'll want to take situations that #Ken White mentioned in the comments into account. Your script should make sure that there is a way for users to recover the deleted row if the box is checked by mistake.
There are a couple of ways this might be possible. If you set up a default filter on a sheet to always load rows where complete box is unchecked, then, if you checked off a task or two and reloaded the sheet those tasks would not be visible the next time it loads.
To do this:
Create a new filter.
Title it and check the Share Filter checkbox
Set the criteria to the checkbox is unchecked
Then click okay
Save the sheet to save the shared filter.
Click on SHARE
Scroll down and click edit next to the default view
Set the filter to new filter you saved
Save.
Check off some boxes and save the sheet.
Reload the sheet and the completed items will not be visible.

how to add button for each row record in apex5

I have created an interactive report in apex5.0 with below select:
SELECT article_code,article_desc,order_date, order_status
FROM table_order
WHERE status in ('SHIP','DELIVER','CANCEL');
I want for each row record to have a button that when click it calls another page.
How to do that??
There are a couple options.
Edit the column and change the type of the column to Link.
Create an html link with an href to the page you want. Choose type display, then turn of escaping special characters in the column properties.
Calling another page is declarative, out of the box behaviour, and you'll find such examples in the documentation.
Declarative
http://docs.oracle.com/database/apex-5.1/HTMDB/editing-interactive-reports-page-designer.htm#GUID-B30458D6-9678-40D4-A477-28EE466ED50A
As link column
http://docs.oracle.com/database/apex-5.1/HTMDB/editing-interactive-reports-in-component-view.htm#GUID-48AF053F-0E34-40FA-94FE-19C0400AD499
Manual
http://docs.oracle.com/database/apex-5.1/HTMDB/understanding-url-syntax.htm#HTMDB03019
Using dynamic action http://www.grassroots-oracle.com/2015/12/tutorial-include-action-button-in-report.html