Apply a format mask in OA Personalisation

Hi,
Can anyone tell me if it's possible to apply a format mask to a number field using OA Personalisation? I'd like to change the format mask of the amount fields on the Purchasing Requisitions page.
Thanks in advance for your help.

Hi,
Which type of format mask you want you didn't specfy, please refer Topic Numbers/Currency in JDev guide.
Please check if this programming unit helps.
public String roundOffToTwoDigit(String number)
DecimalFormat formatter= new DecimalFormat("###.##");
double numberD = Double.parseDouble(number);
return formatter.format(numberD);
public double roundOffToTwoDigit(double number)
try
DecimalFormat formatter= new DecimalFormat("#.00");
formatter.setMaximumFractionDigits(2);
formatter.setMinimumFractionDigits(2);
return new Double(formatter.format(number)).doubleValue();
catch(java.lang.NumberFormatException e)
e.printStackTrace();
return 0.0;
Regards,
Reetesh Sharma

Similar Messages

  • 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,
    Immanuel

    Immanuel,
    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

  • JQuery format mask for date columns in tabular form

    Hi,
    How can I apply jQuery format mask for date columns in a tabular form?
    Thanks.
    Andy

    OK, I realized I didn't choose the default type as "Pl/SQL Expression", now it's working correctly.
    Thank you very much!

  • Number format mask of text item is not applied

    Hello all,
    I want to format a number like 999G999G999G999G990D00
    Is specify the format mask under source of the item. But it is not applied and I don't understand why.
    See http://apex.oracle.com/pls/otn/f?p=53873:2 for example
    Btw. is it possible to set the format for all numbers in the application at once? I want to have a thousand separator in most cases.
    Message was edited by:
    Jacob_B

    Hello Jacob,
    Btw. is it possible to set the format for all numbers
    in the application at once? I want to have a thousand
    separator in most cases.I am using substitution strings for things like that. You can define some "global" substitution strings on page application definition.
    So you just have to put in the format (999G999G999G999G990D00 ) in there once and give it a name. Let's say NUMBER_THOUSAND.
    Afterwards you can reference it wherever you need the format e.g. this way:
    to_char(10000,'&NUMBER_THOUSAND.').
    This way you just have one place where to change the format model.
    Regards,
    Tine

  • 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.

  • Using a datepicker with format mask MM/YYYY gives error on submit

    I'm trying to use a datepicker with the format MM/YYYY.
    The item is linked to a database column of type DATE.
    The items displays correctly (month and year), but when submitting the page, I get an "ORA-01843: not a valid month" error from the built-in DML process.
    Shouldn't Apex apply the same date format mask to the item value when trying to save it to the database?
    - Morten
    http://ora-00001.blogspot.com

    Hi Mike,
    I can/need to do that for my own PL/SQL processes, but the problem is with the Built-In DML Process....
    - Morten
    http://ora-00001.blogspot.com

  • 4.2 blob download format mask not working

    I am using Apex 4.2
    I have been working through the book Beginning Oracle Application Express 4. In chapter 6 the a blob is added to a report.
    I have pasted the code example into the report definition (albeit with my own page numbers) :
    SELECT
       "TICKET_DETAILS"."TICKET_DETAILS_ID" "TICKET_DETAILS_ID",
       "TICKET_DETAILS"."TICKET_ID" "TICKET_ID",
       "TICKET_DETAILS"."DETAILS" "DETAILS",
       "TICKET_DETAILS"."CREATED_ON" "CREATED_ON",
       "TICKET_DETAILS"."CREATED_BY" "CREATED_BY",
       dbms_lob.getlength("ATTACHMENT") ATTACHMENT
    FROM
       "TICKET_DETAILS"
    WHERE (("TICKET_DETAILS"."TICKET_ID" = :P5_TICKET_ID))
    I go to the report attributes and click on the attachment column.  I enter the suggested format mask
    DOWNLOAD:TICKET_DETAILS:ATTACHMENT:TICKET_DETAILS_ID::MIME_TYPE:FILE_NAME:::inline:Download.
    When I press apply I keep getting :
    1 error has occurred
    "" not found. (Go to error)
    I have confirmed that the query runs and that P5_TICKET_ID does exist on page 5.
    Not understanding what this meant I tracked down this page
    17.10 About BLOB Support in Forms and Reports
    and the section "Providing a Download Link" seems to confirm that the above format mask is correct.
    Any pointers would be greatly appreciated.

    I've also done the exercises in the book and it worked for me.
    Your format mask is correct. But before pressing submit you also have to enter the blob column attributes:
    *Format Mask (Value Required):                   DOWNLOAD
    *Blob Table (Value Required):                       TICKET_DETAILS
    *Blob Column (Value Required):                   ATTACHMENT
    *Primary Key Column 1 (Value Required):     TICKET_DETAILS_ID
    Primary Key Column 2:
    Mimetype Column:                                      MIME_TYPE
    Filename Column:                                       FILE_NAME
    Last Updated Column
    Character Set Column:
    Content Disposition:                                    ATTACHMENT
    Download Text:                                           Download
    Maybe you forgot that?

  • Page Item / Source / Format Mask  -  Table Column Numeric

    Form page to maintain a table row, the item is for a numeric column. Selected/Entered the format mask "999G999G999G999G990D00" for the Page Item / Source. I was under the impression that this would result in the page item being formatted with the mask when navigating out of the item. I can enter non-numeric values and navigate out with no error being raised/reported ... is this expected behaviour?
    Thanks

    APEX was touted at being a MS Access application killer and a RAD tool. If the user is presented with having to understand the complexities of session state variables, page item variables, etc. then a lot of developers/users will be switched off. APEX was supposed to appeal to the masses as the pipes and plumbing coding behind having a web application front end on an Oracle database backend was being hidden. The converse seems to apply when implementing functionality like a format mask being applied both on entry and display of several page items. So I may be able to implement the required format validation using Javascript but if I have to apply this functionality to more than one page item in now way does APEX lend itself to RAD, e.g. In Oracle Forms you could select multiple Block/Items and then change a property to apply to all the selected items.

  • Download Formatting Mask for BLOB column

    Hi All,
    IR Query : select "ROWID","FILE_NAME",dbms_lob.getlength("DATA_FILE") "DATA_FILE",
    "DOC_SIZE",PROPOSAL_OWNER
    from "#OWNER#"."APXTER_IMP_HDR"
    I am using BLOB Download Format Mask on FILE_NAME column
    using the following FORMATTING
    DOWNLOAD:APXTER_IMP_HDR:DATA_FILE:ROWID::::::attachment:Download
    After applying the changes, I counter the error
    The number of display columns in the report reached the limit. Please click Select Columns under Actions menu to minimize the report display column list.
    Thanks,
    Sombit

    Hello,
    Here you can find a tutorial about blob:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    I have a demo here - it shows how to display an image in case the file is image. Otherwise, it displays download link:
    http://apex.oracle.com/pls/apex/f?p=63066:1
    workspace: somefeto
    user: test
    pwd: test
    Application 63066
    Also, there is a packaged application : Sample File Upload and Download that shows you, how to do it.....
    you can find it on your workspace.. or here if you wish:
    http://apex.oracle.com/pls/apex/f?p=10540:3:15582111009947::NO
    workspace: somefeto
    user: test
    pwd: test
    Regards,
    Fateh
    If you believe that my answer was helpful to you or correct, then please mark the answer as helpful or correct ...

  • Currency Format Mask

    I want to make some number field have thier own currency format mask.
    I wrote in controller like followed.
    OAMessageTextInputBean salary =
    (OAMessageTextInputBean)webBean.findChildRecursive("Salary");
    if (salary != null) {
    salary .setAttributeValue(OAWebBeanConstants.CURRENCY_CODE, new OADataBoundValueViewObject(salary , "Curr"));
    I have two development instance.
    One is works fine "10,000.00".
    But the other is display "10000.00"
    I can't understand this situation.

    Thank you for your reply.
    But I already read that article.
    I tried to use OADecimalValidater. but it works on table column.
    I want to use the total column like the last of that article.
    When i use like following ...
    oracle.cabo.ui.validate.Formatter formatter = new OADecimalValidater ("###0.###;-###0.###","#,##0.###;-#,##0.###");
    Bean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    It applied the column in table. I works fine. (10,000.00). but the total column is not appled (10000).
    When i use like follwing ...
    salary.setAttributeValue(OAWebBeanConstants.CURRENCY_CODE, new OADataBoundValueViewObject(salary , "Curr"));
    The column in table and total column are displayed (10000.00).
    It applied both.
    I think the second is better. but it has some error.
    So, I want to find how to use the second without error.
    I have two development instance.
    One is works fine "10,000.00".
    But the other is display "10000.00"
    -.-

  • How to remove a number format mask ?

    I have to import some data form excel sheet. but the number in that sheet have been saveed as the following format mask 1,000.000(2,000.000,1,5000,00) as charchter
    but in may table that field is a number, so how can remove the format mask from the excelsheet?
    Thanks

    846640 wrote:
    I have to import some data form excel sheet. but the number in that sheet have been saveed as the following format mask 1,000.000(2,000.000,1,5000,00) as charchterI am wonder how to apply format mask in excel for the character cell.
    but in may table that field is a number, so how can remove the format mask from the excelsheet?So, while reading from excel how the values is coming in the variable i assume its coming with comma(,) than what happens if you try like below?
    variable_name:=TO_NUMBER(REPLACE(variable_name,',',''));
    -Ammad

  • Need Format masks which can be added to oracle form fields

    Hi All,
    I needed a list of all the format masks present for Oracle Forms fields. The problrm that i face currently that when I apply masking (999g999g999d99) the values in the text item field on the form side are no more left justified but shift towards the center of the field. PLease help me out.
    Thanks,
    Gaurav

    Hi Gaurav,
    You are on the wrong forum. Post your question on the Forms forum.
    Regards,
    Andrei

  • How do I apply conditional formatting using SharePoint Designer 2013?

    I'm attempting to apply Conditional Formatting to a list view web part via SharePoint Designer 2013, and I can't seem to find the option to do so.
    I've a horrible feeling I'm just being daft, but here's what I've done so far:
    - Created a new page (I've tried both web part and wiki)
    - Added a list "App part" and saved the page
    - Checked-out and opened the page via Designer
    - Clicked the "Edit file" option
    - Selected the XsltListViewWebPart tag
    So far I can't find any options to add it. If I open the Conditional Formatting pane via the View menu it tells me the following:
    > To use conditional formatting, select an HTML tag, data value, or
    > range of text, and then click Create to specify formatting options.
    I've tried selecting the web part tags in all manner of combinations with no luck. In previous version I would have simply selected the previewed data rows in the now-absent Preview pane.
    Am I missing something?

    Create and edit a Wiki Page
    Click Inset > Data View and Select “Empty Data View”
    Click Inside the <DataSources> tags </DataSources>
    Click Insert > Data Source “Your Data Source Name”
    Hold down Ctrl button and select the Rows in the order you want them to appear from your “Data Source Details” Window.
    After the Rows are selected click on the drop down “Insert Selected Fields as…” at the top of the “Data Source Details” Window. 
    Select “Multiple Item View” option (This will create the xsl where we need to add the conditional formatting to)
    Find the <tr> tag that contains the Row Data.  Insert the following right below the <tr> tag:
    <xsl:attribute name="style">
    <xsl:if test="@FieldName = 'Something'">background-color: #FF0000;</xsl:if>
    </xsl:attribute>
    I hope this helps.  I figured this out by using the old 2010 Designer to figure out the where to place the code and how to do this.

  • How to apply text formatting immediately?

    Hello!
    I apply text formatting to the empty newly created text flow. It seems to be strange that the formatting is not applied immediately, but when I start editing.
    The small sample demonstrates the problem.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml"layout="
    vertical"creationComplete="onCreationComplete()"
    >
    <mx:Script>
    <![CDATA[
    import flashx.textLayout.events.FlowOperationEvent; 
    import flashx.textLayout.formats.ITextLayoutFormat; 
    import flash.text.engine.RenderingMode; 
    import flash.text.engine.FontLookup; 
    import flashx.textLayout.formats.TextLayoutFormat; 
    import mx.controls.SWFLoader; 
    import flashx.textLayout.edit.EditManager; 
    import flashx.textLayout.container.ContainerController; 
    import flashx.textLayout.elements.TextFlow; 
    private var textFlow:TextFlow; 
    private function onCreationComplete():void { 
    var container:Sprite = new Sprite();canvas.rawChildren.addChild(container);
    var containerController:ContainerController = new ContainerController(container, canvas.width, canvas.height);textFlow=
    new TextFlow();textFlow.flowComposer.addController(containerController);
    textFlow.interactionManager=
    new EditManager();textFlow.flowComposer.updateAllControllers();
    private function onClick():void { 
    var charFormat:TextLayoutFormat = new TextLayoutFormat(); 
    var containerFormat:TextLayoutFormat = new TextLayoutFormat(); 
    var paragraphFormat:TextLayoutFormat = new TextLayoutFormat();charFormat.fontSize=36;
    textFlow.interactionManager.selectAll();
    (textFlow.interactionManager
    as EditManager).applyFormat(charFormat, paragraphFormat, containerFormat);textFlow.interactionManager.refreshSelection();
    textFlow.flowComposer.updateAllControllers();
    ]]>
    </mx:Script>
    <mx:Canvas id="canvas"width="
    200"height="
    200" borderStyle="solid"/>
    <mx:Button id="button"label="
    Push me"click="onClick()"
    />
    </mx:Application>
    When you click the button new font size is set. But the cursor in text field is not changed to a bigger one until I start editing. Also if to look at the textFlow internals in debugger you can see that new font size is not set...
    How can I force this?
    Kind Regards

    This is arguably a bug with a few things conspiring to cause the problem.  The general idea is that each paragraph ends with a paragraph terminator and the final terminator isn't selectable - that seems to be the core of the problem.  The other conspirator is that with a point selection character level format changes aren't applied until the next character is entered.  So with an empty document you always have a point selection. I could see character level format changes applying instantly to empty paragraphs.  I'll file a bug for more investigation.
    As for workarounds - well there's always direction model calls - just set the format directly on the span.  Another possibility would be to detected exactly this case and insert a character and then undo it.
    Note in your sample code the refreshSelection and updateAllControllers calls after applyFormat are redundant and can be safely removed.  Also any of the formats passed to applyFormat can be null.
    Hope that helps,
    Richard

  • Problem with date format mask 'D'

    I am experiencing an extremely thorny problem with the date format mask ‘D’. I am trying to use it to check whether today is a Monday. The variable v_temp_day is set to sysdate. For the last 4 weeks the code has behaved erratically – giving a different result at 02:00 than at 10:30 even though it is only taking account of the date. In desperation I inserted a debug statement formatting the date in a variety of ways – with interesting results. Oracle is somehow managing to tell us that today is simultaneously Monday and Tuesday depending on which format mask you choose. Anyone got any thoughts or suggestions?
    PROC_ID TO_CHAR(STAMP_TIM
    EVENT_SQLERRM
    RRHKP010 17092007 02:00:00
    TO_NUMBER( TO_CHAR( v_temp_day, D ) ) = 2. TO_CHAR( v_temp_day, D ) = 2. TO_CHAR( v_temp_day, DY ) = MON. TO_CHAR( v_temp_day, DAY )
    = MONDAY . TO_CHAR( v_temp_day, Day DD-MON-YYYY HH24MISS ) = Monday 17-SEP-2007 020000. TO_CHAR( v_temp_day, D ) = 2.
    SQL> select to_char( sysdate, 'D' ) from dual ;
    T
    1

    My book says the trunc(d,'iw') will return "same day of the week as Jan 1st of that year"It's bad book.
    Please read about [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96540/functions176a.htm#80159]TRUNC & 'IW' Format Model and [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96529/ch3.htm#50331]Database Globalization Support Guide: First Calendar Week of the Year in the manual.

Maybe you are looking for

  • What is 'Spotlight' in iPhone 4?

    What does it does Spotlight do, what is it for and how can I get best usage out of it, etc.? Thanks! Anna

  • Jdbc-OCI:112020 Error with SQL Developer 4.0.0.12

    Hi, I receive an error, Incompatible version of libocijdbc[Jdbc:112030, Jdbc-OCI:112020, when attempting to log into an existing connection with SQL Developer 4.0.0.12.  I do have the JDK 7u45 for 32 bit Windows 7.  I know this was an issue in the pa

  • Enhancment of datasource related query

    Hi BW Guru's I have datasource which having 100 fields and enhanced the same with few more new fields.But i required 60 of the existing as well new fields in BW.How would i select those fields in the datasource and get it the same in to BW. Please so

  • Practical maximum size limit of imported XSD files

    Can anybody tell me if there is a kind of upper limit on the size of XSD files that can be imported into XI and used without problems? I have seen a comment before that states XI will 'choke' on large XSD files, and that enumerations were recommended

  • Tomcat Error Msg (Failing to restart)

    [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080 [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8082 [INFO] Catalina - -Initialization processed in 2987 ms [INFO] StandardService - -Starting service Catalina [INFO] St