Graph using static lov
I am using a static lov which has a code and description. I select an entry from this lov and it's code is stored in a table.
I now want to create a chart on the contents of this table, but need to translate the code stored in the table to the description stored in the static lov.
Is it possible to do this? If so, any hints!?
Toby
So you have a table with a code value in it. The description of the code value is in a static LOV item. I would suggest creating a table in the database with the code and description. Then use a dynamic LOV instead of the static LOV and of course for completeness sake create a foreign key from the table you currently have to your new LOV table.
Now to get the description of a code, you just do a SELECT on your code/description table. This would be helpful for a chart title maybe?
Your LOV item on your page will visually display the description, but when referenced it will have the value of the code. So have your SELECT statement in your chart reference your LOV in its WHERE clause.
Mike
Similar Messages
-
Bug Report: Static LOV's and PDF Printing with Tabular Forms
I have a tabular form, which acts as an editable report. Some columns are 'Standard Report Column' and some are Select Lists, using Static LOV's with the contents of
Yes;Y,No;NThe purpose of the page is to allow users to edit yes/no attributes of a row. Then, they can print the report.
To make the current sort of the report reflect what is being printed to PDF, I've used a Report Layout associated with the report region, as oposed to a report query. A report query in this case would not reflect the sort of the report (all columns are sortable asc/desc).
Anyway, I link my report with the layout created, and go to run it. I get this message.
ORA-06550: line 1, column 50: PLS-00103: Encountered the symbol "," when expecting one of the following: := . ( @ % ; The symbol ":= was inserted before "," to continue.
Error ERR-1000 Unable to determine LOV from "declare function x return varchar2 is begin Yes;Y,No;N return null; end; begin wwv_flow_utilities.g_query := x; end;".
OK
report error:
ORA-20001: Error fetching column value: ORA-01403: no data foundI'm guessing the product is trying to take my static LOV and place it in a function to be able to generate which value is being displayed as text, from the select lists. However, it doesn't work.
I've been able to get around it - by adding a YES_NO domain to my domain_codes table (a table which associates abreviations with full meanings), I can set by select lists to be query based select lists using the SQL select code_meaning, code from domain_codes where domain = 'YES_NO_CODE'. This still allows the user to dropdown Yes/No fields, and the PDF printing doesn't break.
It is just me, or can't the PDF printing handle static LOV's in tabular forms/reports?Hi Patrick.
I've tried STATIC:Yes;Y,No;Nwhile stating it is a Select List (static LOV). The values that are rendered on the page are
[STATIC:Yes]
[No ]
----------I tried the same thing with STATIC2 instead of STATIC, and the same thing happened.
It also broke if I tried STATIC or STATIC2 under Select List (query based LOV). This is within a report where there is no hyperlink to say 'Create/Edit static list' or 'Create Dynamic List', as there is under select list items.
However, I am finding that for some reason, the values being sent to the PDF are not the values in the database (Y/N), but the showing values (Yes/No). This happens when I use the domain_code select query as the query based LOV.
Furthermore, I cannot get any columns not rendering on the page to be generated in the PDF. I have a column that groups items depending on values, and I want this grouping to display in the PDF instead on the original value, ideally.
Cheers,
K. -
Static LOV displays in Sorted order
Hi
Did anyone have come across using Static LOVs displays the display value in the Alphabetical sorted order for a radio button? Any resolution for this problem, I can change to Dynamic SQL using union with the dual table, just curious to know
CheersSuresh,
Did anyone have come across using Static LOVs displays the display value in the Alphabetical sorted order for a radio button?I don't understand that question. What are you doing now and what are the results?
Scott -
Set default value in static LOV
Hi,
I am using Jdeveloper 11.1.2.0.
I used static LOV in table CRUD operation.
Problem is , default value can not able set(in static LOV) in
first row of table. But remaining row was working fine.
Thanks in Advancei also had like this. static lov. it's fine
just choose literal and give N
dont give like this 'N'
is like this in you yourvo.xml
<ViewAttribute
Name="GlalStatus"
PrecisionRule="true"
EntityAttrName="GlalStatus"
EntityUsage="GlLvlAccountsEO"
AliasName="GLAL_STATUS"
DefaultValue="N"/>Edited by: ADF 7 on Feb 16, 2012 11:25 PM -
Using Static Named LOV to show images in report
FYI
See http://htmldb.oracle.com/pls/otn/f?p=24317:43
The report query is simply
select object_name,object_type,status
from user_objectsThe STATUS column has its "Display as'" attribute set to "Display as Text (based on LOV, does not save state)". The LOV is a static named lov with the following 2 values
1. Display = < img src="/i/tip.gif" / >, return = VALID
2. Display = < img src="/i/g_can.gif" / >, return = INVALID
In other words, the named LOV is used to do the translation between the column value and the image rendered on the report. I think this is a better technique than using
DECODE(col,'VALID','< IMG ....) in the report SQL, keeps the content and presentation separate, like it should be.
[Not sure if one technique has any performance advantages over the other]
Hope this helps.Hi Vikas,
Thanks for sharing.
" [Not sure if one technique has any performance advantages over the other]"It seems to me that in your technique it should be simpler to maintain several gif options – editing LOV seems simpler then editing the DECODE parameters list. I'm also thinking about the option of using dynamic LOV for gifs stored in a table.
Regards,
Arie. -
Referencing static LOV from plsql
I have a number of static LOV's. How can I reference these in PL/SQL.
For example, I am creating a report using PL/SQL so that I can create the exact layout I require. The data uses a number of list of values so I need to convert the value fields into the displays fields from the list of values using PL/SQL.
How?Jezzer,
It will depend on your version. If you are using 2.2 or 3.0, you could use the view APEX_APPLICATION_LOV_ENTRIES to access your lov values. It will automatically be limited to the workspace that your schema is associated with and then you can further qualify with the APPLICATION_ID and LIST_OF_VALUES_NAME. To see the view, navigate to Utilities > Application Express Views and query on lov.
-- Sharon -
Radiogroup static LOV only displays the first label.
I have a simple static LOV for a radiogroup item, but it won't show the 2nd label. It is the second radio group item on the page and the first works fine.
2nd LOV:
STATIC2:Yes;1,No;2
Any suggestions, please?The first LOV happens to use the escape character of a bar STATIC2(|,;) because I have numbers with commas in the label (e.g., $5,000).
If I put the 2nd LOVE before the first by changing the sequence, it works, but I don't want it before the one with the escape character. -
I have created a select list in a report with
static LOV.
Does anyone know how to change the font
color of each option in the select list?
Example for options 1,2,3
something like this:
<font color="red">1</font> .... red
<font color="green">2</font> ... green
<font color="blue">3</font> ... blue
ThanksThanks marife
for the good suggestion. It seems that the colour
pattern works absolutely fine but the problem is that
it creates another line for each option and
makes the select list a bit difficult difficult to read.
By the way i am using htmldb_item.select_list
and not an actual select list.
If you have any better suggestions let know
thanks,
Ody -
Table Filter with static LOV column
Hi,
I am using JDeveloper 11.1.14 and ADF-BC in my project.
For one of the tables,I have the following scenario.
1. I have a viewobject [Ex: EmpVo] in which one of the attributes has a static LOV[:Ex: 'Status' attribute in EmpVo has static LOV - StatusLOV with values A - Active I - Inactive].
2. EmpVo -- > Employee table which stores A and I as status values in database
3. Display this view object as table in jsff page.
In the jsff page, when filter is enabled, for the status column I am able to filter only using 'A' and 'I'.
But actually filter has to work with 'Active' and 'Inactive' as filter values.
Please suggest the best way to implement filter in this scenario
Thanks,
PraveenTake a look at the following article:
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/16-custom-table-filter-169145.pdf
Here, for LOV's you could have an LOV as a filter component instead of the default inputText component.
Thanks,
Navaneeth -
STATIC vs STATIC2 in static LOV definition
Hi All,
what is the difference between STATIC and STATIC2 ?
The documentation on creating checkbox references word 'STATIC'. When I create static LOV by clicking 'Create or edit static List of Values' link on 'Edit Page Item' this uses word 'STATIC2' in LOV definition.One sorts values alphabetically and the other in the order in which they are written.
Jure -
I have a report region with a couple of "Display as Text (based on LOV)" columns using a Named LOV with static entries (some cute images and stuff). I mentioned this in Using Static Named LOV to show images in report
The report region displays 60 rows/page. I find that it takes a (relatively) long time for the named LOV queries to kick in. Doing a &p_trace=YES shows me the following
SELECT ID, LOV_QUERY
FROM
WWV_FLOW_LISTS_OF_VALUES$ WHERE FLOW_ID = :B2 AND LOV_NAME = UPPER(:B1 )
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 116 0.03 0.04 0 0 0 0
Fetch 232 0.01 0.01 0 464 0 116
total 349 0.04 0.05 0 464 0 116
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 3237 (recursive depth: 1)
begin execute immediate 'begin select lov_disp_value, lov_return_value
bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value
from wwv_flow_list_of_values_data where lov_id = 3566322593397935 and
(required_patch is null or (required_patch > 0 and
(wwv_flow_item.fetch_g_build_options_excluded is null or
instr(wwv_flow_item.fetch_g_build_options_excluded,
'':''||required_patch||'':'') = 0) ) or (required_patch < 0 and
(wwv_flow_item.fetch_g_build_options_included is null or
instr(wwv_flow_item.fetch_g_build_options_included,'':''||(0-required_patch)
||'':'') = 0) ) ) and exists (select 1 from wwv_flow_lists_of_values$
where flow_id = :flow_id and id = 3566322593397935) ; end;' using
v('FLOW_ID'); end;
call count cpu elapsed disk query current rows
Parse 116 0.07 0.06 0 0 0 0
Execute 116 0.30 0.27 0 12 0 116
Fetch 0 0.00 0.00 0 0 0 0
total 232 0.37 0.34 0 12 0 116
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 1446 (recursive depth: 1)This seems excessive. Any way to tune this?
ThanksOverall, it is a very simple page with a report region on a 150 row table with some optional filters.
The trace file has the actual SQL statement executed by that PL/SQL block.
Here they are
begin select lov_disp_value, lov_return_value bulk collect into
wwv_flow_utilities.g_display,wwv_flow_utilities.g_value from
wwv_flow_list_of_values_data where lov_id = 3566322593397935 and
(required_patch is null or (required_patch > 0 and
(wwv_flow_item.fetch_g_build_options_excluded is null or
instr(wwv_flow_item.fetch_g_build_options_excluded,':'||required_patch||':')
= 0) ) or (required_patch < 0 and
(wwv_flow_item.fetch_g_build_options_included is null or
instr(wwv_flow_item.fetch_g_build_options_included,':'||(0-required_patch)
||':') = 0) ) ) and exists (select 1 from wwv_flow_lists_of_values$
where flow_id = :flow_id and id = 3566322593397935) ; end;
call count cpu elapsed disk query current rows
Parse 116 0.05 0.05 0 0 0 0
Execute 116 0.11 0.11 0 0 0 116
Fetch 0 0.00 0.00 0 0 0 0
total 232 0.16 0.17 0 0 0 116
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 1446 (recursive depth: 2)
SELECT LOV_DISP_VALUE, LOV_RETURN_VALUE
FROM
WWV_FLOW_LIST_OF_VALUES_DATA WHERE LOV_ID = 3566322593397935 AND
(REQUIRED_PATCH IS NULL OR (REQUIRED_PATCH > 0 AND
(WWV_FLOW_ITEM.FETCH_G_BUILD_OPTIONS_EXCLUDED IS NULL OR
INSTR(WWV_FLOW_ITEM.FETCH_G_BUILD_OPTIONS_EXCLUDED,':'||REQUIRED_PATCH||':')
= 0) ) OR (REQUIRED_PATCH < 0 AND
(WWV_FLOW_ITEM.FETCH_G_BUILD_OPTIONS_INCLUDED IS NULL OR
INSTR(WWV_FLOW_ITEM.FETCH_G_BUILD_OPTIONS_INCLUDED,':'||(0-REQUIRED_PATCH)
||':') = 0) ) ) AND EXISTS (SELECT 1 FROM WWV_FLOW_LISTS_OF_VALUES$ WHERE
FLOW_ID = :B1 AND ID = 3566322593397935)
call count cpu elapsed disk query current rows
Parse 116 0.02 0.01 0 0 0 0
Execute 116 0.07 0.07 0 348 0 0
Fetch 116 0.01 0.01 0 348 0 232
total 348 0.10 0.09 0 696 0 232
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 1446 (recursive depth: 3)
Rows Row Source Operation
2 FILTER
2 TABLE ACCESS BY INDEX ROWID WWV_FLOW_LIST_OF_VALUES_DATA
2 INDEX RANGE SCAN WWV_FLOW_LOV_DATA_IDX1 (object id 69923)
1 TABLE ACCESS BY INDEX ROWID WWV_FLOW_LISTS_OF_VALUES$
1 INDEX UNIQUE SCAN WWV_FLOW_LOV_PK (object id 69918)My apologies if this seems like nit-picking but when a dead-simple page like this takes more than 1.5 seconds to render, it bothers me. -
Modify dynamically Static LOV and System Tables
Hello,
Does anyone know if it is possible to dynamically modify a Static LOV using a system table. All suggestions greatly appreciated!
SharonHello,
I am converting a program from the old HTML-DB. The original program dynamically manipulated a static LOV using a system table. I am trying to do the same thing. If it is possible to dynamically change a static LOV I would like to know how. If there is no way in APEX, I will create a table and dynamically change the table. Thank you for your suggestions.
Sharon -
Hi,
Im havin a little trouble trying to do the following:
I have a LOV that does a query, but besides the query I want also to have an static option on the LOV that represents all the options, any idea how can I achieve this?
thanksI'm not quite sure if I have understood your requirement; you want to have a LOV which always shows the same records?
If so there comes 2 possibilities to my mind:
- You could create a record group at runtime, populate this record group with your desired values, and assign your record group to your LOV.
or
- create a table where you store your static values you want to show, and do a query on the table. Maybe you could add a realm to the table, as if you wish to use your static LOV elsewhere you could also simple use your static LOV table...
maybe
select key_col, name_col
from static_lov
where realm = 'FORM1_LOV1'regards -
Translate static LOV values ?
Hello,
I need to translate a French application into English. I've followed the translate processus, but I've got a problem with static LOV values.
I use radiogroup with static LOV, and it seems that I can't translate these static values, but I have to do it.
Any idea to help me?
TanksAnother solution is to define both French and English (or whatever) item in the LOV. For each item in it, you specify a "Conditional Display: current language = Expression" --> fr-ca for exemple. So in your LOV, you will have something like this.
YES --> Y
NO --> N
Oui --> Y
Non --> N
Depending on the current language, you will see only 2 items in that LOV.
That should do it.
Christian -
Hi Experts,
I'm new to apex. I created a report and it contains a LOV.
Under the region, i have created a LOV item as select list with name P22_TRUE_FALSE_BOTH
I have created a static lov defining the LOV definition as
STATIC2:True;Y,False;N,Both; IN (Y,N)
Return value Y and N is working, but when I give both, i need all the rows having Y and N, but its not working.
what should I pass a return value ? Y&&N or Y:N ? Or we can use INSTR?
The table column contains only Y and N values.
I need to pass the third value which is combination of Y+N.
I am using the below region source code to get the lov values
"XX_TABLE"."COLUMN" LIKE NVL(:P22_TRUE_FALSE_BOTH,'%')
Do i need to change like "XX_TABLE"."COLUMN" = :P22_TRUE_FALSE_BOTH ?
Please advise.
Thanks,
RenganathanHi,
Thanks for the quick response.
But I'm not understanding the condition part.
From the Lov, If B is passed,it takes the following substitute.
WHERE( (B 'B' AND table.column=B)
OR
(B ='B'))
There is no value 'B' in column.How It will fetch all the rows having Y and N?
Thanks,
Renga
Maybe you are looking for
-
How to create a custom table in the below format
Dear Friends can any one please let me know hot to create a custom table as below outpatient |employeeno | class | startdate | enddate | spouse |1stchild | 2nchild| Rate | amount| My FO wants to enter in the SM30 as above ......i.e he want
-
How can I restart a mac pro that shows only a grey screen with a spinning wheel. I reinstalled snow leopard (10.6.3) over 10.6.8 because apple genious people said I had problems with my library files after a time capsule crash. I reinstalled but when
-
Problem while setting the selected value of h:selectOneMenu to bean
Hi all, I am new to JSF. I am working on application where i have combo boxe on the page. I am setting some values to the combobox from database using <f:selectItems> tag and one value using <f:selectItem> tag. The value combobox value selected by us
-
Wireless Printing to ETHERNET Printer Xerox Phaser 6180 via AE not working
I can not print to my Xerox Phaser 6180. It is connected to my ethernet network and works correctly via ethernet wire, but not via airport express base station. Printer is not recognized in the network when connecting the Mac Book via Ethernet. The b
-
Compressor produced m2v file "kind" is strange...
I don't know if this is new, but I've never noticed it before. All of my compressor .m2v file "kind" fields look like this: MPEG-2 File <!DO... (and them some Japanese or Chinese characters)> If I "get info" on the file, the information following the