Getting List of Items in current container
Hi all,
I'm having another templating problem. I want to get all the items in my region, in order. I had been trying to use JHS.current.itemRegion.items, but that resloves to getItems(), which returns a Map keyed by item name. Order is important (and especially the ability to retrieve an item based on its index in the item region), so I looked for a method that looks like it returns a list of items.
The one I found was items(String filter). Unfortunately, I have no idea what "filter" means in this context. I tried passing in "*", but the method threw an exception. The Javadoc for the method is just a stub.
Can anyone help me figure out how to get all the items in the current itemRegion, in the order in which they appear in the application definition?
Thanks much,
Avrom
Message was edited by:
Avrom
Changed subject to be more appropriate
Avrom,
Try JHS.current.itemRegion.items.valuesAsList()
Steven Davelaar,
JHeadstart team.
Similar Messages
-
How to get list of orders for current date.
Hi,
My requirement is to get list of orders for the date on which order was created such that I don't have to change the date in my application.
Every time I run my application it should generate orders created on that current date without manually giving current date.
This has to be done directly using BAPI and without creating a RFC.
I tried with bapi " BAPI_ALM_ORDERHEAD_GET_LIST " using parameter OPTIONS_FOR_START_DATE but there I can't enter sy-datum and hence, every time I hence to change the date.
Please tell me if there is any possible way to get fulfil above requirement.
Thanks.
Shilpi Agarwal.Hi Shilpi,
This looks simple to me.
Just create a variant in IW38 with U_your UserId as shown in the picture (Dynamic date selection for Created On set to Current Date)
The status settings obviously would be
Jogeswara Rao K -
How to get list of fonts on current system(forms6i)
Does anyone know how to get list of all available fonts on system. I want to add available fonts to list item (forms 6i) dinamicaly.
depending on what exactly you want to know:
System.getProperty("java.version")
System.getProperty("java.vendor")
System.getProperty("java.vm.version")
System.getProperty("java.vm.vendor")
System.getProperty("java.vm.name")
Nick. -
Getting list of items from one table indirectly associated with another
I have a database containing 3 tables. One is a list of employees, one is a list of companies that are clients and another is the projects each employee is working on. The projects table is the only connection between the employee and the company. An employee is working on a project for a specific company. I need to find a list of companies someone is working for given the employee's ID. How would I do this? I've done direct queries before, but never anything that involves going through another table. I have an explanation of my tables below.
Employee ------------- Project ----------- Company
Name ------------------ Name --------------- Name
ID -------------------> EmployeeID
------------------------ CompanyID ----------> IDI did something like this..It works for MS Access 2000 but not SQL Server 2000. (http://forum.java.sun.com/thread.jsp?forum=48&thread=270102)
What I have is one main table, joined to 3 other tables, and each one of them have one category in common, and they are in a many-to-one relationship with the main table.
The Function category in the main table is the same as the Function_Name category in the others
For ex)
Main Table
Function Description Context Actions Notes
sample blah blah blah blah
Table 1
Function_Name ArgName ID
sample x 1
sample y 2
Table 2
Function_Name Return_Codes ID
sample z 1
sample m 2
sample n 3
Table 3
Function_Name Function_Called ID
sample t 1
What i needed to do was retrieve all these records from the different tables if I only had the value to the Name field.
This is the code I used:
<code>
String dataSourceName = "<fill in your dataSourceName>";
String dbURL = "jdbc:odbc:" + dataSourceName;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch (Exception e){System.out.println("Couldn't connect to driver.");}
try{
Connection con = DriverManager.getConnection(dbURL, "","");
Statement stmt = con.createStatement();
//gui3.staticName is the data in the Function or Function_Name Field
ResultSet result = stmt.executeQuery("SELECT * FROM function_description WHERE (((Function)='"+ gui3.staticName + "'));");
while(result.next()){
function.setText(result.getString("Function"));
description.setText(result.getString("Description"));
notes.setText(result.getString("Notes"));
actions.setText(result.getString("Actions"));
context.setText(result.getString("Context"));
ResultSet result2 = stmt.executeQuery("SELECT Return_Codes FROM return_code_description WHERE (((Function_Name)='"+ gui3.staticName + "')) ORDER BY Return_Codes ASC;");
while(result2.next()){
rCodes.addElement(result2.getString("Return_Codes"));
ResultSet result3 = stmt.executeQuery("SELECT ArgName FROM Arg WHERE (((Function_Name)='"+ gui3.staticName + "')) ORDER BY ArgName ASC;");
while(result3.next()){
args.addElement(result3.getString("ArgName"));
ResultSet result4 = stmt.executeQuery("SELECT Function_Called FROM Function_Called WHERE (((Function_Name) = '"+ gui3.staticName + "')) ORDER BY Function_Called ASC;");
while (result4.next()){
fcall.addElement(result4.getString("Function_Called"));
}catch (SQLException e) {System.out.println(e.getMessage());}
</code>
So when you get the ID can't you Select the data from the products table that matches it, and then take the Name field for that and search for it in the Company table? I think you can do embedded search statements. another way would be
Select <blah>
while(result.next)
Select <blah>
hope this helps -
When I use firefox to go to american express website instead of images I get following
Skip to main content
American Express Logo - link to home
My Account
You are under My Account tab
Card Accounts
Account Home
Statements & Activity
Make a Payment
Profile & Preferences
Card Benefits
Business Accounts
OPEN Small Business
Online Merchant Services
Merchant Site
American Express @ Work
Other Accounts
Savings Accounts and CDs
Membership Rewards® Point Summary
Credit Secure
ID Protect
Bluebird Checking & Debit Alternative'''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
''(If you're not using it, switch to the Default theme.)''
* You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
* Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
''Once you get the pop-up, just select "'Start in Safe Mode"''
'''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.'' -
How to Get List Item in Custom Context Menu?
Hi,
I got this code from the net.
<CustomAction Id="SPTest.CustomMenuItem.ButtonClicked"
RegistrationType="ContentType"
RegistrationId="0x0101"
Location="EditControlBlock"
ImageUrl="/_layouts/IMAGES/DOCLINK.GIF"
Sequence="600"
Title="Click Me!"
Description="Shows an alert message for this content type."
>
<UrlAction Url="javascript:alert('Hello World!');" />
</CustomAction>
It creates a custom context menu. How can i get the selected item using that code..
Sorry for the tons of question. SharePoint newbie here (5 weeks in SP), Hehhehe!If you can redirect your request on context.....you can try this line of code
<UrlActionUrl=”~site/_layouts/ItemAudit.aspx?ID={ItemId}&List={ListId}”/>
The Idea is to send in query string parameter and get the ItemID in the Pageload Event of the page you want to redirect to.
Other tokens that are available
Token
Replaced By
~site/
SPContext.Current.Web.ServerRelativeUrl
~sitecollection/
SPContext.Current.Site.ServerRelativeUrl
{ItemId}
item.ID.ToString()
{ItemUrl}
item.Url
{SiteUrl}
web.Url
{ListId}
list.ID.ToString(“B”)
{RecurrenceId}
item.RecurrenceID
Srikant N , MCPD SharePoint Developer 2010 -
Get list items using spservices for sharepoint 2013
Hi,
I have a requirement like below.
I have 2 sharepoint custom list with some columns.
List1:listA
List2:listB
Now when i open the listB new item form i want some of the field values from listA should auto populate in Textboxes of listB new form.
Is there any ways to implement this?
Regards,
PooviHi Poovi,
You can achieve this using jQuery to get the SharePoint list items. Refer the below articles. It has explained how to get list items using jQuery and auto populate a text-box from a list item as a source.
You can put this code in list forms through SharePoint Designer. The articles explain about auto populating text box of web part but similarly you can implement it for list form, because nevertheless the text boxes are same.
http://www.c-sharpcorner.com/UploadFile/sagarp/sharepoint-2010-jquery-autocomplete-textbox-containing-list/
http://tomvangaever.be/blogv2/2011/07/sharepoint-2010-autocomplete-with-list-items/
Please remember to click 'Mark as Answer' if the reply answers your query or 'Upvote' if it helps you. -
It's telling me "Item is currently being modified. Please try again later." Its really starting to make me mad; Is there any way to get rid of that message?
PS. The reason I'm downloading directly from the iPod is because the laptop that had my iPod synched to it crashed and the recovery disk didn't fix it. I don't wanna lose all my songs. :/If it says it is temporarily being modified than you should wait until tomorrow or later tonight. If it keeps happening, try downloading something else. If it has the same message, it is probably a problem with iTunes on your iPod. If it downloads regularly, there must just be a problem with the album.
-
Getting list of document name in a container
Hi,
I am trying to get list of all document names in a container using the following code in PHP:
http://dpaste.com/25409/
but I am getting an error as listed in the above link.
Any idea? I searched on Google but couldnt get any definitive answer.
Thanks.Hello,
Try:
for $doc in collection() return dbxml:metadata('dbxml:name',$doc)
Regards,
George -
How do I get a longer list of items in the history window - and not have to click "Show All History"? The default list is too short.
Well I figured it out… all you do say show commands :-/
-
Query to get objects list for which the current user has 'SELECT' privilege
Hi,
I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views. The privilege information for the current user is scattered in more than one system views. I have following system views
USER_TAB_PRIVS_RECD - Object grants for which the current user is the grantee
ROLE_TAB_PRIVS - describes table privileges granted to roles. Information is provided only about roles to which the user has access.
If the object privilege is granted explicitly like "GRANT ALL ON TABLE_NAME TO "USERNAME" then this privilege entry goes to USER_TAB_PRIVIS_RECD
If the object privilege is granted by ROLE. Role is created with certain object privileges. this role is assigned to user "GRANT ROLE_NAME TO "USERNAME"", then this entry goes to ROLE_TAB_PRIVS
From these findings, I have composed below query
(SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT')
Have I got user's all prvilege details? should I look some other system views?
How to exclude system table privileges details?
(SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT' AND OWNER NOT IN ('SYS','SYSTEM') Is this right?
What about Public role in Oracle? Should I consider public role here?
Oracel Version :11g
I want make this query to work on Oracle 8i or above version
Thanks>
I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views.
>
You will need a hierarchical query to do that.
Try this script for Listing privileges recursively for Oracle users
http://www.adp-gmbh.ch/ora/misc/recursively_list_privilege.html -
How to get List Item attachments name without write any custom code or any database query?
Hi,
How to get List Items attachments name without write any custom code or any database query?You can get it from Rest,
There are 2 options,
1) create a 'Result Source' which has a search query for that List which has attachments
- Use rest query to get the 'Filename' , it will have the attachment file name
For example, if the result source id is : 73e6b573-abf8-4407-9e5f-8a85a4a95159 , then the query will be
http://[site URL]/_api/search/query?querytext='*'&selectproperties='Title,Path,FileExtension,SecondaryFileExtension,Filename'&sourceid='73e6b573-abf8-4407-9e5f-8a85a4a95159'&startrow=0&rowLimit=100
You can refine the query, be giving proper 'querytext'
2) Use the List rest api
For example if your list guid is :38d524a1-e95c-439f-befd-9ede6ecd242e
You can get he attachments for 1st item using this
http://[Site URL]/_api/lists(guid'38d524a1-e95c-439f-befd-9ede6ecd242e')/items(1)/AttachmentFiles
get2pallav
Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you. -
I want to get List of all active sessions in current system
Hi experts
How to get list of all active sessions in current system in any internal table along with details.
A sample code wud be helpful
Thanks in advance.try this code it might help u.
Below report execution gets the active Session list to ABAP memory
submit rsm04000_alv and return exporting list to memory.
refresh: gt_listobj.
Below FM get the List output from ABAP memory to gt_listobj in HEX
call function 'LIST_FROM_MEMORY'
tables
listobject = gt_listobj
exceptions
not_found = 1
others = 2.
if sy-subrc <> 0. " Executed successfully ?
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
This FM converts ITAB gt_listobj from HEX to ASCII
call function 'LIST_TO_ASCI'
tables
listasci = it_list
listobject = gt_listobj
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
if sy-subrc <> 0. " Executed successfully ?
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
This Shows the output in List format on screen
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_structure_name = 'line'
tables
t_outtab = it_list
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0. " Executed successfully ?
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif. -
FMs to get the order items list for an order template
Hello everyone,
I'm looking for sap FMs (or tables) to get the order items list for a given order template in CRM backend. Any advice/suggestions?
Thanks, JinHello Jin,
Function module CRM_ORDER_READ with either the Header GUID will give you everything about the order and you can optimize the call by limiting the sets you want to get in the export tables.
The item list (administration data) can be from ET_ORDERADM_I and the details about the products can be found from ET_PRODUCT_I
FYI, this will work for any transaction - Order, Quotation and of course Order Templates too.
Easwar Ram
http://www.parxlns.com -
How to get list of company codes with current period not opened?
Hi,
How to get list of company codes with current period not opened?
Is there any way we can check whether the current period is opened for all company codes.
If not how, can we generate a report which having information of period and company code. Also please tell me, which table will have info on posting periods and company codes.
Thanks
Vineeth VargheseHi,
The MM periods details can be viewed In Table MARV . On the selection screen you have the option of entering the company codes , current period, year current period etc. so make the required entries and you get the all details relevant to MM periods. Also it can be downloaded as a report.Thanks
Maybe you are looking for
-
Help : Complex parameter and return value in WebService?
Hi guys These days, I publish a WebService, in it there is an operation like this: List search(List para); in this operation, parameter "para" is a java.util.List, which contains many elements, every element is an instance of customizing cla
-
I've search the entire SDN, there seem to be no one with real answere to this: -After I generated the COPA Datasource (account base), on the BW side, you replicate, create infosource and eventualy create a COPA cube. The problem is this; the cube has
-
Droplet to send images to Image Processor from Mac Finder?
Is there a way to create droplet that will just send whatever images you drop on it to the Photoshop Image Processor script? Basically the same thing that happens when you select images from Bridge and select Image Processor from the Tools > Photosho
-
How do I adjust the settings to get this Netgear server to show and use the Airport Extreme and show up on the hardware of the McPro?
-
WRT54GP2 security settings for a HP Ipaq 111 handheld
I have a home wireless network, using a Linksys WRT54GP2 wireless router. I'm trying to secure the network, with has 3 wireless systems, my home PC, a notebook, and my Ipaq 111. I can get my home PC and the notebook to work when I setup the WRT54GP2