Manually trigger the "validation failed" rendering mode
Hi,
I am converting a forms application to APEX. The forms application has many before insert triggers with raise_application_error instructions. These triggers are used for validation purpose. Obviously there are modifications needed as I want to display the application error messages in the notification box instead of the APEX error page.
The most efficient way is obviously to reproduce the trigger logic in APEX validations. However I am curious to know if there would be a way to replace the raise_application_error instructions in triggers with something that could stop and rollback all the processing and then re-render the page like when a validation fails.
I played with wwv_flow variables but I didn't find anything that would trigger this. Is it possible to call the same thing that APEX uses to re-render the page with notification message when it detects that one or more validations have failed?
Thanks.
Hi ,
I am not sure if this would work, but you can give it a try. In the exception area try to display message using the
apex_application.g_print_success_message := apex_application.g_print_success_message|| 'My custom text' ;
Thanks,
Manish
Similar Messages
-
How to submit a form, but not to trigger the validations
Hi! I have a form on a table and I have 2 radio with submit. The problem is that when I click this radios the page submit and trigger the validations, so I get the "Field1 must have some value" error. How can I solve this problem?
Thanks!
Best regards,
VitalyThanks Vikas!
The problem that is that now it branches to another page( as if I pressed the Cancel button).
Do you know why?
Vitaly -
How to trigger the BIOS CRISIS Recovery mode for Thinkpad T61.
For any other laptop, there's a possibility to run a BIOS crisis recovery, by holding Win-B or Fn-B and a few other conditions, one can make the laptop to boot up from a USB floppy drive and restore BIOS even if it's not working. But it seems that it doesn't work for ThinkPads, or I don't know to trigger the mode.
Thank you in advance.Your post was very helpful. It did the trick. The photos of the screens and etc. helped.
I am using a Toshiba laptop that came with Winddows 8.1 (64bit), which allegedly supports UEFI boot.
Initially, the boot failed and after trying different settings I recalled a statement that not all USBs work the same and results may vary. I tried another USB and your selections worke perfect.
I did not revert the BIOS settings and the machine boots properly to the normal login.
My need for a bootable USB is to boot the laptop if the hard drive fails. This allows to either re-image it or replace the hard drive and for re-image it. The key is the bootable media.
Thanks for your effort..!
MarkinID
PS - I've clicked the Kudos button -
Automatically displaying the error text for a form field when the validator fails?
Hi,
Flex 2 has a very nice feature to display custom text next to
a form field whose validation failed. But the user has to move the
mouse over the form field to display the text. Is there a way to
invoke this feature programmatically?
What I would like to do is validate form fields on submit and
- if validation fails for a form field - set focus on that form
field and automatically display the custom error text in the red
blurb. Focusing works fine but I cant' get the text to render...
MarkusThanks Bregent.
Weirdest thing...I just tried a Google search for a solution to this problem and came across another thread on this forum. By the time I got to the bottom of it I realised one of those taking part was myself from years ago! Jeesh, been here before or what!
Changed my recordset to...
<%
Dim rsPROP__MMColParam
rsPROP__MMColParam = "0"
If (Request.Form("categoryID") <> "") Then
rsPROP__MMColParam = Request.Form("categoryID")
End If
%>
<%
Dim rsPROP__MMColParam1
rsPROP__MMColParam1 = "1"
If (Request.Form("categoryID") <> "") Then
rsPROP__MMColParam1 = Request.Form("categoryID")
End If
%>
<%
Dim rsPROP
Dim rsPROP_cmd
Dim rsPROP_numRows
Set rsPROP_cmd = Server.CreateObject ("ADODB.Command")
rsPROP_cmd.ActiveConnection = MM_cs_STRING
rsPROP_cmd.CommandText = "SELECT prodid, product, categoryID FROM dbo.products WHERE ISNULL(?,0) = 0 OR categoryID = ?"
rsPROP_cmd.Prepared = true
rsPROP_cmd.Parameters.Append rsPROP_cmd.CreateParameter("param1", 5, 1, -1, rsPROP__MMColParam) ' adDouble
rsPROP_cmd.Parameters.Append rsPROP_cmd.CreateParameter("param2", 5, 1, -1, rsPROP__MMColParam) ' adDouble
Set rsPROP = rsPROP_cmd.Execute
rsPROP_numRows = 0
%>
...and it works fine.
Appreciate the help. I would have taken your advice and done an If Else on the WHERE clause to acheive the same.
Thank you.
NJ -
Manually trigger the responsive resize method
I am building slide type webpage, and each slide is set to display: none, and removed from view until the viewer hits the button to slide to the next or previous slide. Edge compositions set there do play, but they do no resize accordingly when the viewer slides over. Does the Edge JavaScript API allow for us to externally trigger the resizing of Edge compositions?
Hemanth Kumar,
Thanks for the reply! I went and tested what you suggested, but unfortunately nothing actually happens to resizing the Edge composition — unless I physically resize the browser window with my mouse. Triggering it via JavaScript does not resize the composition.
To explain a bit more about the issue: The Edge composition does this weird behavior only when, the composition is loaded, I move to the next slide (the previous slide with the active Edge composition) is set to display: none. Now, on the new slide, I resize the browser window, and then move back to the previous slide (now set to display: block). This results in the Edge composition being scaled very small, until I resize the browser with my mouse then it rescales back to full size (fit its parent container).
Any suggestions or thoughts? Thanks. -
Is the only option for a good night's sleep to manually put the phone in silent mode?
On Google Voice I have do not disturb hours automatically, so calls at 3am won't ring my phone.
However, I also have people who call my iPhone directly.
I live in Hawaii and I don't need calls coming in at 3am my time, 9am EST. I can manually put it into silent mode, but last night I forgot, and sure enough the phone blasted away while I was sleeping.
Why can't I say during certain hours don't ring the phone? This is a smart phone right?After researching it more today I found at that Apple is falling behind.
With the Android not only can my phone be silenced at 3am automatically, but it will also automatically adjust the ringing and vibration based on my location or at specific times. For example, if I am in school it knows I am in school and the ringer is shut off automatically, so I don’t get that embarrassing call during a lecture. Once I leave school I don’t miss calls because the ringer automatically comes back on, I don’t have to remember to change it manually.
Plus, you can specify certain callers to get through at anytime, for example, my family can still ring my phone at 3am, but no one else. Daycare can always get through too, even if you are in a meeting you want to know if your child had an emergency.
It can even remind you to charge your battery if it is below a certain percentage and it knows you are now located at home where you can charge it.
I am feeling left out of the technology curve now with the iPhone clunky on / off hardware switch that I have to remember to change manually. -
Keep the old value in the UI field if entity validation fails
Hi,
I have a requirement to retain the original value (old value), if the entity attribute validation fails when the filed value is changed. I have created one validation rule on the entity object and the validation rule is working as expected. But I would like to reset the value to the original value if the validation fails on the modified value.
Thanks and Regards,
S R PrasadHello,
Please tell us your first name, and change your forum handle to something more friendly than User123. It’s nicer and easier for us this way.
It seems that the forum software messed up the example code you wanted to present. To avoid that you can use the forum tags [code] and [/code] at the beginning and end of your code.
If I understand correctly, you are trying to retrieve the original field value from a fxx array, however these arrays are populated after page submit, so they don’t hold the initial values of the column.
I think the simplest solution will be to use an ‘onfocus’ event that will save the initial value – this.value – in a global JavaScript variable. In your ‘onchange’ code, instead of clearing the field if validation failed just assigns the original value for the JavaScript variable.
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More -
Table Maintenance Generator : Editable Entry after validation fails
Hi,
I have created a Z table and a table maintenance generator to maintain the data.
I have to carry out certain validations when user enters data on Key and Non- key fields.
This is working fine, but the issue is with the key fields.
If validation fails, the table maintenance screen is displayed the date-field is grayed out (non-editable) as it is the key field of the table.
Now the user cannot change the data unlike the non-key fields were the user can modify the non-valid data and save again.
How can make the date field (Key Field) editable after entry in case the validation fail, so that the user can make the changes.
Please suggest the approach to handle the above scenario in events.
Thanks,
KeyurThanks Kiran for your inputs.
I have done the same thing what you have explained.
I have used a Form Routine as CIP_SAVE with Event Number as 01, since on event SAVE i need to validate whether dates are
overlapping the inputs dates or not.
Fields are :
Group ID (Key)
Start Date (Key)
End Date (Key)
Value (Non -Key)
Initial value in Table:
Group ID = 12345
Start Date = 01/01/2011
End Date = 01/31/2011
Value = 11.11
Now if i try to enter value:
Group ID = 12345
Start Date = 01/02/2011
End Date = 01/25/2011
Value = 99.99
& SAVE it... validation will fails because Start & End dates overlaps.
Hence, on Table Maintainance Screen all key fields will be in non-editable display mode, whereas non-key field will be in editable mode.
My requirement is that Start Date & End Date key fields must be Editable field.
Thanks. -
Adding message to FacesContext when validation fails...
Hi
I am trying to add a validation message whenever a <af:inputText> value fails validation.
This error message should be displayed beside the inputText component.
The inputText is set to autoSubmit which will trigger the validator.
The following is what I have:
JSF page:
<af:inputText id="textUI"
label="my label"
maximumLength="200"
value=" .... "
required="true"
validator="#{backing_text.validateText}"
autoSubmit="true"/>
Backing bean:
public void validateText(FacesContext facesContext,
UIComponent uiComponent, Object value) {
FacesMessage message = new FacesMessage();
message.setSummary("error summary");
message.setSeverity(FacesMessage.SEVERITY_ERROR);
FacesContext.getCurrentInstance().addMessage(uiComponent.getId(), message);
throw new ValidatorException(message);
With the above code, when validation fails, no message is displayed beside the errorenous inputText component.
Does anyone have any idea where I could have gone wrong?
Thanks
Erictry removing the autoSubmit="true" from the jsp.
-
Trigger the Dunning at same level
Hello ,
I have a requirement to trigger the same dunning level again for certain validation .For example I Triggered the Dunning level 8 and inside that level it triggers some activities .when system trying to go for next level we need some validation (Need to check the whether the Service request has been created at 8th level or not ).If the validation failed we need to trigger the same 8th level again to create the service request for PDV(one of the activity ) .Is there any way to do this or any event to write the validation ?
Thanks ,
PankajHi Amlan,
Thanks for the Reply .I have tried to change field c_mahnn with old dunning procedure but it is not generating the dunning proposal because system is loking the issue date from FPVA and compare the date with configuration for that level .for example in level 8 we have maintained the dunning frequency as 20 days and in 9th level it is 4days .We have executed the dunning level 8th on the issue date 01.09.2014.it is successfully generated .after 4days i.e 05.09.2014 it should trigger the next level of dunning which is 9th level .As per you recomendation i have changed the MAHNN field to 8th level again .but it is not happening as system is looking the issue date as 21.09.2014 to triger the same dunning level (8th level).
I can not change the dunning frequency as it is applicable for all the accounts .I am looking the exit where i can change the issue date in the program .There is a global parameter
gl_para_0300 -ausdt need to be changed fto fix this issue .Is there any possibilities to do this change ?
Thanks
pankaj -
Report shows "No data found" when validation fails
Hi folks,
I'm new to the OTN and have a short question regarding validations/report pagination.
We are using Apex 4.0.2.00.07.
I have a page containing a report with three columns.
First column is a checkbox (f30), the second one a date picker and the third one is a value field (f34).
I'm trying to build a validation for the value field (should only allow numeric values, but is varchar2) and used a validation with "Function Returning Boolean".
The PL/SQL code is:
DECLARE
vrow BINARY_INTEGER;
v_number FLOAT:=0;
BEGIN
FOR i IN 1 .. APEX_APPLICATION.g_f30.COUNT
LOOP
BEGIN
vrow := APEX_APPLICATION.g_f30 (i);
v_number := to_number(APEX_APPLICATION.g_f34(vrow));
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END;
END LOOP;
END;
The validation works fine, but every time I enter a non numeric value and the validation fails (error message is displayed correctly as notification) I get a "report error: ORA-01403: no data found" in the pagination area of the report.
Tried to disable pagination completely, but the error still displays when the validation fails.
Any help would be appreciated.
Thanks in advance and regards
SandroContent of the checkboxes is ok, debugging showed
1:7
2:8
(records 7 and 8 where ticked)
Debugging console also shows:
0.10900 0.00000 Processing point: Before Box Body
0.10900 0.00000 Region: Shareclassinformation
0.10900 0.00000 Item: P59_IS
0.10900 0.00000 Item: P59_NA
0.10900 0.00000 Item: P59_CO
0.10900 0.00000 Region: Attribute Selection
0.10900 0.00000 Item: P59_LO
0.10900 0.00000 Item: P59_ID
0.10900 0.00000 Item: P59_IDAH
0.10900 0.00000 Item: P59_IDAT
0.10900 0.00000 Item: P59_SHO
0.10900 0.00000 Item: P59_UTD
0.10900 0.00000 Item: P59_X NA
0.12500 0.00000 Region: Attributes
0.12500 0.23400 Item: P59_NOT
0.12500 0.00000 show report
0.12500 0.00000 determine column headings
0.12500 0.00000 parse query as: DB
0.35900 0.14100 binding: ":P59_LOV_AT"="P59_LOV_AT" value="64"
0.35900 0.00000 binding: ":P59_IDT"="P59_IDT" value="51"
0.50000 0.01500 print column headings
0.50000 0.00000 rows loop: 20 row(s)
*0.51500 0.01600 report error: ORA-01403: no data found*
0.51500 0.00000 Computation point: After Box Body
... -
VPD "Lost" after validation fails
Hi,
We have a custom in house VPD. In the application security section, under VPD, we call a procedure which sets our security context client_id in order to be used to make context references within secure views.
In our page we have a simple select list which is run against a "secure" view. Once the user selects a value they hit continue to go on. A validation is put in place to make sure that a value has been selected.
If the validation fails, we go back to the page and the validation error message displays (as it should) however the select list has no values. After doing a lot of testing, references to any view that uses the VPD returns no values when a validation fails.
We've done some test and it appears that the following happens:
- On a page submit the VPD function gets called (as per the application security / vpd)
- Validations are performed
- If validation fails, run: dbms_session.clear_identifier;
- Load the page along with the appropriate error messages.
Is this correct? Is their anyway around this?
We have tried to set an application process to run before header which would run the same function as that called in the VPD section, however the process isn't run when a validation fails.
Thank you,
MartinAPEX sets client identifier to: APP_USER:APP_SESSION. CLIENT_INFO is set to just APP_USER. Try the following query from the SQL Workshop as well as a region on a page to give you a better idea of what APEX sets:select sys_context('USERENV','CURRENT_SCHEMA') CURRENT_SCHEMA,sys_context('USERENV','SESSION_USER') SESSION_USER,
sys_context('USERENV','MODULE') module,sys_context('USERENV','ACTION') action,
sys_context('USERENV','CLIENT_INFO') CLIENT_INFO, sys_context('USERENV','CLIENT_IDENTIFIER') CLIENT_IDENTIFIER
from dualI would probably include the IP Address of your HTTP Servers in the policy to make sure it's not someone connecting from SQL*Plus: sys_context('USERENV', 'IP_ADDRESS')
Tyler -
Is Numeric Validation Failing on Decimals
We just moved from HTMLDB 1.6 to APEX 3.0.1. A field that used to work fine will now not accept a decimal number. It is a text field. There is an item level validation on that field and the only criteria in it is "IS NUMERIC". If I put in a whole number, it works fine, if I put in a decimal number the validation fails. What has changed?
The decimal separator has always been a period. Just now I replaced it with a comma and it accepted that as numeric. So I don't know if it thinks 4,5 is 4 and a half, or 4 and 5. The application is in English but has been translated to French (I tried it in French as well and it's the same - periods as decimals make it fail, comma instead of a decimal and it saves fine.) Regardless, what would make APEX think a comma makes a decimal number numeric? A database setting? There is no format mask on the field. I deleted the field and recreated it, same problem.
My Oracle space was removed awhile ago so I have to request it again - I will put this page up there later if there isn't a simple flag or something that needs to be set to accept decimals to be periods instead of commas. -
Confirmation Dialog in ADF box if validation fails
Hello All,
When the user hits Go, validations are run in myClass. Some of the validations are not mandatory but I still want to confirm with the user if he/she is sure to proceed. So when the validation fails I want to dialog box asking the user "Are you sure"?
Please Help!!!!!!!!!
Thanks,Hello All,
When the user hits Go, validations are run in myClass. Some of the validations are not mandatory but I still want to confirm with the user if he/she is sure to proceed. So when the validation fails I want to dialog box asking the user "Are you sure"?
Please Help!!!!!!!!!
Thanks, -
Reset Item After Regular Expression Validation Fails
Apex 4.2
I have a page item (P1_MYITEM) that should only hold alpha charaters, so I have created an item regular expression validation
using
^[a-zA-Z]+$
This works well, but now I want to reset my item (P1_MYITEM) to null
if the validation fails.
Tried using a page process, but they do not run if the validation fails.
Any ideas ?
GusGot it working using
Begin
if not regexp_like (:P1_MYITEM, '^[a-zA-Z]+$')
then
APEX_UTIL.SET_SESSION_STATE('P1_MYITEM',NULL);
return 'Country must be text characters only.';
end if;
End;
Maybe you are looking for
-
HP Laserjet 8000N not working with Maverick
Hello. I have been trying to set up a nework printer on a new MacBook Pro running Mavericks. Software updates have been run. We have tried to de-install and re-install the printer, an HP Laserjet 8000N. HP doesn't have an updated driver for Maveric
-
/etc/pacman.conf question..
This may have been asked before, but I could not find it... <yes, I did use the search on the forums... > I was wondering if the NoUpgrade option in pacman.conf uses shell-like wildcard expansion... Does the following work? NoUpgrade = etc/host* she
-
does anybody know how to quicken up my itunes store. everytime i go on it it takes forever to load up!!
-
Is there a link for the reference PDF for Photoshop CC?
-
Blank Screen Issue with QuickTime V7.6.x
After update the Quicktime from V7.5 to V7.6.x, I can't view RTSP streaming from my IP camera(Axis 211A and Linksys WVC210). When use QT setup connection to the ipcamera, I can only got the blank screen. Anyone who can help on this? Highly appreciate