Hello,
In a tabular form I want a value of a column not equal to the other. How do I do that? I'vê tried for validation and it did not work. That is, if in the form, we had the following case:
Col. 1 Col.2
XX
Clicking on the submit, An error message appears. You can only accept if Col.2 is different from Col.1
Tabular Form - Different Value Columns
-
- Rank: Analista Sênior
- Posts: 155
- Joined: Fri, 17 Oct 2008 6:05 pm
- Location: Campo Grande - MS
-
- Rank: Programador Sênior
- Posts: 52
- Joined: Mon, 09 May 2011 1:13 pm
- Location: Porto Alegre - RS
GIVE ME COFFEE AND NO ONE GETS HURT!
Dude, I did not quite understand your doubt.
But I believe that when the person clicks the Submit button you have to go through the entire block from the first record until the last, comparing the values.
To stop the application you can use raise_application_error or exceptions ... There are several possibilities!
But I believe that when the person clicks the Submit button you have to go through the entire block from the first record until the last, comparing the values.
To stop the application you can use raise_application_error or exceptions ... There are several possibilities!
-
- Rank: Analista Sênior
- Posts: 155
- Joined: Fri, 17 Oct 2008 6:05 pm
- Location: Campo Grande - MS
No, what I want is the following: The value of column 1 can not be equal to column 2, on the same line.
That is when I type X for column 1 and have the same X value in column 2 for the same line in the table, when I click the Submit button, an error message .
ie:
Column 1 Column 2
XX -> Error message and not saved
YX -> OK . Records the record
This on the same line as the table, that is in the same record. In different records no problem.
That is when I type X for column 1 and have the same X value in column 2 for the same line in the table, when I click the Submit button, an error message .
ie:
Column 1 Column 2
XX -> Error message and not saved
YX -> OK . Records the record
This on the same line as the table, that is in the same record. In different records no problem.
-
- Rank: Analista Sênior
- Posts: 155
- Joined: Fri, 17 Oct 2008 6:05 pm
- Location: Campo Grande - MS
Hi,
was what I did pus a validation in the X field to check if it is equal to the Y field, but it did not work.
Only the X field is Updatable. All other fields in Tabular Form are just display the text.
Maybe the detail is that in the X field it is not a text field, but a Select List. This Select List has all values ??that were recorded in the Y field of the table, including the value of that record.
I hope that with these details can help.
was what I did pus a validation in the X field to check if it is equal to the Y field, but it did not work.
Only the X field is Updatable. All other fields in Tabular Form are just display the text.
Maybe the detail is that in the X field it is not a text field, but a Select List. This Select List has all values ??that were recorded in the Y field of the table, including the value of that record.
I hope that with these details can help.
-
- Rank: Analista Sênior
- Posts: 155
- Joined: Fri, 17 Oct 2008 6:05 pm
- Location: Campo Grande - MS
But that's what I did and it does not work.
What are the types of fields you want to compare?
I did with two text type text and it worked.
A PL / SQL Error type validation
Here is the validation code
I did with two text type text and it worked.
A PL / SQL Error type validation
Here is the validation code
IF : P135_X = : P135_Y THEN
raise_application_error (-20001,'Os valores são iguais');
END IF;
-
- Rank: Analista Sênior
- Posts: 155
- Joined: Fri, 17 Oct 2008 6:05 pm
- Location: Campo Grande - MS
One of the fields is a SELECT LIST and the other is display the text.
Put here as you did the validation, do not forget that in select list you have to Compare is with the return value and not with the value that is displayedRobson Costa wrote: One of the fields is a Select List and the other is display the text.
-
- Rank: Analista Sênior
- Posts: 155
- Joined: Fri, 17 Oct 2008 6:05 pm
- Location: Campo Grande - MS
I put direct fields (x <> y), X being the column with Select List.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests