Format masks and IR searching
Hi all,
We have an IR in which we have formatted a number field. Instead of 47 the user will see 47,0.
In the search field in the IR I am only able to search for 47 (the database value), which is perfectly logical. But is there a way to search in the 'formatted numbers'?
Thanks,
Maurice
Good morning Rob,
Nice to talk to you.
the following is a cutNpaste from the OFGTEL65 lib.
BEGIN
/* Begin Headstart Customization */
qms$errors.show_debug_info ('ofgtel.pll, procedure cgfk$lkup_qry.extend_where, headstart 5.0.6 custom version');
The following is from the "About this Application" window...
Oracle9i Enterprise Edition Release 9.2.0.2.0 - 64bit Production
Oracle Forms Generator 6.5.40.4.0
Headstart Template Package 6.5.1.0
Template Form (qmstpl65) 6.5.0.6
Object Library (qmsolb65) 6.5.1.4
Event Handler Library (qmsevh65) 6.5.1.5
Core Library (qmslib65) 6.5.1.12
CSLS Application Library (cslsapp65) 3.0
CSLS Business Rules Library (cslsbr65) 3.0
CSLS Common Routines Library (cslscom65) 3.0
Does that answer your question???
If this is not the version you are using, please tell me the Headstart patch number that includes the latest libraries and please tell me where I can get a copy of the latest OFGTEL pll so I can compare the code.
Thank you very much,
Michel
Similar Messages
-
Problem with Format Masks and Computations
(I did a quick search on this, but didn't notice another thread on the topic. If there is already one I apologize.)
We are using APEX version 2.2.1.00.04.
I had an editable item that had the 999G990D00 format mask. In a computation I used that item and another item (that didn't have a format mask) to calculate a third item. The item I was trying to compute would not populate. It really had me stumped, so I went so far as to completely delete the fields and re-construct everything. When I did so the computation worked. That is until I put the format mask on the item again. I removed the format mask and the computation now works.
Is this a known issue? Is it a bug? Am I doing something wrong?
Thanks, TonyTony,
As Patrick mentioned, all variables in Apex are strings. Whenever you do something with them that effectively requires something other than a string value the database does an implicit type conversion. This often works, but not in cases where the db doesn't know how to do the conversion. For example, if your default database date format is dd-mon-yyyy and you have a string 10/09/2007 the database won't have any idea how to convert it to a date. That same is true for number formats.
In your case, you used the number format mask in apex to convert a number to a string witht the given format. Apex does not do anything to convert it back to a number when you submit the page (unless you use the built in row processing). If you want to do anything with it as a number, you need to change it back with the to_number function. The second parameter is the format mask of the string you are passing in.
Hope this helps,
Anton -
Problem with format mask and currency
Hi,
I am trying to apply a format mask to a report column.
I want my format to be: 4500 ==> $4,500.00
I have tried to apply: FML999G999G999G999G990D00, and i get #4,500.00
Do i have to set a currency parameter somewhere for this format mask to work?
I have done a select * from nls_database_parameters:
NLS_LANGUAGE AMERICAN
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET US7ASCII
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
Thanks in advance,
ImmanuelImmanuel,
Here's what I believe is going on:
1) Your database character set is US7ASCII. US7ASCII cannot store a '£' character.
2) Although the real NLS_CURRENCY symbol for NLS_TERRITORY UNITED KINGDOM is '£', it's displaying a converted character of '#', due to the above reason.
3) The currency symbol from the format mask is determined by your NLS_TERRITORY (and hence, your NLS_CURRENCY) settings for the session.
4) Your application is most likely setup to run with an application primary language of English United Kingdom. Thus, your application will always set NLS_TERRITORY to UNITED KINGDOM.
To get your desired result, either:
1) Change your application primary language to en-us
or simpler yet
2) Hard-code the $ sign in your format mask.
Joel -
Number field - Format mask and validation
APEX 4.2.1
When a page item with source=DB column uses a Number type and a currency format mask (FML999G etc), when the page is rendered, it properly formats the number.
The built-in Item is numeric validation appears to be handle this reasonably ok. i.e. both formatted values and only-digits both validate ok.
But any after-submit validations choke on the non-numeric characters in the field! Please don't tell me I have to a) create shadow items and/or b) replace() out the non-numeric characters in the validation.
After so many years and versions, why doesn't APEX have a simple, declarative, elegant solution to handle such a basic function?
Am I missing something?
ThanksAs described in the item help
"Select or enter a format mask. Note that format mask is applicable only to items of source type Database Column."
In my experience, and this goes for the great web experience, not just the application you're designing - I've found the most data entry fields avoid formatting.
Relevant information is often shown item labels.
Any occasional the business has specifically asked for formatting, I've taken the same approach as I've needed to for years - before web development (and every time you use the to_date/to_char functions for date conversions) - validate the information as per expectation. If you think the user will be adding punctuation to a numeric field, then you must validate accordingly.
This usually means adding TO_CHAR(value_entered, expected_format_mask) to your validation control, instead of presuming APEX will read the user's mind and know the content of that numeric field may not be numeric.
Date entry does the same thing - ultimately there is a session date format that is implicitly used by Oracle to convert an entry of 12-10-2012 to the appropriate date -- ie, is it October or December?
Have a think about the various websites you visit personally - plane bookings, concerts, ebay, etc - how many expect entry to be purely numeric? My recollection is most, except maybe some credit card fields, but most use some sort of regular expression to sort that out. And you can tell the validation is coded respectively.
Generally, I reserve this sort of primping to reporting - even then it's made to be subtle - just like I'd prefer makeup to be ;-)
Most users just care about the data, not how it looks.
Scott
blog: [url grassroots-oracle.com]grassroots-oracle.com
twitter: [url twitter.com/swesley_perth]@swesley_perth
-- please mark any useful posts as helpful or correct, in the end it helps us all -
How to set Character field's Format Mask?
dear all,
how to set Character field's Format Mask?
i searched the forum and found the following, where can i use this code and how to change and set its format mask.
SRW.SET_FORMAT_MASK('mask');
Thanks
Muhammad NadeemNadeem,
If you have database 10g, look into function REGEXP_REPLACE. Otherwise you can also try this (you might already know).
SELECT SUBSTR('CHHOCMIPO07020001', 1,2)||'-'||SUBSTR('CHHOCMIPO07020001' ,3,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 5,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 7,3)||'-'||
SUBSTR('CHHOCMIPO07020001' , 10,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 12,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 14,4)
FROM dual
CH-HO-CM-IPO-07-02-0001
If you have to use this at many places, create a function, pass the raw value, manipulate the string and return.
FS -
Date Format Mask On Unbound Item
Hello everyone!
I have a module with some unbound items. One of them is date_completed. I gave the item datatype DATE and formatmask "DD-MM-RRRR". But in the application, when I type 290108, I get FRM-50026 "date must be entered like : DD-MM-YYYY.
But I gave the item a format mask!
Can somebody help me?But I gave the item a format mask!Then enter it in the format mask and not as a number
It is doing exactly what you are telling it to do
Nicolette -
Date format mask failure stops navigation
I'm trying to allow users to enter dates in multiple formats.
My date items already have format mask 'YYYY-MM-DD'.
I have added ON-ERROR code that handles errors like FRM-50003 so that users can enter '29-APR-2011' and the error handler fills the date item with '2011-04-29'.
However, when users enter '29-APR-2011', then tab out of the item, the format mask error stops navigation to the next item. The user needs to tab a second time to actually leave the item.
There are no FORM_TRIGGER_FAILURE exceptions in my code that would stop navigation to the next item.
How can I allow users to enter data in formats other than the one I've specified for my format mask, but not have to tab twice to exit the item?
I know that I can add a KEY-NEXT-ITEM trigger like the following. Unfortunately, I would have to re-write much existing code.
enter;
next-item;
I know that I could remove the format mask and let WHEN-VALIDATE-ITEM handle things. But then I have to add validation code to all my date items. I really just want to write one piece of code that is called from ON-ERROR so that I don't have to re-write all existing code.
Suggestions?
Thanks,
-Ken
Edited by: Ken Anderson on May 27, 2011 3:12 PMWith FORMS_USER_DATE_FORMAT you can specify different allowed input masks without having code in your form. Heres some more info Re: Date field in 10g Form
-
Formatting mask for marketing project
Sir ,
We have implemented SAP CRM 2007 (6.0) . Marketing Plan , element , Campaign Management & element id's are generated automatically by system .
But we have created Formatting mask and Campaign ID should not be generated automatically but End user will create Marketing & Campaign ID according to formatting mask .
Please guide how to stop automatic numbering and
iD will be created by user according to formating MASK . what settings i have to do ?
Regards,
Anupsir ,
campaign and marketing id's are generated automatically . i dont want to use auto numbering
now i have created formatting mask . i want to use formatting mask . so please guide me how can i use it .
that will replace existing numbering system.
Regards,
Anup -
Applying date and number format mask
I have specified a date format for an attribute and a number format for another attribute of an entity object using Entity Object Editor - Control hints for the attributes.
The date format is:
Format type: Simple Date
Format: dd.MM.yyyy
The number format is:
Format type: Currency
Format: 0,000.00 km
When using <c:out value="${bindings.MyDate}"></c:out> the format mask for the date is applied and it looks good, but when using
<c:forEach var="Row" items="...">
<c:out value="${Row.MyDate}"></c:out>
</c:forEach>
the format mask is not applied.
When it comes to the number format it is not applied no matter what I use.
I have tried setting the format for the view object attributes as well but the result is the same. How do I make this work?Can it have something to do with <html:form> ? Since it works using <c:out value="${bindings.MyDate}"></c:out> inside a html:form.
-
Problem Querying Oracle Forms Using a Date Field and a Format Mask
Hello,
We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
- The Oracle Database version we are running is Release 10.1.0.5.0.
- The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
Thanks,
KrisThere is no obvious reason that I can see.
Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem. -
Oracle Number and Java Format Mask Issue
I have a oracle number column, in my view object it is of type BigDecimal and the query column type is NUMBER
I put the following format mask in the hints section
#####.00
with a format type of Number,
Yet when I run the application, I always get the following error
java.lang.NumberFormatException: For input string: "-3750.00"
Anyone any ideas why this does not work?
Regards
OrlandoHi,
try with <af:convertNumber>
See:
http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_convertNumber.html
ADF 11.1.1.4.0 af:convertNumber not working with #,##,##,##,##,##,##0.00 -
How to mask and format an input field at the same time?
Dear Experts,
I need to have an input field, which has the following behavior:
1. The input field accepts only number, i.e. characters other than number are ignored (not displayed on the text field).
2. The number is automatically formatted to ###,###,### as the user enter the number.
Example as the user enter 1-2-3-4-5-6-7, the sequence of number displayed in the text field is:
1
12
123
1,234
12,345
123,456
1,234,567
I have done the following:
import java.awt.*;
import javax.swing.*;
import java.text.*;
import javax.swing.text.*;
class FormattedTFDemo {
NumberFormat cf;
JLabel jlab;
JFormattedTextField jftfSalary;
JFormattedTextField jftfEmpID;
JButton jbtnShow;
public FormattedTFDemo() {
JFrame jfrm = new JFrame("JFormattedTextField");
jfrm.getContentPane().setLayout(new FlowLayout());
jfrm.setSize(240, 270);
jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
try {
MaskFormatter mf = new MaskFormatter("###,###,###");
jftfEmpID = new JFormattedTextField(mf);
} catch (ParseException exc){
System.out.println("Invalid Format");
return;
jftfEmpID.setColumns(15);
cf = new DecimalFormat("###,###,###");
jftfSalary = new JFormattedTextField(cf);
jftfSalary.setColumns(15);
jftfSalary.setValue(new Integer(7000));
jfrm.getContentPane().add(new JLabel("First field"));
jfrm.getContentPane().add(jftfEmpID);
jfrm.getContentPane().add(new JLabel("Second field"));
jfrm.getContentPane().add(jftfSalary);
jfrm.setVisible(true);
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new FormattedTFDemo();
}The "First field" adopts no. 1 behavior, i.e. it does not allow any character other than numbers, but the "," are always displayed and the number displayed as I enter 1-2-3-4-5-6-7 are:
1 , ,
12 , ,
123, ,
123,4 ,
123,45 ,
123,456,
123,456,7
which is not according to behavior no. 2
The "Second field" displayed 1,234,567 only after the focus left the text field and not while typing. Moreover, characters other than number can still be displayed and only rejected after the focus left the text field.
I need a guide of what text field and what filter / format / mask I should use. Am I correct to use JFormattedTextField? Is the only way to accomplish this by using JTextField and create my own PlainDocument for the textfield, where
I rebuild the displayed output after each character is entered?
Thanks for any advice,
PatrickSo exactly what do you want the user to put in? and what do you want to see?
I need to have an input field, which has the following behavior:
1. The input field accepts only number, i.e. characters other than number are ignored (not displayed on the text field).
2. The number is automatically formatted to ###,###,### as the user enter the number.
Example as the user enter 1-2-3-4-5-6-7, the sequence of number displayed in the text field is:
1
12
123
1,234
12,345
123,456
1,234,567The user should type only numbers and when he types other than numbers, the field ignore it.
What I want to see, as the user, for example, types 1-2-3-4-5-t-6-7 is:
1
12
123
1,234
12,345
<beep / ignore> (because t is invalid)
123,456
1,234,567
Thus, I need a guide of what swing components should I use to accomplish this task. If you can give me the code, that will be perfect.
Hope you can advise me,
Patrick -
How can we find search criteria for Mask and Namedsearch
Hi Gurus,
I got a doubt while working with the concept of mask and namedsearch. I defined a search criteria and stored the result under a mask or namedsearch. After some time if i call the mask/namedsearch where can we see the search criteria. Can anybody make me clear about this.
Thanks
RaviHi Ravi,
You can see the search criteria for Named Search. Suppose you search for a field in free form search and then include all these records in your Named Search. Now in order to see the search criteria and enhance it. You need to go to>Menu bar>Search>Restore Named Search>Press Named Search(Name Given By you). Now you will able to see in free form search or any other search criteria which you included in for your Named Search.
Regards,
Mandeep Saini -
On my home wireless network, the iphone 5 won't let me enter the IP address, subnet mask and router info. I was able to enter the DNS and Search Domains. How do I open up those fields?
Apparently the router is not sending the info to the iphone. How can I make that happen?
-
DelimitedData and Date Format Mask
I am using desformat=DelimitedData to generate a Report with Version6.
Although the date Format Mask is DD-MON-RRRR the date in the report is 11-NOV-34. What can I do?
Thanks in advance
YvonneHi Pieter,
This does looks like a Bug. Please contact Oracle Support to assist you in getting the right patch or otherwise.
Regards
Oracle Reports Team.
Maybe you are looking for
-
I am using cs5 and in Bridge my action that I have used for 2 years all of the sudden says it is unavailable when I try to use the batch process function in Bridge. I have run updates, reset bridge and photoshop and shut the computer down. Please h
-
MSI GTX970 Gaming 4G VBIOS Request
Is there a newer VBIOS for my card? Serial number: 602-V316-03SB1409038171 I have attached the current BIOS. GM204.zip (136.14 kB - downloaded 8 times.)
-
I am not able to set high and low limits for each channel seperately using LabWindows/CVI
I am using AI_StartAcquisition and AI_ReadAcquisition functions to acquire data using PCI 6025E DAQ card and iam using Lab/Wuindows/CVi5.0 software. But one of my transducer has its range in +/- 500 mV soi need to set the high low limits of each chan
-
Dynamic swf loader issues...
Hey guys, Im working on a flash project that dynamically loads other flash videos into a 'holder' movie clip. This holder should never be larger than 500x330 however, some of the files it loads may be larger than that. At any time, there maybe 1-N fi
-
We are behind a corporate firewall and an authenticated proxy server and I suspect that is the cause of this issue, but the iCloud Control Panel will not startup. You click on the panel and nothing changes. Perhaps the control panel should use only