Iterate all row in table and select data in another table - jdeveloper - jdeveloper

I have a table, call it transaction detail. Above it, i have a submit button. When i click the button, it'll bring popup with a check box from a table called items, and all item in the trans.detail table will be selected in items checkbox.
My question is how to select items in checkbox and update table transaction detail when i Check/uncheck some items in the checkbox?
I hope i explain well. Thanks..
Update : more explanation...
There are 3 tables actually, transaction, transaction detail, and items. One transaction have many trans detail, and on trans detail is coresponding to one item. So in trans detail i have trans.ID and items.ID attribute. I also have a view link..
My use case is, i click a row in trans table, and the transaction detail table will update itself (which is already done). And now when i click "Edit detail button", a popup will appear with items table in it, and item that already in trans detail will be checked in popup.

an approach similar to this may help: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/99-checkbox-for-delete-in-table-1539659.pdf
Frank

Your use case is not clear to me. A check box can be bound to an attribute (which can be transient) of the table (items in your case). Now you have to iteratir through transaction detail and set the attribute for the items attribute bound to the checkbox fro the corresponding row.
You did not mention how the transaction detail and the itwms are related and if you have a view link which connect the two. So I can't give advice on how to find the corresponding row.

Related

Oracle Apex - Interactive Grid rows values are repeating in other rows by clicking

I'm having this issue in Oracle Apex where I want to create a Master/Detail page with interactive grids for each section. The problem is that for some reason, when I click to edit rows in the detail grid, the values seem to "copy" into other fields too.
This is my grid when the values get copied when clicked in other row
For the master grid, this doesn't seem to happen.
Silvio.
I had the exact same problem.
I found myself that i defined the wrong column as primary key on the detail IG.
Try it and let me know if helped.
Have a nice day.

How to enable interactive grid cell validation in Oracle Apex Master-Detail page?

I have created a Master-Detail page in my Oracle APEX application. Basically i have a list of rows from one table and I can add values to it though a form. That works correctly, validations also work (every column from Master form can be accessed by adding ":" in front and that works in this case). I also have an option to edit click pencil icon in front of every row which lets me to update current row and also displays the Detail part of that row. Detail part is a list of values from another table that is connected to the first one using foreign key (Master-Detail: one to many). It is automatically displayed as interactive grid, so when editing my Master table value I can also add new rows to Detail table, but the validations don't work for Detail table. I tried accessing it's columns the same way as before, but it just doesn't work (tried to add PL/SQL expression validation:
:column >= 0
but that didn't work. How can I enable the validation for interactive grid, because I've looked into some resources about it, but they just show the first way, that doesn't work for me?
For a validation on an Interactive Grid you need to set the attribute "Editable Region" for the validation to your interactive grid. That works ok for me. I tried with a Master Detail on Dept (Master) and Emp (Detail) with a validation on detail of :SAL > 1000

SSRS Dynamically Show Data

I am wondering if you can have other tables show based on the value selected in the main table. I am not opposed to drill-down either.
My main table is the summary and was hoping to show additional data when the user clicks on a Type. When clicked another table would be visible. For example, in the screenshot, the Pool table would be visible when the Pool type is clicked in the main report. As mentioned if this is easier as a drill-down then I will do that, but not sure how. The report currently has a dataset for each table. Do I need to combine the datasets to do a drill-down?
Main and child tables
The best way to accomplish what you described is with a drill down and you would need to combine the datasets into one.
Combine your datasets
Add a table to your report and reference the single dataset
Add your detail row group to the table - from your child table (Area, Average)
Add a parent group to your details row, group your detail row group by Type, it should add a Type column to your table. Delete this column and it will ask you to delete the associated group as well. Select the option to delete only the column.
Recreate your table by adding rows, be sure to match the grouping indicators (brackets) on the left side
Right-Click on the bottom row in the box where the bracket is to highlight the entire row, click Row Visibility. For the option "when the report is initially run:", select Hide. Check "Display can be toggled by this report item" and select the name of the textbox that contains [Type]. If you don't know what this is, exit out of the dialogue box and right-click on the cell [Type] and click Textbox properties, the Name will be in there
Repeat step 6 for the label row for your details row (second row from the bottom)

Multiple detail rows and page breaks on report

I have a problem with a rdlc page breaking and table with multiple detail rows. Tried everything that crossed my mind, none works.
As you can see on the picture below, the table has 7 detail rows.
Now, when report is rendered, the page gets spitted between, for example, rows 2 and 3 which is bad.
I wish to keep all of detail rows (that belong to one record) on the same page. How can I accomplish this?
I think you should create a group based on whatever joins the one record together, let's call it PlaceID. So right click, Add Group, choose what to group by.
Then, under the row groups you should have a group by PlaceID, and underneath that, a row marked "Details". Highlight Details in the lower section, which should highlight in the report the rows involved. Set the KeepTogether property of that section to True, should keep details on the same page.
If you don't want to use the Group option mentioned by Jerry, this option in the Table Properties may help...

front-end user interface to view record edit history

I have a web application that inserts/updates/deletes records from a database. Each time a transaction is made to a table, the change is recorded with the type of modification and the previous values from a trigger. What is a good web user interface layout to view such transactions to the users? Currently we just dump the whole history table to the user in a html table row and column format. I'm looking for some interface hints to present these edit history better.
Thanks for your input.
You can use a grid representation of the database table, plain html or produced by a js framework, plenty of options out there.
For the newly inserted records with no updates, just show the record with the insertion datetime.
For records that have been updated you can add a link/button at the end of the row with a title like "history" or "previous versions" or somethink like that and when a user clicks on it, then you can open a subgrid under this record or a pop up with a new grid (depends how you will implement your grid on the first place) which will show this record's history only.
The deleted records, you can add them (at the bottom of the table maybe) but grayed out or striked out. Again you can add the history option if you want it even for deleted records.
EDIT:
You could also add some filtering functionality above your grid for the user to select/see only the inserted/updated/deleted records and of course sorting functionality on the grid columns

Resources