Populating List Item From View
I have two data blocks in my form, one named USERS which contains updateable fields to a table from the view and another data block called CONTROL which are all list items that currently populate on a WHEN-MOUSE-CLICK trigger. The list items work as expected for the WHEN-MOUSE-CLICK trigger. However, my problem is trying to populate the list items based on a selection previously chosen and saved to the table (yes, the values are in the table and are selectable through the view). I have a seperate population for this occurrance in the WHEN-NEW-FORM-INSTANCE at the form level, as well as on KEY-SCRUP, KEY-SCRDOWN, WHEN-NEW-RECORD-INSTANCE, and POST-QUERY at the USERS data block level. The only way the list items populate on a previously chosen and saved value is if you choose (WHEN-MOUSE-CLICK trigger) the list of values and save. From then on, as I scroll through the data retrieved in the USERS data block the corresponding data in the users view shows up in the CONTROL block list items. How do I get my form to initially show the corresponding list item data on form load when it is already in a WHEN-NEW-FORM-INSTANCE and POST-QUERY trigger on form load?
Thanks in advance for any clue to point me in the right direction.
Kyle
Edited by: Kyle Miller on Sep 29, 2008 3:09 PM
The form is for editing a current student information system user who we will be extracting data for an OBIEE IDM import. All of the fields displayed in the OBIEE_USERS data block can be edited. For the CONTROL block list items I would like them to display the current value chosen for the user displayed in the OBIEE_USERS data block. When the CONTROL block list items are clicked on then a list of values are displayed in which the logged in form user can chose another value which ultimately changes the choice for the user displayed in the OBIEE_USERS data block. This all works fine in my current form except the list items do not display the current user selected in the OBIEE_USERS data block's saved value until the list item is selected, a value chosen, and a save is committed to the table tied to the OBIEE_USERS data block. From that point I can scroll through the OBIEE_USERS block and the list item displays the correct value for the selected user, if there are values (some users have NULL values). I have currently worked around this issue by displaying the fields in the OBIEE_USERS block and only use the list items for the changing selection. I did this because I needed a proof of concept for the pilot roll-out and could no longer wait to figure this issue out (it should be more simple it seems). I am still interested in resolving this as I feel it is a great functionality for the form.
Similar Messages
-
Populating List item on condition.
-- I am populating List item based on the Record Group.
i.e: select casenature,to_char(casenaturecode) from casenature.
-- But when i restrict to display associated record with of another field.
i.e : select casenature,to_char(casenaturecode) from casenature
where casenamecode = :cases.case_namecode
-- it does not display any record in the list item
Plz, help me in this regard.
Thanks in advance.This is a "standard" lookup:
Create a non-database-item in your databaseblock with the datatype and length of the text to be shown (casenature). I assume that there is a casenaturecode-item in your databaseblock which is populated from the database.
Create a POST-QUERY-trigger on your block and read the value from the database:
DECLARE
CURSOR cr IS
SELECT CASENATURE
FROM THETABLE
WHERE CASENATURECODE=:BLOCK.CASENATURECODE;
BEGIN
OPEN cr;
FETCh cr INTO :BLOCK.THE_NEW_TEXT_ITEM;
CLOSE cr;
END;
-- Mark record as valid
SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_BLOCK, :SYSTEM.TRIGGER_RECORD, STATUS, QUERY_STATUS);Create an Lov conatining both casenaturecode and casenature, set length of casenaturecode to 0, assign the lov to the new textfield and set "Use Lov For Validation"="Yes" for the textfield. -
How to copy List item from one list to another using SPD workflow using HTTP call web service
Hi,
How to copy List item from one list to another using SPD workflow using HTTP call web service.
Both the Lists are in different Web applications.
Regards, Shreyas R SHi Shreyas,
From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
So I recommend to achieve this goal programmatically.
More references:
https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
Thanks,
Victoria
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
HI !
I want to populate List item , from table using SQL query,
e.g. select * from dept_name,dept_no from dept; and want to save deptid. i.e list item disply only dept_name and store/save dept_id as it is foreign key.
Thanks & Regards !Hi !
I have adopted this technique.
I have made function combo_population :
PROCEDURE COMBO_POPULATION(COMBO_NAME VARCHAR2, COMBO_LIST VARCHAR2)
IS
rg_num number;
BEGIN
rg_num := populate_group(combo_name);
populate_list(combo_list, combo_name);
END;
I create record group dept_rg (select deptname,to_char(deptid) from dept)
And i called function at when-new-form-instance
combo_population('dept_rg','emp.empdepart');
It works very well only it shows list of department Name, and save department id only.(noted that, on form the list item is deptid and only change its type to varchar2 then above function works well).
Regards! -
Retrieving list items from a specific view using CSOM
How can I query a specific view of a SharePoint List using the C# CSOM? I am dealing with SharePoint Online, so the only option is to use SharePoint.Client.
I have done this using Javascript, and I know how to do this with SharePoint On-Premises, but I haven't found a way to do with for SharePoint online using C#.hi Dkhouri,
thanks for posting your issue, you can create a specific view of a list using CSOM and C#.
Kindly find the code snippet below fort he same.
Code for CSOM :-
// Starting with ClientContext, the constructor requires a URL to the
// server running SharePoint.
ClientContext context = new ClientContext("http:SiteUrl");
// Assume the web has a list named "Announcements".
List announcementsList = context.Web.Lists.GetByTitle("Announcements");
// This creates a CamlQuery that has a RowLimit of 100, and also specifies Scope="RecursiveAll"
// so that it grabs all list items, regardless of the folder they are in.
CamlQuery query = CamlQuery.CreateAllItemsQuery(100);
ListItemCollection items = announcementsList.GetItems(query);
// Retrieve all items in the ListItemCollection from List.GetItems(Query).
context.Load(items);
context.ExecuteQuery();
foreach (ListItem listItem in items)
// We have all the list item data. For example, Title.
label1.Text = label1.Text + ", " + listItem["Title"];
For C#
public CamlQuery CreateInventoryQuery(string searchSku)
var qry = new CamlQuery();
qry.ViewXml =
@"<View>
<Query>
<Where>
<BeginsWith>
<FieldRef Name='SKU' />
<Value Type='Text'>" + searchSku + @"</Value>
</BeginsWith>
</Where>
</Query>
</View>";
return qry;
Also, checkout below mentioned URLs for more details
http://www.c-sharpcorner.com/UploadFile/sagarp/sharepoint-2013-caml-query-for-item-id-with-jquery/
http://msdn.microsoft.com/en-us/library/ff798388.aspx
I hope this is helpful to you, mark it as Helpful.
If this works, Please mark it as Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog : http://sharepoint-community.net/profile/DharmendraSingh -
Populating list item with a record group
I'm trying to populate a list item (TList) with a Record group with a simple query: SELECT FRM_NAME FROM FORM
In the forms WHEN_VALIDATE_NEW_FORM trigger, I use POPULATE_LIST('FORM_LIST', 'RG_FORM_LIST');
Am I missing something? I get the error FRM-41334: Invalid record group for list population.thanks, i've tried that, but still nothing. I must be doing something simple, but very wrong. I tried with oracle's default scott/tiger schema, created a simple form with a record group with 2 columns, and populating a manually made poplist (populate_list('LIST4', 'RG1'); Still get errors:
FRM-30191: No list items defined for required poplist.
List LIST4
Item: LIST4
Block: EMP
Form: MODULE5
FRM-30085: Unable to adjust form for output. -
Open references of other list items from a list item in the same window or tab
Hi there,
We have migrated from lotus notes to sharepoint. We have converted the lotus notes forms to sharepoint forms. Basically the list items are pages and there are links of other pages in a page.
My problem is I want to open the other pages in the same tab or window and not in a separate window.(currently the links open in a separate window which is not the requirement.)
In terms of sharepoint I would say,
I have references(links) to other list items of the list in a single list item. I want to open the other list items in the same window (tab).
How can we achieve this?? If possible without much codes??
Please suggest.
Any help will be highly appreciated.
Thanks in advanceSee:
*http://kb.mozillazine.org/browser.link.open_newwindow
*1: current tab; 2:new window; 3:new tab;
For links opened via JavaScript you can look at this pref:
*http://kb.mozillazine.org/browser.link.open_newwindow.restriction
You can open the <b>about:config</b> page via the location/address bar.
You can accept the warning and click "I'll be careful" to continue.
*http://kb.mozillazine.org/about:config -
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 ... -
hi,
I have created a custom list in my sharepoint :
List1 name: employeedepartment -
Title empdepartment
A D1
B D2
C D3
List2 name: employeedetails
emptitle empname empdepartment(lookup) --> from the list "employeedepartment"
x Ram D1
y Robert D2
z Rahim D3
My task is to create a custom webpart that will be for searching this employee details by entering emptitle
For this, i have created a visual webpart using visual studio 2010, my webpart will be like this:
emptitle ---> TextBox1 Button1--> Text property : Search
empname---> TextBox2
empdepartment--> DropDownList1
For this, i wrote the code as follows:
protected void Button1_Click(object sender, EventArgs e)
using (SPSite mysite = new SPSite(SPContext.Current.Site.Url))
using (SPWeb myweb = mysite.OpenWeb())
SPList mylist = myweb.Lists["employeedetails"];
SPQuery query = new SPQuery();
query.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + TextBox1.Text.ToString() + "</Value></Eq></Where>";
SPListItemCollection myitems = mylist.GetItems(query);
if (myitems.Count > 0)
foreach (SPListItem item in myitems)
string a1 = Convert.ToString(item["empname"]);
string a2 = Convert.ToString(item["empdepartment"]);
TextBox2.Text = a1; // displaying properly
//DropDownList3.SelectedIndex = 1;
It is showing the list item in textbox according to the item entered in the textbox1... But I am stuck to show in the dropdown list.
Suppose, if i enter X in textbox and click on search, then dropdownlist need to show D1,
for Y --> D2 and for Z-> D3... like that.
What code do i need to write in the button_click to show this...
Please don't give any links...i just want code in continuation to my code.Hi,
Since you have got the data you want with the help of SharePoint Object Model, then you can focus on how to populate values and set an option selected in the Drop Down List.
With the retrieved data, you can populate them into the Drop Down List firstly, then set a specific option selected.
Here is a link will show how to populate DropDownList control:
http://www.dotnetfunda.com/articles/show/30/several-ways-to-populate-dropdownlist-controls
Another link about select an item in DropDownList:
http://techbrij.com/select-item-aspdotnet-dropdownlist-programmatically
Best regards
Patrick Liang
TechNet Community Support -
Populating menu items from the database...is it possible?
hi
using :forms 10g
we have a requirement in forms where we need to populate the menu items from the database.first we used hiearchial tree where it was possible.but since the requirement changed i am not sure that whether the menu items can be populated by data from the database...will be glad if someone could throw some light on this issue...
thanksYou could always do it but would need to put a fix limit on the number of menu items.
For example you could create a set of menu items at design time with the visible property set to False.
While reading the database, you then set them to True while setting the label to whatever you require.
But it all depends also on what you want your menu items to do when selected. -
Read MicroFeed List Items from Office 365/SP online site
Hi all:
We have got a publishing site with Site Feed feature enabled. We are using Site Feed web part and everything gets stored in MicroFeed list.
There is a requirement to read all the items in MicroFeed list using .Net CSOM and also identify the associated attachments. When I try to read items from the list, I can get only get the top level item with a funny guid. The guid relates to the guid of
the web part where users are posting their stuffs. That top level item stores all other posts as its children, which I really need to access. How can I do that ?
Thanks and regards,
D_MOK so I found out that you can read MicroFeed items using SocialFeed class. Here is the link :
http://msdn.microsoft.com/en-us/library/office/jj163237.aspx -
Problem Populating Image Item From Database
Hi All,
I am using Oracle 9i & Forms 6i on Windows platform & working in client/server model. I created a form in which, I am reading an image file from the file system & then saving it into the database. In the Databse, i created the column as BLOB. But, when I query, this does not retrive the saved image in Image Item. But image is actually saved. When I tried, changing the database column to LONG RAW, it is working. I mean its reading the image in the image item from the database.
Can anyone pls tell me, is there any problem like this, as we can retrive from LONG RAW but not from BLOB, or I am missin something here.
RegardsHi,
I use Forms 6i to save and retrieve image in BLOB column without problems.
Some weeks ago, my column was long raw and I update it without problems. Nothing to do in Forms and juste modifiy query and recompile in Reports. -
Automatically create Sub site With the Name of List Item from the list of parent site ,
Hi all
I am using Share Point 2010 And
I have one task That is create new sub site automatically with the name of list item which I Am added in main site List
for Example: I have a list name "Projects" in my main site I am going to add new project as a item ,with that project name i want a new sub site will create automatically .Is there any work flow or any setup
or any feature please help me by giving guidance
Thanking You,
Arun Darly.you can use ECMA script.
For adding a list item.
http://adicodes.com/add-update-and-delete-list-items-using-ecmascript/
Once the item has been added, on success function create a sub site
http://withinsharepoint.com/archives/285
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful -
How to get list item from LongListSelector
I have a list item in LongListSelector like this:
Now when i tap on the app button so I will have the list of item in the LongList where check box value is true
Any help or advice ?Add a property to the class the long list selector is bound to for the checkbox. Loop through the items in the data source and use the new property to tell what is checked
-
Populating Menu Items From the DataBase
Using 10g
hi
is it possible to populate the menu items from the database using procedure?since our project is multilingual we have such a requirement..could someone throw some light on this?Hi ,
Here is what you asked for.....
PROCEDURE PRC_SET_MENUITEMS_ENABLED
IS
USERNAME_VAR PROSOPIKO.DBUSERNAME%TYPE;
MENU_NAME_VAR MENUS_MODULES.MENU_NAME%TYPE;
MENU_ID MENUITEM;
BEGIN
:SYSTEM.MESSAGE_LEVEL:='25';
USERNAME_VAR:=FNC_GET_USERNAME;
FOR z in (SELECT /*+LEADING(D C B A) index (A menu_modules_ind) index (D PROSOPIKO_AM_PRIMARY)*/
DISTINCT MENU_NAME
FROM MENUS_MODULES A, TASKS_MODULES B , TASKS_ROLE C ,PROSOPIKO D
WHERE A.CODE_MODULE=B.CODE_MODULE AND B.CODE_TASK=C.CODE_TASK
AND C.CODE_ROLE=D.CODE_ROLE AND D.DBUSERNAME=USERNAME_VAR
AND CODE_ORG_MONADA=:GLOBAL.CODE_TMHMA_VAR)
LOOP
MENU_ID:=FIND_MENU_ITEM(Z.MENU_NAME);
SET_MENU_ITEM_PROPERTY(MENU_ID,ENABLED,PROPERTY_TRUE);
NEXT_RECORD;
END LOOP;
END; Regards ,
Simon
Maybe you are looking for
-
I cannot send email over 3G. receiving email over 3G is ok. Using wifi from my landline (glass) is ok. No idea where to find the solution. Suggestions please. Thanks i.a. TheOne
-
Travel adapter pack and Macbook
I'm upgrading to a Macbook and I travel a lot. There is a list of Macs/iPods that are compatable with Apple's 'world wide travel kit' - the MB 'pro' is listed, but the MB is not listed - is this an oversight. Can, or can I not use it? Powerbook Mac
-
Km component portal runtime error
hi i am creating a simple km application to create a folder using km api when i run the application it is displaying runtime error in the portal any help on this here is the trace . [EXCEPTION] #1#com.sapportals.portal.prt.component.PortalComponent
-
Do we have Table compression in Standard Edition
Hi, We installed Oracle Version 11g(11.2.0.2) in our Local server and the size of the table is around 11GB. we thought of doing Table Compression. My Question is Are we having This feature in 11g Standard Edition? Thanks, Lakshmikanth
-
Frm-92101 getting error when running form using webutil
hi I get an error FRM-92101:There was a failure in the Forms Server during startup. This could happen due to invalid configuration. Please look into the web-server log file for details i am using form version Forms [32 Bit] Version 10.1.2.0.2 (Produc