Changing the record group query in seeded forms
Hi all,
I need to change the record group query in one seeded form.
Can it be done through custom pll or what is the correct approach to do that..
Thanks,
Devang
you want to do that at runtime?
Similar Messages
-
Can we change the Record Group Type through Custom.pll
Hello All,
I have a small requirement on Changing the Record Group Dynamically.
Can i set the Record group type to 'Query' from 'Static'. i.e Can i change the Record group type dynamically through custom.pll. I know that we can dynamically change the Record group query.
Please help me its a bit urgent.
Thanks inadvance,
Amarnadh Jsyou can control your record group runtime without create any recordgroup at design time..
1.static group
declare
rg_name VARCHAR2 (40) := 'Global_Rgp_Menu'; --global record group name for menu use
rg_id recordgroup; --global record group id
gc_id groupcolumn; --global record group coulmn id
errcode NUMBER; --error code
grp_row PLS_INTEGER := 0; --global record group row count
begin
rg_id := FIND_GROUP (rg_name);
IF NOT ID_NULL (rg_id)
THEN
DELETE_GROUP_ROW (rg_id, all_rows);
ELSE
rg_id := CREATE_GROUP (rg_name, global_scope);
gc_id := ADD_GROUP_COLUMN (rg_id, 'menu_item', char_column, 100);
gc_id := ADD_GROUP_COLUMN (rg_id, 'p_type', char_column, 100);
gc_id := ADD_GROUP_COLUMN (rg_id, 'p_no', char_column, 100);
END IF;
grp_row := 0;
for 1 in 1..10 loop
grp_row := grp_row + 1;
ADD_GROUP_ROW (rg_id, grp_row);
SET_GROUP_CHAR_CELL (rg_name || '.menu_item', grp_row, 'menu' || to_char(i) );
/*type*/
SET_GROUP_CHAR_CELL (rg_name || '.p_type', grp_row, 'type' || to_char(i) );
/*program_no */
SET_GROUP_CHAR_CELL (rg_name || '.p_no', grp_row, 'programno' || to_char(i) );
end loop;
end;
2. query group
declare
FACT_SQL VARCHAR2(500) :=NULL;
rg_name1 VARCHAR2(40) := 'Global_Rgp_fact';
rg_id1 RecordGroup;
Error_Flag number:=0;
group_error exception;
begin
rg_id1 := Find_Group( rg_name1 ); IF NOT Id_Null(rg_id1) THEN Delete_Group( rg_id1 ); END IF;
FACT_SQL := ' SELECT * FROM MYFACTORY ' ;
rg_id1 := Create_Group_From_Query( rg_name1,FACT_SQL ,global_scope);
Error_Flag := POPULATE_GROUP(rg_id1);
IF Error_Flag <>0 THEN
error_msg:='Error while populating factory group';
raise group_error;
END IF;
exception
when group_error then
message(error_msg);
raise;
end;Edited by: nolemlin on 2010/3/23 上午 7:50 -
List item - Record Group Query - Alignment improper Order
Dear All,
When am trying to concatenate two columns using record group query and displaying in the list item, the alignment is not in proper order.
E.g; Below is the columns and data's used in process:
CODE_VALUE SHORT_DESC DESCRIPTION
ROLL1 Customer - Non accidental Production, booking with other carrier, bad projection.
ROLL2 Customer - Accidental L/C, B/L draft, Customs, Samples, AMS, LAR.
ROLL3 ABC - Lack of empty Lack of empty units.
ROLL4 ABC CDE - Roll over AGR RRR decision.
ROLL5 ABC XXX - Accidental IMO or OOG refused, operational problems, Cut & Run.
ROLL6 ABC YYY - Fictive booking Equipment buffer, dummy booking.
Below is the record group query used in forms:
PROCEDURE p_when_new_form_instance
IS
GROUP_ID recordgroup;
list_id item := FIND_ITEM ('BLK_CONTROL.LI_ROLL_REASON');
rg_name VARCHAR2 (20) := 'LI_ROLL_REASONS';
status NUMBER;
l_query VARCHAR2 (4000);
BEGIN
l_query :=
'SELECT rpad(short_desc,50,'' '')||'' | ''||description description, code_value code_value FROM codes WHERE code_value IN (''ROLL1'', ''ROLL2'', ''ROLL3'',''ROLL4'',''ROLL5'',''ROLL6'')';
GROUP_ID := CREATE_GROUP_FROM_QUERY (rg_name, l_query);
status := POPULATE_GROUP (GROUP_ID);
POPULATE_LIST (list_id, GROUP_ID);
EXCEPTION
WHEN OTHERS
THEN
pl_common.when_others;
END;
Moreover i have my list item font property by default as ""MS SANS SERIF" and when i run in Forms Builder am getting the alignment as below.
Result:
====
DESCRIPTION CODE_VALUE
Customer - Non accidental | Production, booking with other carrier, bad projection. ROLL1
Customer - Accidental | L/C, B/L draft, Customs, Samples, AMS, LAR. ROLL2
ABC - Lack of empty | Lack of empty units. ROLL3
ABC CDE - Roll over | AGR RRR decision. ROLL4
ABC XXX - Accidental | IMO or OOG refused, operational problems, Cut & Run. ROLL5
ABC YYY - Fictive booking | Equipment buffer, dummy booking. ROLL6
Above order is not the expected result as all the |(pipe) symbol should display in proper order as below.
Expected Result:
==========
DESCRIPTION CODE_VALUE
Customer - Non accidental | Production, booking with other carrier, bad projection. ROLL1
Customer - Accidental | L/C, B/L draft, Customs, Samples, AMS, LAR. ROLL2
ABC - Lack of empty | Lack of empty units. ROLL3
ABC CDE - Roll over | AGR RRR decision. ROLL4
ABC XXX - Accidental | IMO or OOG refused, operational problems, Cut & Run. ROLL5
ABC YYY - Fictive booking | Equipment buffer, dummy booking. ROLL6
I tried with RPAD and LPAD still the alignment issue is there; i know the issue is because of invariable length of the font.
But is there any solution to override this it will be of great help.
So please help!!!!!!!!!!!!!!!!!
Thanks..................
Regards,
Sunil.GHi Francois,
Thanks for your reply. I have tried changing the font to "Courier(Western)" it is working fine.
But as per the standards defined, it should be "Ms Sans Serif" nothing apart from that.So that is where the problem lies. :(
Regards,
Sunil.G -
Error message:FRM-12001: Cannot Create the record group(check your query)
Requirement: Need to get employee name and number in the LOV in search criteria.
So I created LOV "full_name" and Record group Query under Employee Name property palette with
select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
,papf.employee_number
from apps.per_all_people_f papf, apps.per_person_types ppt
where sysdate between papf.effective_start_date and papf.effective_end_date AND papf.person_type_id=ppt.person_type_id AND ppt.system_person_type IN ('EMP', 'OTHER', 'CWK','EMP_APL')
AND PPT.default_flag='Y' and papf.BUSINESS_GROUP_ID=1
order by papf.full_name
I was unable to save and getting error message "FRM-12001: Cannot Create the record group(check your query)".
I cant use PER_ALL_PEOPLE_F.FULL_NAME since full name here is last_name||title||middle_names||firstname.
But my requiremnet is papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name .
Can any one of you help me.First, Magoo wrote:
<pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name ( p_title in varchar2,
p_last_name in varchar2,
p_first_name in varchar2,
p_mid_names in varchar2 ) return varchar2 is
begin
for l_rec in ( select decode ( p_title, null, null, p_title || ' ' ) ||
p_last_name || ', ' || p_first_name ||
decode ( p_mid_names, null, null, ' ' || p_mid_names ) full_name
from dual ) loop
return ( l_rec.full_name );
end loop;
end;</font></pre>
Magoo, you don't ever need to use Select from Dual. And the loop is completely unnecessary, since Dual always returns only one record. This would be much simpler:
<pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name
( p_title in varchar2,
p_last_name in varchar2,
p_first_name in varchar2,
p_mid_names in varchar2 ) return varchar2 is
begin
Return ( Ltrim( Rtrim ( p_title
||' ' ||p_last_name
||', '||p_first_name
||' ' ||p_middle_names )));
end;</font></pre>
And second:
user606106, you did not mention how you got your record group working. However, you DO have an issue with spaces. If you change this:
<pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
,papf.employee_number </font></pre>
to this:
<pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select Ltrim(Rtrim(papf.title||' '||papf.last_name||', '
||papf.first_name||' '||papf.middle_names)) AS emp_full_name,
papf.employee_number</font></pre>
it should work. The Ltrim(Rtrim()) removes leading and trailing spaces from the resulting full name. -
FRM-12001: Cannot create the record group (check your query).
I WANT TO ADD A RECORD GROUP IN PRI BUILD FORM THE QUARY IS VERY SIMPLE LIKE
SELECT item_code
FROM items
WHERE active = 'Y'
AND item_code like 'FAJ%'
BUT THE SYSTEM SHOW THE ERROR MESSAGE
Cannot create the record group (check your query).Make sure the user connected to the database from the forms builder has the privilege of select from the table, or there's a synonym.
Try your query from SQL*Plus connected with the same user.
Tony -
Just wondering if we need to check :system.mode = query or normal in the query for record groups or oracle forms handles it automatically
ThanksNo, you should not check System.Mode in a record group query. But then, Forms does not do that either.
Your question makes me wonder what you are doing... Record groups are usually populated only when you need to see a list of values, or use an LOV to perform an edit. -
ORA-00904 when use column alias in Record Group Query
Is it possible to use column aliases in Record Group Queries?
I have a query that runs fine in SQL*Developer, but gives me runtime errors when I use it as a Record Group Query.
When I use it as a Record Group Query, the Form compiles, but at runtime I receive the following errors:
FRM-40502: ORACLE error: unable to read list of values
when I use Help - Display Error, I see:
ORA-00904:"CHILDNAME":invalid identifier
The query is something like this
select decode(complex stuff here) as "childname" ....
I've tried it with and without the double quotes surrounding the alias name, and have also tried it without using the "as" keyword.
I would appreciate any suggestions or insights. I'm using Forms 9.0.4.
Thanks.It looks like this is caused by bug 725059:
"FILTER BEFORE DISPLAY" DOESN'T WORK IF LOV HAS COLUMN ALIASES (TRIAGE1098)
My LOV does have the Filter Before Display turned on. Here's the text of the bug:
IF an LOV is created with column aliases in the select statement, (eg: select ename emp_name from emp) and the LOV property "Filter Before Display" is "Yes", THEN when you attempt to filter the LOV at runtime, (eg: type '%' then press the 'Find' button) the internal WHERE clause that forms sends to the database is: WHERE column_alias LIKE '%%' This is incorrect syntax. A client-side sqlnet trace shows this. The correct syntax should be: WHERE column LIKE '%%' . The incorrect syntax results in no rows returned. However no error is displayed by forms to the user. -
Record Group Query - item block
I need to calculate a Record Group Query using a block item value, but when a use the query below the query didn't return rows:
SELECT OID_SIIB_FINALIDADE_TED
, F.COD_FINALIDADE || ' - ' || F.DES_FINALIDADE DES_FINALIDADE
FROM SIIB_FINALIDADE_TED F
, ( SELECT P.TP_PARAMETRO
FROM SIIB_PARAMETROS_GERAIS P
WHERE P.NM_PARAMETRO = 'TIPO_' || :BLOCK.ITEMX ) PAR -- using the :BLOCK.ITEMX the query did'nt return data
WHERE PAR.TP_PARAMETRO = F.TPO_FINALIDADEBut if a use a static query the Record Group( changing :BLOCK.ITEMX for 'STR0005' ) return the desired values.
This Record Group is used to pupulate a LOV.
Edited by: user5914526 on Feb 15, 2012 9:26 AM
Edited by: user5914526 on Feb 15, 2012 9:26 AM
Edited by: user5914526 on Feb 15, 2012 9:29 AMNo, it doesn't .
And return the message: "There aren't data in the List of Values"
And the block item is not empty or null.
Edited by: user5914526 on Feb 15, 2012 10:13 AM -
When i click the LOV it is giving Error Frm-40502 ORACLE error: unable to read list of values.
I have written the following query in the Record Group
Select uua_cd_company, uua_cd_dept, uua_id_proc_cntr from v_user_user_area where uua_id_users = user
I have used the user keyword in my query. When i run my form connecting to 11g database i get the LOV error
But when i run the form in 10g Database the LOV works.
Is there any restirction in using "User" in record group in LOVSeems like the select does not work for some reason against your 11g database. Try to execute the query using SQL*Plus with the same user youuse to connect in forms.
-
Change lov record group dynamilcally
Please provide me solution :-
declare
l_id lov;
rg_id recordgroup;
n boolean;
begin
l_id := find_lov('LOV14');
rg_id := find_group('LOV14');
if get_lov_property('LOV14',group_name) = 'LOV14' then
message('found');
message('found');
-- end if;
-- if not id_null(rg_id) then
-- delete_group(rg_id);
set_lov_property(l_id ,group_name, 'NEW_RG');
-- message('group has been changed');
-- message('group has been changed');
n:= show_lov('LOV14');
end if;
end;
i tried this code . but neither its giving error nor doing work. please help methanks for reply sir, bt problem is :---
my lov name is 'LOV14' and same name as record group 'LOV14' , now i hav to button on my form ;
i want to show lov at button first . as well as i want change record group dynamicly at button second.
first record group name is "LOV14' and another is "NEW_RG'. and run time i want to change NEW_RG record group at the place of LOV14.
declare
l_id lov;
rg_id recordgroup;
n boolean;
x number;
begin
l_id := find_lov('LOV14');
rg_id := find_group('LOV14');
if get_lov_property('LOV14',group_name) = 'LOV14' then
message('found');
message('found');
-- end if;
--x := POPULATE_GROUP('NEW_RG');
-- if not id_null(rg_id) then
-- delete_group(rg_id);
if not id_null (rg_id) then
delete_group(rg_id);
end if;
set_lov_property(l_id ,group_name, 'NEW_RG');
-- message('group has been changed');
-- message('group has been changed');
-- n:= show_lov('LOV14');
end if;
end; -
I have created Product entity in MDS. It's having the following values:
Name Code Owner
Bike 1 ABC
Car 2 XYZ
Cycle 3 RRR
owner XYZ can change the record of RRR. But if owner XYZ or any other owner in this entity tried to update the ABC's record, access should be denied. That means, no one should have the permission to change the records which are entered by ABC.
For this i have executed this code
CREATE TRIGGER mdm.party_trial_readonly ON mdm.tbl_1042_1278_EN AFTER UPDATE, DELETE AS
IF EXISTS (SELECT * FROM deleted WHERE readonly = 1)
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('Attempt to change a read-only row', 16, 1)
RETURN
END;
After executing this code i couldn't edit any of the records.
Please help me out in this.I have created 2 entities called Party and Owner. Party has following columns (name, Code, Owner (Domain Based Attribute)) Owner has following columns (name, Code) And I have Created one Derived Hierarchy.
From user and Group Permision Section, Hierarchy Members tab I have given read only permision to me (administrator of the Model). When I gave the permision I have selected users and Inherited from group in permission tab. And I'm not the part of any group.
Now I'm not able to see my model except the explorer area. And I'm not able to delete the permission from the user. As per the admin guide we need to delete permission from group.
Though I'm not the part of any group, I'm not able to proceed further to delete the permission.
Please help me out in this regard. Thanks! -
How to get all the Record Groups?
in the form i had created a record group. let us say they are:
RG_APPR_TYPE_CDE_LIST
RG_DRV_APPR_TYPE_CDE_LIST
RG_PROJ_MODE_CDE_LIST
RG_DRV_PROJ_MODE_CDE_LIST
RG_PROJ_STATUS_CDE_LIST
RG_DRV_PROJ_STATUS_CDE_LIST
RG_ORG_SUB_TYPE_CDE_LIST
RG_DRV_ORG_SUB_TYPE_CDE_LIST
RG_REGION_NUM_LIST
RG_DRV_REGION_NUM_LISTwhen the form hits on the clear button it invoke the CLEAR_FORM. i want to get all the record groups dynmically so i won't have to explicitly call the
Delete_Group('RG_APPR_TYPE_CDE_LIST');
Delete_Group('RG_DRV_APPR_TYPE_CDE_LIST');
Delete_Group('RG_PROJ_MODE_CDE_LIST');
...one by one. is there any other workaround? i appreciate any help on this. thanks.is there any other workaroundNo.
-
Help with poplist record group query
Hi, I want to populate a poplist based on the following query:
SELECT value
FROM table.value
WHERE code_parent IS NULL
UNION ALL
SELECT 'ALL'
FROM dual
ORDER
BY code
Now I know that you need 2 columns in the record group to populate a poplist, but I cannot seem to modify the query to have 2 columns. I am basically adding the 'ALL' value, which will have a label of 'ALL' and a value of 'ALL'.
The first select I can easily modify to be an acceptable record group for a dynamic poplist, Its the union that im having problems with. The following select does not work. Help would be appreciated.
SELECT table.value, table.value
FROM table.value
WHERE code_parent IS NULL
UNION ALL
SELECT 'ALL', 'ALL'
FROM dual
ORDER
BY table.valueBased on the error I'd guess that one of your columns are defined as a number and the union columns are both varchar2. Match the datatype with the column it corresponds to:
UNION
SELECT 'ALL', 0
FROM DUAL
ORDER BY 1
The order by clause also needs to reference the column number instead of the column name since the union clause does not have a column name. -
Hi:
Is there any way you can get at runtime the query of a record group?.
I can't find any property for this.
Can I use a tree to put there the record group and after this get it with
Ftree.GET_TREE_PROPERTY( htree, 'QUERY_TEXT')
ThanxI don't think that it will work with a tree, but you could try to keep the query in a parameter and assign it to the recordgroup at runtime. At least you can read the parameter.
-
Can we change the payscale group text in V_T510?
Hi All,
Can we change the Payscale Group text which is stored in V_T510 field TRFGR?
is there any other way that we can change them?
Regards
RahulHi,
Yes if client want new description for the PS Group, you have to create new only and assign the wage types to them and so on..... you have to do all the configurations regarding the PS Group. Here the main point is be careful with the start date of the PS Group for newly created records and assignments.
Best Regards.
Maybe you are looking for
-
The document is not relevant for invoice lists
Hi SD Experts, When i am creating invoice list (T.Code:VF21),I got the error that"the document is not relevant for invoice lists". i entered invoice list type per billing document type (transaction OVV7). I already did those settings in the IMg. But
-
PDF quality is degraded when InDesign file is reopened.
When I place PDF files in my InDesign document and print, or save to PDF immediately, the quality is great. However, if I save the InDesign file and open it later, the PDF quality is much degraded. Too degraded to use. I must make the document or boo
-
Growing Reader 8.1.2 Issue on XP
We're on Windows XP SP2 on very new PCs with no printer driver changes. The Reader version is now 8.1.2, and a simple, black and white 1 bit PDF file that took a few seconds to print before, now takes minutes to even send to the printer after the upg
-
Hi! I am a Creative Cloud member. I use my e-mail <Removed by Moderator> when I was applying. Why it keep sending mails to my another e-mail account <Removed by Moderator> which is already shut down? Because it sends validation mails to this account,
-
Might worth to check it out...MacBook Sale
Greetings, Here is link to MacBook on sale for today only, Friday, 11/24/2006: http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID?mco=A1D 35FF1&nclm=MacBook Enjoy. I received no compensation nor linked nor benefit from the link