How can I set the Interactive Grid and its form in same page on Oracle Apex 18? - oracle-apex

I set the Interactive Grid and its form in same page. For exampe:
The name of table is TEAM, and it has columns like TEAM_ID, TEAM_NMAE, DESCRIPTION.
These contents are displayed in Interactive Grid, and they can't be edited in interactive grid alone.
I added Row Selector in Interactive Grid, set to select only one row at a time.
As you can see in above picture, below the page I set the form that displays contents from the seleted row in the interactive grid. I also added save, create, delete buttons in the form region.
So, I want to edit the table's contents in one page when clicking the button.
I can just display table's contents in items using '$s("P3_TEAM_ID", team_id);' function, but still, I can't apply changed items to real table (in the interactive grid).
In this case, how can I make the form and interactive grid work as I think?

Your gonna need to do some custom saving.
Display the data with some javascript $s
Then have a process that manually saves the page items into the DB.
UPDATE table
SET name = :P1_NAME
,address = :P1_ADDRESS
...
WHERE id = :P1_ID;
Something like that. Not that hard to do, just set it into processes when a save button is clicked.

Related

Oracle Apex - Problem with InteractiveGrid field in Dynamic Action refresh

I have a problem using a dynamic action refresh in an interactive grid.
I have a field of type popup lov, when I choose one of the items in the list, I am performing a query to fill a collection, and then I do a refresh with a dynamic action, so that the data is reflected in the grid.
But at the moment of doing it, this happens with the field:
enter image description here
and in the console it shows me the following:
enter image description here
I hope to have your help, thank you very much.

Interactive Grid shows no results when filtered or sorted

I am using Oracle Apex v21.1. I have an Interactive Grid on a Modal Dialog Page which gives me the logs of the modifications made on a certain item.
Here's the scenario :
Select the item on the list Step 1
The details page of the item opens
Click on the "Logs" button Step 2 & 3
The "Logs" button open another Modal Dialog Page which displays an interactive grid Step 4
The "Logs" button set the value of the primary key to the interactive grid, so the list is filtered to show the information of this particular item. Step 5
Everything works fine, but when I try to apply a filter, sort or search, the interactive grid refresh, shows no data, and a blank column appears. If I close the list but reopen it again, the results are appearing, based on the filter, sort or search.
What could be the reason behind this problem ?
Here's the code of my Interactive Grid
SELECT * FROM inv_tb_item_logs
WHERE pk_article = :P24_PK_ARTICLE; --pk_article is my primary key
You can see more details on the screenshots
Thank you in advance,
Thomas
Based on Koen Lostrie's answers, here's how to fix it :
Create an Hidden Item to retrieve the ID of the Item later on the Logs List page Step 1
In the Behaviour of the Logs button, set the value of the hidden item to the value of the ID of the Item Step 2
Change the WHERE clause to WHERE id_item = :P25_PK_ARTICLE
In the Page Item to Submit attribute, select P25_PK_ARTICLE
I had to create this specific hidden item because i couldn't select the P24_PK_ARTICLE item to submit since it was on another page.
I hope this could help other people, thanks again for your answer Koen !

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.

Oracle APEX, create & save (insert) from Interactive Report page to DML Form

Need a help in understand underline logic here. I have created a simple APEX application. First page shows the table details and via a "Create" button "Interactive Search" region, directs to a form page. Now form page consists of "Save" and "Insert" buttons in correct regions. So whole app works. When I press "Create" from 1st page to 2nd, "Save" button is invisible and when I click the edit icon on the table of 1st page, "Create" button is invisible in 2nd. App works accordingly, but could not figure out what setting enable this set-up even though I was able to make it work.
1st Page : Interactive Report Page. 2nd Page : DML Form. Built the app from blank pages.
Could any of you explain how it works?
When you click the Create button on the Interactive Report page, it takes you to the Form page in insert mode, i.e. it allows you to enter a new row into the table. Therefore, the Form page has the Create (and the Cancel) button.
On the other hand, when you click the Edit button on the Interactive Report, it takes you to the same Form page, but this time in edit mode which enables you to modify values (and save those changes with the Apply Changes / Save button), delete that row using the Delete button, or - as previously Cancel current operation.
If you look at Form page's buttons' properties, you'll see that they have Server-side Conditions set which are then used to render (or not) a certain button. For example, if the Form page number is 13 and the primary key column is set to the ID column, then these conditions look like this:
Create: P13_ID IS NULL (i.e. the primary key column value doesn't exist yet, which means that this is a brand new row)
Apply Chanages / Save: P13_ID IS NOT NULL (i.e. the primary key column value exists, which means that row you see was fetched from the database)
Delete: P13_ID IS NOT NULL (the same condition as for the Apply Chanages / Save button)
Cancel: it is always displayed.

How to combine tabular form and text area in one page?

I have a page, containing tabular data(region type SQL Query (updateable report)). It only updates existing rows using Submit. The wizard created ApplyMRU process. It works fine. But now I would like to place a text area in the same page, which will be bound to different table and will get updated once the same Submit button is pressed. How can I accomplish it?
I've created item for text area, but not sure what type of source I should set. Database column doesn't let me specify table. Also I guess I need a second after submit process, but not sure which one.
Keep your existing ApplyMRU infrastructure for the tabular form, and just define a second PL/SQL process that executes during page submit that will do whatever it is you want with your text area, eg:
insert into notes (id, text) values (:P1_ID, :P1_TEXT_AREA);
Take note of the order of the processes, as you may want to execute one before the other.