Populate a non List ITEM
I am familiar with the procedure of creating a record group to pupulate a list item. What I have never done and I am wondering how to do it is for when you want to populate a text item for display only. List is not necesary as the data has already been entered.
any ideas?
thanks!
here is the scenario
I have one table with:
education --numeric 1 to 5 possible values
in another table, I have the labels for this
id | label | type
1 elementary 1
2 highschool 1
3 college 1
I believe you need a LOV. You have a display item which would hold the value of a chosen element. The values are, I believe, in a table already. You need to define a RG( based on a query retrieving values from the existent table) and base a LOV on this RG. In the when new item instance invoke the LOV. Assign the value chosen in the LOV to the display item (set the return item to the display item in the Column mapping property of the LOV).
I hope this helps.
Thanks
Similar Messages
-
How to populate List Item from the table in a form builder
I want to know how to populate the List Item (pop up menu and combo box) from a table.
Supposing I have a table Customer(cust_id,cust_name)
and now I want to populate it in such a manner that I can update the data back to the database and also access the list on the form.This is the method i am using to populate a list.
1- First of all you need to create a non-database list item for customer_name.
2-create this procedure
PROCEDURE populate_list_with_query
--Populates the given list item with the specified query.
(p_list_item in VARCHAR2
,p_query in VARCHAR2)
IS
/* Name the record group after the list item (no
block prefix). */
cst_rg_name constant VARCHAR2(30) :=
GET_ITEM_PROPERTY(p_list_item,item_name);
v_rg_id RECORDGROUP;
BEGIN
v_rg_id := FIND_GROUP(cst_rg_name);
IF ID_NULL(v_rg_id) THEN
v_rg_id := CREATE_GROUP_FROM_QUERY(cst_rg_name,p_query);
END IF;
IF POPULATE_GROUP(v_rg_id) = 0 THEN
POPULATE_LIST(p_list_item,v_rg_id);
/* Force display of first list element label
in the list item. */
COPY(GET_LIST_ELEMENT_VALUE(p_list_item,1),p_list_item);
END IF;
END populate_list_with_query;
3- Create When-Create-Record on the block level and write this code
BEGIN
POPULATE_LIST_WITH_QUERY('bk1.customer_name',
'SELECT customer_name, to_char(customer_id) FROM customer');
END;
In this example, the customer name is the (visible) list label and the customer ID is the (actual) list value
i hope this will solve your problem ... -
How to populate multiple list items dynamically?
Dear members,
I have a form there are 3 list items i want to populate these from a record group by dynamically.
but i can be able to populate only one list item. the others give errors.
frm-41337 cannot populate the list from record group.
following is the program unit:
PROCEDURE POPULATE_LIST_WITH_QUERY
(p_list_item in varchar2,
p_query in varchar2)
IS
cst_rg_name constant varchar2(30) :=
GET_ITEM_PROPERTY(p_list_item,item_name);
v_rg_id RECORDGROUP;
BEGIN
v_rg_id := FIND_GROUP(cst_rg_name);
if id_null(v_rg_id) then
v_rg_id := create_group_from_query(cst_rg_name, p_query);
end if;
if populate_group(v_rg_id) =0 then
populate_list(p_list_item, v_rg_id);
copy(get_list_element_value(p_list_item,1),p_list_item);
end if;
END;
i call this in the when-create-record
populate_list_with_query('gl_users.location_id',
'select location_name, to_char(location_id) from gl_locations');
populate_list_with_query('gl_users.company_id',
'select company_name, to_char(company_id) from gl_company');
populate_list_with_query('gl_users.group_id',
'select group_name, to_char(group_id) from gl_user_groups');
only one is populated others give errors.
what is wrong?
thanks
Muhammad Nadeem
Oracle Programmer
CHIMERA
Lahore
0092-0301-8334434Hi again,
Did the popup work ?
For the list item , use the built-in add_list_element in a loop. Example : in the pre-form or when-new-form-instance trigger ,
clear_list('block_name.list_item_name');
for rec in (select column1,column2 from t_table order by 1 desc) loop
ADD_LIST_ELEMENT('block_name.list_item_name', 1, rec.column1, rec.column2);
end loop;
See you -
Populate non database items with lov
Hi,
Let's say that I have one database block with 2 columns ID and NAME.
Only ID it is a not displayed database column, and NAME it is a displayed text item with an lov which retrieve data for both columns.
How can I do, to populate the non database item NAME after querying the block, without using POST-QUERY trigger and select into statement.
Thanks.Hi Gabriel
How can I do, to populate the non database item NAME after querying the block, without using POST-QUERY trigger and select into statement.u can't do that but with using POST-QUERY trigger and select into statement.
This Trigger fires the action of populating the non-db item block Level after executing query...
Regards,
Amatu Allah -
Populate HTML LIST ITEM with a query
Hello,
I've a problem,
I'm building a portlet based on an html form.
In this forms there are several list items,
How can I populate an html list item with a dynamic query based on a db table?I hope you are looking for something like this
declare
v_ret_string varchar2(32767);
begin
v_ret_string := ' <TABLE BORDER="1" bordercolor="#0000FF" bgcolor="#FFFFF0">
<TR><TD><TABLE BORDER="0" CELLSPACING="3" CELLPADDING="0">
<BR>
<TR><TD ALIGN=middle><SELECT SIZE="1" NAME="emp_list">
<OPTION VALUE="">';
For get_emp_list In (Select ENAME,EMPNO
From SCOTT.EMP
Order by ENAME) Loop
v_ret_string := v_ret_string || '<OPTION VALUE="'||get_emp_list.EMPNO||'">'||get_emp_list.ENAME;
End Loop;
v_ret_string := '</SELECT></TD></TR><TABLE></TABLE>';
End;
which uses PL/SQL code to generate the html page.
Thanks
-Krishnamurthy -
Problem with non-database item
I have a 10g rel 2 form that has a post-query trigger that populates a non-database item. The non-database item has a when-validate-item trigger which I only want to fire when the user changes something in that field not at query time because it causes the form status to be changed. How can I either prevent this trigger from firing in query mode or test within the trigger that I'm in query mode so that the logic won't get executed?
Put this at the top of your when-validate trigger:
If :system.mode = 'QUERY' then
return;
End if;I have found that post-query activity often causes ALL when-validate triggers at the item and block level to run. So you may need those three lines in every when-validate trigger. -
Searching in non-database items
Hi,
I have a block of which the source is a table.
There are some non-database item in the block.
Actually these fields are from another table.
In the post-query, I populate the non-database items with the table.
My question is : normally I can use 'Enter Query' to seach the records in
the database column. How can I perform seaching with non-database items ?
Thanks
IvanIn a pre-query trigger alter the where clause of the main block to query the main table based on non-database values...
Use the set_block_property procedure and the 'DEFAULT_WHERE' clause or the 'ONETIME_WHERE' property...
example...
set_block_property('MYBLOCK', ONETIME_WHERE,
'where main_table.id in (
select id from my_non_db_block_table where mycol = :my_non_db_field)');
To accept wild cards you will probably have to change the = to a "like" above..
You will have to build your where clause by adding a "and" condition for each non-db field.
Message was edited by:
Mark Reichman -
Unable to populate list items with criteria
Hi
I want to populate some values based on condition in a text field.
I tried the code wihtout condition in new form instance and its working fine but when i tried with an condition on when mouse click on list item and its working for first action.If list having more than 1 values in list its became blank and not working
DECLARE
group_name varchar2(40) :='LSTCUR';
group_id RecordGroup;
list_id item := Find_item('TB.LSTCUR');
status NUMBER;
begin
IF Id_null(group_id) THEN
group_id := Create_Group_From_Query('LSTCUR','select distinct curr,curr from REC_CURR_V where br =:TB.PSRCH');
END IF;
Clear_list(list_id);
status := Populate_Group('LSTCUR');
Populate_list(list_id,group_id);
end;
rgds
soumyasoumya,
Try this code.
DECLARE
RG_Group_ID RECORDGROUP;
Num_Status NUMBER;
BEGIN
RG_Group_ID := FIND_GROUP('LSTCUR');
IF NOT Id_Null(RG_Group_ID) THEN
DELETE_GROUP(RG_Group_ID);
END IF;
RG_Group_ID := CREATE_GROUP_FROM_QUERY('LSTCUR', 'SELECT DISTINCT CURR, CURR FROM REC_CURR_V WHERE BR = ''' || :TB.PSRCH || '''');
CLEAR_LIST('TB.LSTCUR');
Num_Status := POPULATE_GROUP('LSTCUR');
POPULATE_LIST('TB.LSTCUR', RG_Group_ID);
END;Regards,
Manu.
If my response or the response of another was helpful, please mark it accordingly -
Display SP2010 list items on a non-SP site
I want to display items from a SharePoint list on an internal non-SP site. This would be read-only access, and the other site doesn't use Windows authentication. For security reasons, I would prefer not to allow anonymous access for anything on the
SharePoint site. Can I create a dummy account that has only read access to just the specific list? If so, would that interfere with the standard authentication if the user goes to SP to add a list item? Or can the list be set up as a data source for a script
on the non-SP site?Hi,
I would suggest you create a new application based out of CSOM or JSOM / REST API and display information in your internal Non-SP Site. Else,you can use Iframe to display information within your internal site, however to get this working you may have
to break inheritance and define permission level for users who need to do CRUD operation and for those accessing the list within internal non sp site readonly access.
If you are ok with custom app model, then I would suggest these links -
http://msdn.microsoft.com/en-us/library/ff798388.aspx
http://msdn.microsoft.com/en-us/library/office/ee539350(v=office.14).aspx
Hope this helps!
Ram - SharePoint Architect
Blog - SharePointDeveloper.in
Please vote or mark your question answered, if my reply helps you -
Hi
Only stock items get selected on to the pick slip as per the system behaviour
Is there any way we can set up non stock items to show on the pick list.
One of our customer has few non stock items which they want to show on the pick list at the time when the SO is created. They buy these items at times if a customer requires it and sell with other stock items.
Thank you
Regards
ApsaraAre you using Pick and Pack Manager / Sales Order itself as picklist.
As you would understand, only inventory items are recognized by the system as requiring to be picked. One of the ways could be to add a Text type row and enter the item number there.
Suda -
Pick List with Non Stock Items
Is there anyway to edit the Pick List so that it displays Non Stock Items?
Our client does not want to track certain Items as Stock and as such they are all created as Non Stock. The Pick List is required to show that stores that the Non Stock Items are included, however they are not displayed.Hi Kevin,
As the name suggests, the Pick list will only work for Items which are Inventory Items. A non inventory item is not recoganized to have the need to be picked.
Therefore a NON-INVENTORY Item cannot be made to print / be available on the Pick List.
Suda -
Populate list Item with a recordgroup?
Hi Friend
I want to populate a list Item with a "Recordgroup". Does it possible without using the add_eliment function?
I did it through the Loop to read the item from record group. If the database changes the record does not change in my list item. because the list containing the added items which was delivered in the load time. But like Pressing F9, we can easily see the last changed data of the database.
If possible please send me the detail code to me. Here I delivered the detail procedure which i did for that purpose.
Farhad
==========================================================
PROCEDURE Populate_Item_In_List ( List_name VARCHAR2,
QUERY_Text VARCHAR2,
rg_Level_Col_name VARCHAR2,
rg_Value_Col_name VARCHAR2) IS
HERE THE PROCEDURE POPULATE THE LIST WITH THE REQUIRED DATA UNDER A CORRCET SQL (SELECT) COMMAND
List_name THE LIST ITEM WHICH HAS TO BE LOADED BY THIS PROCEDURE
QUERY_Text THIS CONTAINS THE QUERY TEXT BY WHICH THE LIST ITEM WILL LOAD
rg_Level_Col_name THIS IS THE LEVEL OF THE REQUIRED ITEM THAT OBVIUSLY A CHAR DATA TO BE RETRIVE
rg_Value_Col_name THIS IS THE VALUE OF THE REQUIRED ITEM THAT OBVIUSLY A NUMBER DATA TO BE RETRIVE
R_Group RecordGroup;
Rowcount NUMBER;
rg_name VARCHAR2(40) := 'DefaultRG';
rg_id RecordGroup;
errcode NUMBER;
Lid Item;
BEGIN
--+++++++++++++++++++++THIS IS USED TO POPULATE THE RECORD GROUP+++++++++++++++++++++++++++++++++
rg_id := Find_Group(rg_name); Find the record group +
--+
IF Id_Null(rg_id) THEN --+
rg_id := Create_Group_From_Query(rg_name,Query_Text); --+
errcode := Populate_Group(rg_id); --+
else --+
errcode := Populate_Group_With_Query(rg_id,Query_Text); --+
END IF; --+
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If errcode = 1403 then
Message('There is no data to be retrive......');
else
--+++++++++++++++++++++THIS IS USED FOR LOADING DATA TO THE LIST ITEM++++++++++++++++++++++++++++
Rowcount := Get_Group_Row_Count(rg_id); Counting the total rows in RGroup +
Lid := Find_Item(List_name); --+
Clear_list(Lid); Clear the list which is loaded now +
FOR J IN 1..Rowcount LOOP --+
Add_List_Element(List_name, the name of the list item +
J, index of the list +
Get_Group_Char_Cell('DefaultRG.'||rg_Level_Col_name,j), Level of item+
Get_Group_Number_Cell('DefaultRG.'||rg_Value_Col_name,j) value of item+
); --+
END LOOP; --+
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
end if;
END;
===============================================================Hi Farhad,
You can make use of Populate_List built-in.
Populate_List(list_id, 'RECGRP');
You can find more information in online documentation of forms.
Cheers
Zakiy -
How to Populate a List item with LOV'S
How to Populate a list of items with Lov's
and then how to dynamically change the Values of one LIST Item
Based on the Value of anothe List item976798 wrote:
--Hello..I want to ask that How to bind a list item with table values? this below code does not populate items from database to list item.Pls any body give me solution.
declare
group_id RecordGroup;
list_id Item:=Find_Item('LST_CLASS');
status number;
begin
group_id:=Create_Group_From_Query('Answer_List','select CLASS_ID,CLASS_NM from CLASS_MSTR');
status:=Populate_Group('Answer_List');
message(to_char(status));
Populate_List(list_id,group_id);
end;Welcome to the Oracle Forums. Please take a few minutes to review the following:
<ul>
<li>Oracle Forums FAQ
<li>Before posting on this forum please read
<li>10 Commandments for the OTN Forums Member
<li>How to ask questions the smart way
</ul>
Following these simple guidelines will ensure you have a positive experience in any forum; not just this one!
Check this link: How to Dynamically Populate a Pop List ?
Hope this helps
Hamid
If someone's response is helpful or correct, please mark it accordingly. -
How to populate a list item...
Hi Guys,
i have created one of the field on my form as List Item. Now i want to populate this Item with some values in a table.
I have a base table with
Country_ID and Country_Name fields.
I want to populate my List Item on the form in such a style that it just display Country_name in the list, while Country_ID is saved in the database.
The datatype of the field on my form is NUMBER.
How can i populate my list item with a values selected from a database table, description is displyed while code is to be save?
Pliz help,
Imran Baig>
Hi Guys,
i have created one of the field on my form as List
Item. Now i want to populate this Item with some
values in a table.
I have a base table with
Country_ID and Country_Name fields.
I want to populate my List Item on the form in such a
style that it just display Country_name in the list,
while Country_ID is saved in the database.
The datatype of the field on my form is NUMBER.
How can i populate my list item with a values
selected from a database table, description is
displyed while code is to be save?
Pliz help,
Imran Baighi
my question is how is the county id value assigned hidden field to be saved to the database.
secondly the reply states populate list(lstitem,grp_county) my question is which field are you populating here - the display value the country name or the county id to be saved in the database.
most of the notes says you have to create a value twice. one for label and one for value, how is this applicable to be above case.
i have a record group -
SELECT site_abbrev,TO_CHAR(site_code)
FROM sgr_site_list with 2 fields x_site not displayed but receives the site code and save to the database, the other x_site_abbrev displayed and receives site_abbrev but not saved to the database. this is the trigger i have written
declare
site_grp recordgroup := find_group('site_grp');
i_list_item item := find_item('control.x_site_abbrev');
status varchar2(80);
begin
status := populate_group(site_grp);
CLEAR_LIST(i_list_item);
POPULATE_LIST(i_list_item,site_grp);
but i get the form error 40176 cannot create list ...
can someone help please, the whole concepr is a bit confusing
thanks -
Populate the values to list item based on a check box
Hi,
How can i populate the values from a field on the form to one list item based on a check box,
the pseudo code is like,
if checkbox = checked then
populate the particular field value to the list item;
checkbox = unchecked;
next_record;
end if;
Thanks
BcjTo populate a Tlist item, do the following:
1. Create a TLIST item in the EMP block. and give it a height to accommodate several names.
2. Using the TLIST property pallete:
a. Set the Column Name property to EMPNO
b. Click on the Elements in List property. Delete each List Element and delete each List Item Value. If you don't do this you will get an error when you compile.
3. Create a record group using this query:
select ename, to_char(empno) from emp
4. Create a WHEN-NEW-FORM-INSTANCE trigger, and place this code inside the trigger:
Declare
err_num number;
Begin
clear_list('YOUR_TLIST');
err_num := populate_group('YOUR_RECORD_GROUP');
If err_num = 0 Then
populate_list('YOUR_TLIST', 'YOUR_RECORD_GROUP');
Else
message('Error populating Tlist');
message('Error populating Tlist');
End If;
End;
5. Compile and run the form. The ENAMEs will appear in the TList, and each ENAME will have a value equal to its EMPNO.
Maybe you are looking for
-
Pcs:if tag error in Content Server presentation template
This probably isn't the right discussion group, but I couldn't find a group to which this inquiry applies. Anyway, I'm working on Content Server (5.0.2) presentation template code, using a pcs:if tag, that looks something like this: <pcs:foreach var=
-
Having problems downloading the latest Windows support software by Apple
Hello, I am trying to install Windos 7 in my imac, via bootcamp, but every time I try to download the latest Windows support software for my imac, using bootcamp assitant, in the beggining of my download a message appears that I can not download this
-
Crop document by transparent pixels
Hi, I have a question on you. I need crop document by transparent pixels. But I don't know, how to do it. Document has function crop but it need width and height. Do you know function with transparent pixels?? Than you Domaneni
-
Hi , I have one interface.I'm sending data from sap to oracle database.I'm using sender side rfc adapter,reciever side jdbc.In my interface i'm sending employee information.In that i' have 60 fields.I'm sending 60 field values.In that 6 field valuse
-
SPD Workflow Task Process Action - Cancel on first rejection
I have a task process action that sends a task to some managers (in paralell). I want this task process to end if any of these persons rejects the task. This was possible in SPD 2010 wf, but i can not find any reference on how to manage this in a 201