Oracle forms- Number formatting in post query

I have a column called num_value in a table.
When the user retrieves the data in post query I need the following formatting
For WBC if the value entered is 3 I want to show in the forms as 3.0 etc....
So I have a decode statement
Cursor C5 is select task_desc,decode(substr(task_desc,1,3),'WBC',to_char(num_value,'fm99.0'),
'RBC',to_char(num_value,'fm99.90'),
'HGB',to_char(num_value,'fm99.0'),
'HCT',to_char(num_value,'fm999.0'),
'PLT',num_value,num_value) as value,alpha_value
from qc_task_poch_results A,QC_TASKS B
where a.task_id = b.task_id
and a.procedure_id = 1127
and drive_id = 'DRV5528593'
Begin
Open C5;
Fetch C5 into :qc_task_results_poch.num_value
     ,:qc_task_results_poch.alpha_value;
Close C5;
End;
But I amm not getting the formatting.
The column in the form is non database .
When I run in toad, I get the right formatting.
TASK_DESC|VALUE|ALPHA_VALUE
WBC count|3.0|
RBC count|2.33|
HGB count|6.0|
HCT Count|17.0|
PLT count|56|
Any help is appreciated

You are formatting your data in your select statement not in Forms. Consequently, any format mask you may have on the Item where the data will be display will reformat your data to match the Item's format mask.
Do you have the format mask property defined on the Item? What is the data type of the item?
Craig...

Similar Messages

  • Portal Form: Number Format Mask Accepted Values

    Hi, i'm trying to format the way numbers are displayed in our forms, specifically instead of 50,000.00 we want 50,000 - without the .00.
    I cannot find anything on format masks in the portal documentation, and the standard oracle masks I have looked up such as "NNNN" etc don't seem to be supported.
    Trial and error has yielded a mask of : 99,999,999 which does get rid of the decimal, but introduces a problem where if the value is smaller than the mask it is shifted into the middle of the field (leading spaces are being added for every missing unit that is specified in the mask), but obviously if a smaller mask definition is used then larger numbers appear as ###### which is worse than the leading zero problem.
    Where in the documentation can I find the accepted forms of numerical number format masks for use in portal forms?
    Thanks..

    Let me know if you find a solution to this. I even asked my Oracle instructor and she couldn't tell me how to setup a date format mask. This is what she gave me which doesn't work, but I'm not saying I'm the quickest race car at the track. lol
    "Hi,
    Try the following format mask "("099")""-"099"-"0999. They have an example of this on page 7-12. I'm not sure if OTN may have a listing of any Forms format mask. Search under Forms Developer and see if you find anything.
    Take care,
    L"

  • Oracle 10g - Date format in SELECT query for CFOUTPUT

    Hello, everyone.
    The project that I am working on in the dev environment is connected to an Oracle 11g database, but the production side is Oracle 10g.
    I have a page that is erroring in production (but not development) when it gets to a date that it needs to display.
    A co-worker mentioned that, in 10g, if a date/time is being SELECTed, you have to put it in to_char(), so I did that.
    But it's still erroring, and I'm not getting an error message, so I'm assuming that I have an incorrect format for the date in the SELECT.
    What is the proper format for SELECTing a date/time when using to_char()?  Right now, I have SELECT to_char(create_date,'MM-DD-YYYY HH:MI') FROM tableA .  Is this not correct for CF to output?
    Thank you,
    ^_^

    Please see my original post ("I have a page erroring in production (but not in development) when it gets to a date that it needs to display.")  Sorry if it came across as vague.  It made sense, to me, when I typed it.  But, then, I'm usually typing fast just to get the question out there, when I'm in a hurry.
    Haven't done a CFDUMP, yet, as every time I make a change in development that needs to be tested in production, I have to notify my supervisor that there are files that need to be copied into production, which can sometimes take a while, so I try to do troubleshooting on dev side - it's a pain in the you-know-what, but that's the kind of environment I'm working in.
    As it turns out, changing the format in the SELECT to_char() did the trick.  If anyone else has this issue with Oracle 10g, I'm now using SELECT to_char(create_date,'YYYY/MM/DD HH:MI') FROM tableA, and now the CFOUTPUT is processing the whole page.  I guess the MM-DD-YYYY threw CF into a tizzy, breaking the process?
    Anyhoo, it's working, now.  Thank you, Dan and Adam, for your thoughts on this.
    ^_^

  • Oracle forms developer 6i linux installation query

    How do you install this theres about 20 folders with no visible install. The instructions are complete useless just pop in the cd and the installer will start ? do they have the right platfor firstly its a download of about 600 megs secondly its not an iso its a tar file that uncompresses to the folders if you burn it on cd it doesnt start auto install process.
    Does any1 know where the installer is kept help would be much appreciated because i have an assignment due in a couple of weeks which uses this and i cant even get it installed.
    Thankyou for any or all help
    v

    Welcome to the forums !
    This is an obsolete/deprecated release - you will have to open an SR with Support and request the media. They may or may not oblige.
    HTH
    Srini

  • Format mask 999D99 in Oracle Form issue

    I have a textbox in Oracle form, with format 999.99 => means that we can input 0.99 0r 100.00
    But now, I want to input only as 100 or 0.99, I don't want any .00 if i type 100.
    Just i want 100 as 100 and 100.1 as 100.1 and 100.11 as 100.11. I don't want 100 as 100.00
    i have tried format masks like 990D00 , 999.99, B999D99 , B990D00, 990D99, but all the formats is displays input 100 as 100.00, Please let me know which format mask will resolve my issue.

    In this case, it is allowing more than 2 decimal places. i want maximum of 2 decimals. i have used lowest as 0 and highest as 999.99

  • Post query giving error

    Declare
    cursor fin_ACNTs IS
    SELECT aCODE,dr,cr,seq
    FROM acnts
    where CCODE = :xH_ccode
    and Tcode = :XH_tCODE
    aND tNO = :xh_Tno
    order by seq;
    total_rows NUMBER;
    the above query will return 2 or 3 rows. for example,
    aCODE DR CR SEq
    P30737 1907.600 .000 B1
    P30737 .000 1907.600 B2
    I have 3 rows wise control fields on my form canvas
    r1c1 r1c2 r1c3 r1c4
    r2c1 r2c2 r2c3 r2c4
    r3c1 r3c2 r3c3 r3c4
    & I want to Store the above query result in Such way that
    the 1st row returned should be saved in r1c1 r1c2 r1c3 r1c4
    and the 2nd row returned in r2c1 r2c2 r2c3 r2c4
    if the query returns 2 rows
    i tried to incorporate it in thiS way, but needs SOme help;
    declare
    cursor fin_ACNTs IS
    SELECT aCODE,dr,cr,seq
    FROM acnts
    where CCODE = :xH_ccode
    and Tcode = :XH_tCODE
    aND tNO = :xh_Tno
    order by seq;
    total_rows NUMBER;
    begin
    FOR i IN fin_ACNTs LOOP
    :ctrl.Rc1 := i.aCODE;
    :ctrl.R[i]C2 := i.dr;
    :ctrl.R[i]C3 := i.cr;
    :ctrl.R[i]C4 := i.seq;
    num_total_rows := fin_ACNTs%ROWCOUNT;
    END LOOP;
    end;
    while compling the trigger am getting the errors;
    Error 49 line 15 column 5
    Bad bind var :ctrl.R
    Error 103 line 15 column 5
    Encountered th symbol "[" when expecting one of the following
    := . ( @ % ; indicator

    TYVM, Mr. Kuba,
    those 4 rows r1c1....did get filled properly. I have now 1 more problem. about this form so,
    I have a columnar tables
    inventotry_header (Inv_head) and
    inventory_detail (Inv_detail)
    in post-database-commit i am saving some details in to a 3rd table, ACNTS
    Inv_head is linked to inv_detail thru primary-foreign key, table ACNTS is independant.
    i have joined inv_head==>ACNTs in forms.
    i wrote this post-query Suggested by you. i want to display ONLY the control fields r1c1.....
    derived from the acnts table in post query and keep acnts table fields hidden.
    the acnts table should just be saved in the background(in post-database-commit) and
    its values will be displayed on form thru the control fields.
    but when i make the visible property of the acnts table fields to "NO", the post query result does not display
    the control fields r1c1.... and on querying, at first record it gives error,
    FRM-40106 No navigable items in destinations block
    and why i dont want to use the acnts tables for display, because i want to assign & display the control fields
    as i enter the details in inv_head and inv_detail, in the sequence of r1c1 r1c2 r1c3 r1c4....
    which i dont think will be possible with acnts tables (which is a linked actual db table).
    hope i have made it clear.

  • Speed Oracle forms (web based) versus client server

    2 years ago we've tested forms 9i
    Everything went very smoothly:
    We had no problems in converting our old forms to 9i.
    We've installed a new database on a new server and we've installed a application server on a second server (Both servers had 2 CPU's and 2GB of memory).
    In short everything worked perfectly ... except the speed.
    Oracle forms (web based) are a lot slower than client-server forms on a LAN, so we kept developing client-server.
    We just use forms on our own local network (100Mbit) but
    we use a lot of triggers in our forms (perhaps the reason for the poor performance?)
    Has anything changed?
    Is it now possible to use web based forms, that are at leased as fast as client server forms?

    OK, I agree: changing the form (more views, less post-query, more pl/sql on database) will improve performance.
    But then I have to recreate every form (> 1000), so then converting c/s to web is not just recompile.
    We don't use images in our forms, the database is connected to the application server with a gigabit line. We did tests when even the client was on gigabit, but c/s remains faster. We did the test with just 1 client. and we have never experienced a bottleneck on the network using c/s (even with post-query on millions of records)
    So 1 database (2 Xeon CPU's 2GB RAM), 1 App server (2 XEON CPU's, 2GB RAM) and 1 client (XEON workstation, 512MB RAM) using web forms on a gigabit network is slower than the same client using forms (c/s) without an appl. server. => A lot more hardware for less performance?
    In short my question: is the latest version of forms faster than the previous version?
    Can webforms have the same performance as client server?

  • Problem in concurrent update in ADF BC (compare to oracle forms)

    Hi,
    I am using JDeveloper 10.1.3.3.
    I created a simple form on EMP table using JSF/ADF BC template and then I browsed the EMP form with 2 separate browsers.
    Both browser were on the same record (for example SMITH record). I changed the value of salary in one browser and commit the change. Then, in the second browser I changed the value of salary to something else and commit. As I expected I got JBO-25014: RowInconsistentException. (a similar error was shown when we used Oracle Forms and updated one record from 2 separate sessions).
    I pressed the commit button for the second time and surprisingly enough,the changes committed successfully !!!
    In oracle Forms you had to re-query to be able to change when an error like this happened and normally it should be the same in ADF BC. The strange part is that the framework detects that the record has been changed and prevents committing operation but just for one time!!!
    I tried locking mode to both optimistic and pessimistic but there was no difference.
    Is it any way to achieve the same functionality we had in oracle forms in the past?
    Any help would be highly appreciated.
    Thanks in advance,
    Navid

    Hi,
    I think this can be explained the best with the fact that the web is stateless. If you mark a record for update, which you do when you submit it. Then it should get locked in the database. After commit you release the lock and whoever wants to override the value you put in can do this. I don't think that a lock should be released only if a user re-queries the data. You can code this in though: just requery the records on error
    Frank

  • Migrating VB Applications on SQL Server to Oracle Forms on Oracle 10g RAC

    Hello All,
    I am looking at migrating a VB application built on a SQL Server database across to an Oracle Forms deployment with the data migrated to an Oracle 10g RAC database environment.
    My first question is whether the SQL Developer Migration Workbench can migrate the SQL Server data to a RAC environment?
    The second question is to ask whether there are any "toolkits" or tips from the community migrating VB applications to Oracle Forms.
    Any advise or suggestions greatly accepted.
    Kind Regards,
    Gary.

    SQL Developer Migration Workbench definitely can migrate SQL Server data to Oracle RAC setup.
    However, I don't think VB application can be easily converted to Oracle Forms.
    You can post your question in Oracle Form forum to double check.

  • Want to Read BLOB data and display on Oracle form

    Hi All,
    I have a table with a BLOB field and there is blob data saved here against a account id.
    I want to display the blob data on the oracle forms front end for the queried account id
    Any one to help me out how to read and display blob data in Oracle and display the same
    Tks

    this is a commoon request please try to search the forum.

  • Is there an Oracle Forms Post-Query trigger equivalent

    Hi.
    Jdeveloper 11.1.1.2
    Is there a way in ADF to populate extra read-only text-columns in an af:table (based on a ViewObject) as was possible in Oracle Forms with a Post-Query-Trigger:
    Post-Query
    Perform an action after fetching a record, such as looking up values in other tables based on a value in the current record.
    Fires once for each record fetched into the block.
    Best regards
    Erik

    Erik wrote:
    Hi.
    Jdeveloper 11.1.1.2
    Is there a way in ADF to populate extra read-only text-columns in an af:table (based on a ViewObject) as was possible in Oracle Forms with a Post-Query-Trigger:
    Post-Query
    Perform an action after fetching a record, such as looking up values in other tables based on a value in the current record.
    Fires once for each record fetched into the block.
    Best regards
    ErikHi,
    http://docs.oracle.com/cd/E15523_01/web.1111/b31974/appendix_formstriggers.htm#sm0350

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

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

  • Post query trigger problem in master detail oracle forms

    Hello experts,
                        I am new in oracle forms n using Fission middleware 10g with oracle forms 11g at windows 7 platform.
    I have made a master detail form using a tab canvas.There is a database column STUDENTID and it is in my student tab with a TBL_STUDENTENTRY data block.Now I Have an another tab named previous_education with TBL_STUDENT_PREVIOU_EDU datablock here there is also a database column STUDENTID and corresponding field in my  previous_education TAB under TBL_STUDENT_PREVIOU_EDU  datablock.Now i want to add a display item to show  student name corresponding to STUDENTID.For this I have tried to make a select query in TBL_STUDENT_PREVIOU_EDU data block POPST_QUERY TRIGGER.
    begin
    select STUDENTNAME into :TBL_STUDENT_PREVIOU_EDU.STD_NM   from TBL_STUDENTENTRY where STUDENTID=:TBL_STUDENTENTRY.STUDENTID;
    end;
    But, This trigger is not fired at runtime,Please suggest me what is going wrong and give me the solution.
    Thank You
    AADITYA.

    http://www.club-oracle.com/forums/post_query-problem-in-oracle-forms-t9751/#post23794 ,  This is the link at where  I have tried to show my problem with the help of an image,Please get the link:
    thanx
    regards Aaditya.

  • Question on Dynamic Query Data Source and Form Folders in Oracle Forms 6i

    Hi there -
    I have one interesting requirement in Oracle Forms.
    This is what I wanted to do.
    1. Have a LOV and Go button on Form.
    2. From LOV, I will select a pre-defined custom table and click Go.
    3. Based on the selected custom table, I have to populate the Block (Tabular Format).
    4. User should be able to do update, delete, insert on this block.
    5. User should be able to use the Oracle Form folders functionality (select only necessary column and save views etc. Std folder functionality).
    6. If user selects a different custom table name in the LOV on top, I need to refresh the data from the block based on this new table. Remaining functionality should be as it is (steps 3 to 5).
    You can see here, I am going to have dynamic query data source (Table Name as well as column mapping) on the block. I do not know before hand how many columns the user selected table has!
    This is what I have planned for this so far but I have some major questions before I can move on with this design:
    1. I am going to create a table structure with fixed number of column in form (40 cols assuming that the custom table will not have more that 40 cols). (Kind of limitation but it's okay as of now).
    2. Dynamically populate the block based on the table name selected by the user from LOV. Dynamically change the table column names based on the table selected etc.
    3. Perform insert, update, delete using PL/SQL package.
    So far it looks okay.
    Now my real question is,
    Can user still be able to user "Folders" functionality here? I have never done this kind of development before and I doubt the dynamic column naming, dynamic column data source will really work for "folders"!
    Also, I am not really sure whether user will be able to save these "folder" queries?
    Okay so form experts, can you ppl suggest me if this is really going to work? Are there any better ways to do this?
    Initially I tried to do this in OA Framework but I got stuck at because as per OAF developer guide "I cannot user OAF personalization for dynamic items, regions etc".
    For more info on that thread see this link...
    Re: setUserCustomizable issue!
    Thanks in advance for the help.

    Any suggestion anyone?

  • Master-Detail Form - implementing some thing like Post-Query trigger

    Hi all,
    I am struggling to implement an eqivalent of a post-query trigger in Oracle Forms. Please bear with me as I am trying to explain in detail what the problem is.
    Here is my situation.
    I have three tables EMP, DEPT and LOCATION. I created a Master/Table pages on EMP and DEPT.
    Basic relationships.
    Each LOCATION has one or more DEPTs; Each DEPT is at one and only one LOCATION.
    Each DEPT has one ore more EMPs; Each EMP is assigned to only and only DEPT.
    Not getting too complicated, here are the table layouts:
    LOCATION:
    ID number(10,0) not null,
    NAME varchar2(20) not null
    DEPT
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    LOC_ID number (10,0) not null foreign key from LOCATION
    EMP
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    DEPT_ID number (10,0) not null foreign key from DEPT
    Assume I have all the constraints, BIU triggers, sequences defined properly.
    I am using the APEX page wizard to create a Master/Detail Form on DEPT and EMP. The first page is the Master Report on DEPT. I want to display the Location Name on this page also. Because the Master Report allows
    you to change the query, I was able to add the Location Name as part of the
    query. This was very simple.
    Select a.name "Department_Name",
    b.name "Location"
    from dept a, location b
    where a.loc_id = b.id
    Moving on, In the Master Detail Form, I would like to get the Location Name as part of the first Region (Dept Region).
    In this region, I would like to include the Location Name also. So my first region on the Master Detail form includes:
    Dept Id: ________
    Dept Name: _______
    Location Name: __________
    As Region are automatically populated using using a Fetch Row from EMP table (Automated Row Fetch) on an After Header process point, I don't have a way of including the Location as part of query. So I created a Region level Item called Location Name, made it Display only.
    In the old SQL*Forms, or Oracle Forms days, I used to use a Post-Query trigger, or Post-Change trigger to fire on the Loc_Id column to populate the Location Name. Simple fetch like:
    Select name
    into :P80_location_name
    from location
    where loc_id = :P80_loc_id
    However, I am struggling to implement some thing simple like this in APEX. Tried creating a processes, computatations etc, but nothing is working.
    I have seen some previous responses to fetching values from a foreign table
    using a button or AJAX script, but this should be very basic. What am I
    missing here?
    Appreciate any insights.
    Thanks.
    John

    Hi John,
    I'm not too familiar with the post-query triggers in Oracle Forms, but the use of a List of Values (LOV) on your LOCATION table might do the trick for you. If you create a dynamic LOV based on your LOCATIONS table, it can then be referenced by the LOC_ID item on the Master-Detail page, to display the Location Name. You could try doing the following:
    1. Create a new dynamic LOV, LOCATIONS, using a query similar to the following:
    select Name d, ID r
    from LOCATION
    order by 1
    2. Edit the "Create" button on the Master report page, and in the "Optional URL Redirect" section set "Request" to CREATE. Click Apply Changes, to save the setting.
    3. Edit the LOC_ID item on your Master-Detail page, and set the following:
    * in the "Name" region change the "Display As" setting to Select List
    * in the "Label" region change the Label to Location Name.
    * in the "List of Values" region set the "Named LOV" to LOCATIONS
    * in the "Read Only" section, set the condition to Request != Expression 1, and set Expression 1 to CREATE.
    Click Apply Changes to save the settings.
    When you run the pages now, the Location Name field will appear as Read-Only when editing a selected Master row. The item will appear as a Select List when the user clicks "Create" on the Master page, to create a new Master row.
    I hope this helps.
    Regards,
    Hilary

Maybe you are looking for

  • Oracle not using its own explain plan

    When I run a simple select query on an indexed column on a large (30 million records) table oracle creates a plan using the indexed column and at a cost of 4. However, what it actually does is do a table scan (I can see this in the 'Long Operations'

  • Red border around bottom of audio clip?

    I added an .aif audio clip to a PR timeline (from a tutorial DVD). When I click on the clip, a thin red border appears across the bottom and left and right sides of the clip: There were some clicks in the audio. So I rendered it as a .wav file but th

  • Field in a Query

    Hi All, This is in BI 7.0 We have output in the Cube like Calday             No of Trans   Time Spnt (Minutes) 1.1.2009               1                  20 1.1.2009               2                  40 1.1.2009               3                  90 1.2.

  • Getting message : The result set for this selection was empty on sm20

    Hi,    I assigned below parameters in rz10 : rsau/user_selection                                 1 rsau/max_diskspace/per_day                  1950M rsau/max_diskspace/per_file                 650M rsau/enable                                         

  • Terminal command hdiutil convert. Where is output file?

    Sorry all, I put this in the wrong forum... going to unix forum I'm trying to use terminal to convert an ISO file to an IMG file. The conversion appears to run but I cannot find the output file. The command I'm using is; hdiutil convert -format UDRW