Oracle APEX interactive grid duplicate column value validation - oracle

In an interactive grid, what is the best way to validate for duplicate values in a column. I have a requirement to check if a date column exists for more than one row. Is there an api or a declarative way to not allow more than one row with the same date.
APEX version : 20.1
Thanks,

Found this neat example at https://lschilde.blogspot.com/2020/04/interactive-grid-validation-duplicated.html very useful

Related

BIRT suppress multiple duplicate columns

I am working on a BIRT report. Its records are grouped on the basis of the status column. I was looking for an option in the Eclipse BIRT tool by which I can hide combinations of multiple columns in a row which are repeating. I have attached screenshots for both the current report and the expected report structure.
I tried the "suppress duplicate" option but that is limited to a single column. I am not able to apply this on multiple columns together. I couldn't figure out any other option. Please suggest any solution in the tool or do I need to change my query to return the result in the expected format?
Actual Result:
Expected Result:
There are three obvious ways to hide duplicate values.
All of these require you to configure this per column (BTW I don't understand why you consider this to be a problem).
As you already did: Use "suppress duplicates" at the column level.
Add more groups to your table after the existing group.
E.g. one group for the first column (whatever that is).
Then you can choose "Drop" "detail" in the properties of the corresponding group header cell. It's a bit difficult to get the layout right this way.
In your data set, if it's SQL, you can use a little construnct with CASE and the LAG analytic function to compare the column value to that of the previous row, and if they are equal, return NULL instead (pure SQL solution).

Apex 5 Add new row at the and of interactive grid

I'm a new user of oracle apex 5. I'm using interactive grid but i have a problem, by default apex 5 add the new row after the selected row, but i want add the new row after the latest row.
How can i do it?
I don't know, but - why do you care about position where row is inserted? It is - after all - stored into a RDBMS table, and in those tables there's no "order" of rows; think of them like apples in a basket. Which one is first, which one is last? You can't tell until you sort them, and that's done with the ORDER BY clause.
Which, in your case, means: the next fetch (or refresh) will sort them properly anyway.

Question on changing the APEX data load wizard to give default target columns

Within the data load wizard that comes with APEX 18.1, after you choose your csv file to be uploaded you are offered a "TARGET COLUMN" drop down LOV which defaults to "DO NOT LOAD". It is possible to tell APEX which values you want in this LOV. I have done this.
My issue is, that this is quite laborious. Your users will not necessarily know which value you want them to pick from the LOV to map the related column when they are using a csv file with no header. As they are going to be doing.
Does anyone know how to change the "DO NOT LOAD" value in the LOV to another value? If I could get it to default to a column of my choosing, this would be great. Alternatively, there's a "SOURCE COLUMN" field in the wizard.
Getting the "SOURCE COLUMN" field to denote which column I wish users to map to the LOV value would be something also. Has anyone faced this before? Does anyone know if it is possible to do what I am suggesting as a work around? Thanks for looking and for your thoughts.
APEX does the column mapping automatically by checking the name of the column in the csv(the first row is names usually).
So if the names of the columns match in the table and the csv, it will connect them by itself. What you can also do is set column aliases.
If you want to edit the existing data load, you can go to Shared Components- Data Load definitions and pick the one you are using in there.
Then you can set column aliases there. But afaik you can only do one alias per column there.

Oracle Apex 18.1 editing IR

When I try to edit more than one row in an Interactive Grid, some rows are deleted. I use Oracle Apex 18.1
Here is Apex IR
If query (that the IG is based on) contains a WHERE clause, and if you modify columns that are used in that WHERE clause, maybe they don't satisfy the condition so IR doesn't display them any more. They aren't actually "deleted", you just don't see them.
Oracle Apex has not reported any known bugs in the release notes for APEX 18.1.0:
https://www.oracle.com/database/technologies/appdev/apex/known-issues-v181.html
The issue might be due to:
(1) On Click of Save the saved record must disappear because you might have not have returned the primary key in the Interactive Grid Processing Section.
(2) There might be some WHERE conditions in the query that might not satisfy the condition so the rows(s) might disappear.
(3) There might be some CODE written in the Database to delete the rows based on some condition (or) there might be some Triggers in the table that deletes the rows based on some condition.
(4)Installation Issue (Please check the Installation LOG), consider this point as the last approach.

how to set dynamic header using BIRT?

I am newbie to BIRT and unfortunately my first task is over complicated.
I want to create table like this
Birt Report Snap
the columns in this picture must be dynamic. the data for the column name is in database and I have to fetch it and create columns on the go. 2nd to put values against it.
kindly tell me if this thing is doable in birt. I am new to this so please don't give negative ratings
thanks.
I believe what you are looking for is called a Cross Tab Table.
Here is a tutorial video on it: BIRT - Cross Tab Table
In addition to SBurris answer, which is the way you should try first, I can assure you from my experience that what you want is in fact doable with BIRT, and even in two different ways.
However, some of the minor aspects might be a bit quite tricky for beginners, e.g. the merged cells in the column header, the different background colours and border widths for the columns. So, these style aspects shouldn't matter at first, you can tackle them later.
The first, by far easiest and standard way to achieve this kind of report layout is a cross tab, as SBurris said.
The second option is - depending on the database backend - to use a "normal" Table report item in they layout and to "create the cross tab" with SQL.
This is more powerful IMHO as the BIRT Cross Tab report item, but also more complicated.
For examples, see here:
Pivot / Crosstab Query in Oracle 10g (Dynamic column number)
Pivoting rows into columns dynamically in Oracle
How to do Pivoting in Oracle 10g
(you get the idea)
To use this with BIRT, you'll have to select the column title values in addition to the cell values.
You have to decide how many columns do/should fit on your page (if you're using PDF output).
You can use the maximum aggregate function in the visibility expression of the columns to hide empty columns.
If the number of logical columns exceeds the number of columns for a single page, you can extend the idea further by dividing the cross tab into several, each with at most N columns.
However, note that this approach will need an experienced BIRT developer...

Resources