Query to retrieve the 'My Favorites' sub folder names from InfoView

Please help me with the query which can get all the folder names present in 'My Favorites' in the InfoView, and also query to get all the folder names in 'Public Folders' for the current user?
Thanks

To get all the folders under Public Folders accessible by current user:
1. Logon as that user.
2. Run the query: select * from ci_infoobjects where si_kind='folder' and si_parentid=0; This only returns the top level folders. To get the subfolders within these folders, you need to make a recursive call changing si_parentid. Si_parentid=0 stands for root, change it with SI_ID of folder for which you are trying to find subfolders. To run the query and get results the user may need some access at the root level ( not granted for a general user by default, granted only for administrator)
The folders or objects listed under My Favorites are contents of a user's favorite or personal folder and a user should have full access to it by default. To retrieve contents of that:
select si_id from ci_infoobjects where si_kind='favoritesfolder' and si_name='<user name>' which will give a User's favorite folder and SI_ID of it.
then call:
Select * from ci_infoobjects where si_parentid=<SI_ID obtained from previous query>
will list all the top level objects, folders in a user's favorite folder.

Similar Messages

  • Query to retrieve the number of transactions done in every 1 hour for last

    Hi,
    Could anyone help in writing a query to retrieve the number of transactions done in every 1 hour for last month.
    Case:
    I/P
    Cases Timestamp1
    case1 01-01-2008 00:00:01
    case2 01-01-2008 00:01:01
    case3 01-01-2008 01:00:01
    case1 01-01-2008 01:02:01
    case4 01-01-2008 01:10:01
    case5 02-01-2008 02:00:01
    case6 02-01-2008 02:10:01
    case7 02-01-2008 23:00:01
    case.. 31-01-2008 24:00:00
    O/P
    from time to_time cases
    01-01-2008 00:00:00 01-01-2008 01:00:00 2
    01-01-2008 01:00:01 01-01-2008 02:00:00 3
    etc
    Any help really appreciated

    We can do this using analytical functions
    Following is what I did:
    create table timestamp1 (ts date)
    select *from timestamp1
    30/10/2008 15:41:13
    30/10/2008 15:41:05
    30/10/2008 15:40:03
    30/10/2008 14:58:26
    30/10/2008 14:29:45
    30/10/2008 13:17:48
    30/10/2008 08:29:50
    30/10/2008 06:05:51
    30/10/2008 03:41:52
    30/10/2008 02:29:54
    select distinct to_char(ts,'hh24') frmhrs,
    to_char(ts,'hh24')+1 tohrs, count(ts) OVER (order by to_number(to_char(ts,'hh24')) RANGE (1/24) PRECEDING )
    from timestamp1
    where trunc(ts)=trunc(sysdate) -- I added this just to make sure I get for today's data
    order by frmhrs
    FRMHRS     TOHRS     CNT
    02     3     1
    03     4     1
    06     7     1
    08     9     1
    13     14     1
    14     15     2
    15     16     3
    You can customizeas per ur need.

  • RQL Query to get the specific range of product items from product catalog.

    Hi All,
    I need to do the batch wise query to product catalog.
    For that i have use Query builder but that is giving me repeated items, now i wanted to use RQL using rqlStatement.
    Please help me in solving the issue.
    Query which i have used using QueryBuilder.
                    RepositoryView productView = productRepo.getView("product");          
                    QueryBuilder productBuilder = productView.getQueryBuilder();
                    Query productQuery = productBuilder.createUnconstrainedQuery();           
                    RepositoryItems[] productItems = productView.executeQuery(productQuery,startIndex,endIndex);
    Can anybody help me in writing RQL Query to get the specific range of product items from product catalog.

    Hi Shakuntala,
    There is no executeQuery method defined in RqlStatement Interface, which will accept index for output result.
    So As far as I know, what u are trying to achieve is not possible with RQL statements OOTB way.U can consider range of results based on some condition from Repository items.
    Please let me know if u find any way to implement it.
    Above Query builder should always return different ids if range is not overlapping with previous range.
    Please verify that repeated items ids are same or different,
    Quoting from API docs:
    RepositoryItem[] executeQuery(Query pQuery,
                                  int pStartingIndex,
                                  int pEndingIndex)
                                  throws RepositoryException
        Executes the given query and returns an array of matching RepositoryItems, which are contained within a total potential result set. For example used if one wanted to retrieve elements 50-60 from a query which could return 100 elements.
    Regards,
    Nitin.

  • Offline Folder can not chaange the letter of a file name from capital to lowercase

    Dear Expert,
    we deploy the offline folder to end users, there is a strange issue happened now, if user tries to change the letter of a file name from capital to lowercase, the system will show "You need permission to perform this aciton". But other actions
    are fine, like, create, delete, rename, etc.

    Hi,
    Please check if the offline folder is made available offline to end users. The Offline Files feature uses the client-side cache (CSC) database.  When the files are made available offline, the CSC database prevents users from changing the case of file
    names.
    For more detailed information, please refer to the article below:
    You cannot rename files by using different case when the files are made available offline in Windows Vista or in Windows 7
    http://support.microsoft.com/kb/953945/en-us
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • The specified file or folder name is too long,the url path for all files and folders

    The specified file or folder name is too long,the url path for all files and folders must be 260 character or less
    can we increase this limit?
    MCTS,ITIL

    Hi,
    As I understand, you want to increase the length of URL path in SharePoint 2010.
    Per my knowledge, this limit cannot be increased. SharePoint limits URL length because all relative URL links are stored in the clear forms on the SharePoint content DB and often this links are used as primary keys to link one table with another. Fields
    which are used to store these links (for instance tp_DirName from the AllUserData table) allow storing only 256 characters.
    There are several ways that you can resolve or mitigate URL length problems in the SharePoint Server 2010 environment. The following list provides suggestions:
    1. Upgrade all the end-user browsers to Internet Explorer 8, which has a longer URL length limit.
    2. Use shorter names for sites, folders, and documents and control the depth of the site and folder structures to reduce the lengths of URLs.
    3. If possible or allowed, use ASCII names for sites, folders, and documents. This will avoid situations where the URL will be lengthened by being encoded.
    4. To reduce the risk that the SharePoint Server 2010 end-users will encounter problems because of URL length limitations, we recommend that you apply the following effective limits in the deployment:
    256 Unicode (UTF-16) Code units - the effective file path length limitation, including a domain/server name
    128 Unicode (UTF-16) Code units - the path component length limitation
    More reference:
    http://technet.microsoft.com/en-us/library/ff919564(v=office.14).aspx
    http://sharepointknowledgebase.blogspot.in/2013/04/url-path-length-restrictions-in.html#.VKJN53BJA
    Best regards,
    Sara Fan

  • Event Receiver to get folder Names from List View Web Part

    Hi,
    We have a requirement i.e.
    On one of the page,there are some folders on the list view web part.
    Now through event receiver i should pick the folder names from list view web part and
    update the same in the list.
    If that names already exists in the list then we should leave without updating,if not we have to add folder name in the list.
    Please share your ideas regarding the same.
    Regards,
    Naga Sudheer M
    Thanks & Regards, Sudheer

    Hello,
    LVWP is just for displaying content of site so you need to associate your event receiver with actual list/library. You can create ItemAdded event receiver to check existing folder and create new if not existing. "sk2014" links are good to start.
    http://sharepoint.stackexchange.com/questions/59788/change-name-in-itemadding-event-receiver-or-create-a-new-item
    Let us know in case any doubt
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Set Folder Name From File Name Inclosed.

    Hello scripters,
    There has been quite a few topics about setting file names from parent folders. I believe it's possible but not sure how to reverse this process. That is to say set the folder name from a file in the folder. This is what I'm imagining.
    I've got a folder. In the folder are 100 folders with the names "untitled folder xxx" In side I've got files that are all named and numbered.
    For example,
    untitled folder/B-day 001~050.jpg
    untitled folder 50/At The Park 001~020.jpg
    I would like a script to change the name of the parent folder of the files that it houses.
    So untitled folder becomes
    B-Day
    untitled folder 50 becomes
    At The Park
    etc…
    I think getting the name of the first file (minus the index number) would be easiest.
    Any help or futher questions are greatly appreciated.
    Maximilian

    Working backwards...
    Assuming all the files have the same name structure (e.g. end in the format "xxx~xxx.jpg" you can get the base name using:
    <pre class=command>set baseName to characters 1 through -13 of filename as text</pre>
    This cuts off the last 12 characters of the file name.
    Once you have a folder, you can get the names of files in the folder via the Finder. for sanity's sake I'd ask the Finder for the first item, just in case there's more than one file:
    <pre class=command>set filname to name of first item of (files of folder theFolder)</pre>
    And if all the folders are in one top folder, you can iterate through them like:
    <pre class=command>repeat with eachFolder in (every folder of folder topFolder)</pre>
    So now, string it all together:
    <pre class=command>tell application "Finder" -- we'll use the Finder to do the legwork
    set topFolder to (choose folder with prompt "Choose the top level folder" ) -- get the top folder
    repeat with eachFolder in (every folder of folder topFolder)
    set fileName to name of first file of (files of folder topFolder)
    set baseName to characters 1 through -13 of fileName as text
    set name of folder eachFolder to baseName
    end repeat
    end tell</pre>
    Note there's no error checking - the script will fail if there are no files in any particular folder, but it should get you going.

  • How to get the last sub folder value from the string in Webi report

    I have an object coming from universe, this object will contain string e.g. \\Users\Public\Pictures\Sample\
    or    \\Users\Doc\BI\BO\Webi\
    I need the last sub folder from this path to be displayed i.e. Sample and Webi.
    I would like to know how it can be done.
    I tried using formulas like POS, SubStr and Length. however the issue is that the length of the the sting is not fixed and the number of "\" are also not fixed.
    I would appreciate any help regarding this.
    Regards,
    Yogesh

    Hi,
    What is the formula you have written though?.
    =length(right([folderpath]);pos([folderpath];"\")+1)
    Thanks,
    Jothi

  • SQL Query to retrieve the All records based on the Max Dates.

    Hello all,
    I am trying to retrieve the newest record based on the date field (  nextDate  ).
    Currently there are only 4 records in the MC_Maintenance table and two in the Machine table.
    Machine table
    MC_id             EquipID          
    1                      0227
    MC_id             EquipID
    2                     0228
    MC_Maintenance table
    Maint_id           MC_id             Next_maint                  
    1                      2                      08/25/2010     
    2                      2                      07/01/2010
    3                      1                      06/11/2010
    4                      1                      07/11/2010
    What I  am trying to accomplish is,
    list the two machines from the Machine table with the MAX(Next_maint) controlling the MC_Maintenance output list
    These are the records that I would like to Display.
    Maint_id           MC_id             Next_maint                  
    1                      2                      08/25/2010
    4                      1                      07/11/2010                 
    Below is the SQL Query
    SELECT
           MC.MC_ID as ID,
            MC.complete_Date as completed,
            MC.next_maint as nextDate,
            MC.maint_notes as Notes,
            MC.facility as Facility,
            M.EquipId,
            M.name as name,
            M.SerialNumber as SN,
            M.dept as dept,
            M.Freq as freq
            From  MC_Maintenance MC, Machine M
            where  MC.MC_ID =  M.MC_ID
    '           USING MAX(nextDate )
    Any ideas would help.
    TJ

    I would have thought that was a simple group by problem?
    SELECT M.EquipID, MC.MC_ID, Max(MC.next_maint)
    FROM MC_Maintenance MC INNER JOIN Machine M ON MC.MC_ID = M.MC_ID
    GROUP BY M.EquipID, MC.MC_ID

  • Query - Cannot Retrieve the Data / Result Set

    Hello,
    I'm trying to query a cube through the OLAP connection using Java and every time I try to execute a query an exception is thrown stating "Cannot retrieve the data set" or "Cannot retrieve the result set" depending on how I'm doing the query.  I've tried to execute the query both through the use of an IBIQuery and IBICommandProcessor object as well as directly through the IBIOlap connection via an MDX statement and both methods produce the same exception.  If anyone can shed some light on why exception is being thrown it would be greatly appreciated.

    please help me ... The question has nothing to do with 'getting' data from excel and certainly not with putting it into MySQL.
    The stack trace specifically tells you that your connection string is wrong.
    It also tells you which connection string is wrong.
    Which you can use to determine specifically which one is wrong. And which you did not provide that info to us.

  • Query to retrieve the records which have more than one assignment_id

    Hello,
    I am trying to write a query to retrieve all the records from the table per_all_assignments_f which has more than one different assignment_id for each person_id. Below is the query i have written but this retrieves the records even if a person_id has duplicate assignment_id's but i need records which have more than one assignement_id with no duplicates for each person_id
    select assignment_id ,person_id, assignment_id
    From per_all_assignments_f
    having count(assignment_id) >1
    group by person_id, assignment_id
    Thank You.
    PK

    Maybe something like this?
    select *
    From   per_all_assignments_f f1
    where  exists (select 1
                   from   per_all_assignments_f f2
                   where  f2.person_id = f1.person_id
                   and    f2.assignment_id != f1.assignment_id
                  );Edited by: SomeoneElse on May 7, 2010 2:23 PM
    (you can add a DISTINCT to the outer query if you need to)

  • Favorites iView Folder Name displayed

    For the Favorites iView from SAP, I am creating a new folder. It appears that the Favorites iView displays the folder description rather than the folder name in the iView when a description is added. However, if you do not type in a description, the folder name displays in the iview. Should it not always display the folder name? EP6 SP2 FP5

    I have two ways of looking at files in Finder. The first is a straight listing, the middle of the 3 boxes in the upper left corner of finder. Clicking on the gear, click show view options, and size is an option, check it.
    Another way is to click on the left box of the three, which shows icons for the files. Again, click the gear, click view options, and show item info. If a file is a movie, it shows the length, if it's a picture, it shows it's size. However, it doesn't show the size of a program module.

  • Retrieving the previous session fater coming back from  a different appserv

    Hi
    My requirement is given below .
    Currently I am in Application1 with session1 -now i went to Application2(different app server than application1) with session2 ....now i want to come back to Application1 with previous session i.e session1.is it possible to retrieve the old session using urlrewriting?? if yes then how??
    Regards
    Ravi

    Hmm,
    I don't think so, with URL re-writing. The reason is because application2 would need to do the re-writing, and so would need to know the JSESSIONID of session1, which presumably it wouldn't know.
    Options, I guess, would be to pass the JSESSIONID for session1 to application2, which stores it, then uses it to re-write the URL when coming back to application1. Or you could add a persistant cookie that stores the JSESSIONID from session1, then when you enter into application one, check for the cookie, and re-use the same session. You would want to double check your session timeout however, because the session may die if the user is in application2 for too long.

  • How to find list or folder name from SharePoint document URL

    I'm implementing the SharePoint client object model in my VSTO application in .NET framework 4.0(C#).
    Actually we open MS Word files from SharePoint site, we need to create a folder inside the opened documents list/folder and after it we want to upload/add some files to that created folder.
    My problem is that how to get list name/title and folder name of opened document by using the documents URL or Is there an another option to find the list or folder name of opened document.
    Any help will be appreciable.

    In document Library you can get the name of document library directly in URL. for folder name you can try below:
    using System;
    using Microsoft.SharePoint;
    namespace Test
    class ConsoleApp
    static void Main(string[] args)
    using (SPSite site = new SPSite("http://localhost"))
    using (SPWeb web = site.OpenWeb())
    if (web.DoesUserHavePermissions(SPBasePermissions.BrowseDirectories))
    // Get a folder by server-relative URL.
    string url = web.ServerRelativeUrl + "/shared documents/test folder";
    SPFolder folder = web.GetFolder(url);
    try
    // Get the folder's Guid.
    Guid id = folder.UniqueId;
    Console.WriteLine(id);
    // Get a folder by Guid.
    folder = web.GetFolder(id);
    url = folder.ServerRelativeUrl;
    Console.WriteLine(url);
    catch (System.IO.FileNotFoundException ex)
    Console.WriteLine(ex.Message);
    Console.ReadLine();
    http://msdn.microsoft.com/en-us/library/office/ms461676(v=office.15).aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/801d1a06-0c9b-429b-a848-dd6e24de8bb9/sharepoint-webservice-to-get-the-guid-of-the-folder?forum=sharepointdevelopmentlegacy
    You can also try below:
    http://blogs.msdn.com/b/crm/archive/2008/03/28/contextual-sharepoint-document-libraries-and-folders-with-microsoft-dynamics-crm.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d2d5d7cf-9bbd-4e0f-a772-ecdce4e6149f/how-to-fetch-document-guid-from-sharepoint-document-library-using-sharepoint-web-service?forum=sharepointdevelopmentlegacy
    http://stackoverflow.com/questions/2107716/how-to-get-guid-of-a-subfolder-in-a-document-library-programmatically

  • Change Document Library Folder Name from client (JavaScript (JSOM) or Rest)

    Hi
    According to :
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/23441a0d-022a-4d97-8058-b75f32e342d2/rest-api-to-rename-the-folder-move-folder-copy-folder-prog-lang-is-java?forum=sharepointdevelopment
    Renaming a folder with Rest is not possible.
    and based on:
    http://msdn.microsoft.com/en-us/library/office/jj245697(v=office.15).aspx
    name property doesn't have any set.
    Is it means that renaming a folder is not possible by JSOM or REST?!
    Regards

    Hi,
    The following JavaScript Client Object Model code for your reference:
    <script type="text/ecmascript">
    ExecuteOrDelayUntilScriptLoaded(UpdateListItem, "sp.js");
    function UpdateListItem(){
    var clientContext;
    var oWebsite;
    var oList;
    clientContext = new SP.ClientContext.get_current();
    oWebsite = clientContext.get_web();
    oList = oWebsite.get_lists().getByTitle("DocumentLibrary");
    oListItem = oList.getItemById(1);
    this.oListItem.set_item("FileLeafRef", "Folder Name");
    this.oListItem.update();
    clientContext.load(this.oListItem);
    clientContext.executeQueryAsync(onSuccess, onFailure);
    function onSuccess() {
    alert('Update succeeded.');
    function onFailure(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    More information:
    http://msdn.microsoft.com/en-us/library/office/jj163201(v=office.15).aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

Maybe you are looking for

  • Using a variable in communication channel

    Hi, I have a lot of Communication Channels looking for files in the same directory. This directory's path will be changed soon and so I assume I'll have to change all my Communication Channels. I was wondering whether there was a means of using a var

  • ORA-01033 Error... Please Help!

    Dear all expert, After Re-boot the computer, The system show the following error code; Kindly provide solution for me to fixed this case.. Thank of all Expert. The Error message reference to the following: SQL> shutdown immediate ORA-01109: database

  • Interface to PB

    Hello I need to import a candidate who is selected to be hired in to SAP from an external application, I understand that first it should move in to SAP HR PB and then should move in to PA. Which RFC/FM or IDoc could be used to send candidate in to PB

  • No more WDS networking in the new dual band airport extreme?

    we had a network of 3 airport extremes in our small 2 story design studio, we bought a new dual band to see if it would help with our DSL problem [it did], but there is no more WDS networking option available. this unit replaced our MAIN WDS unit. so

  • SGEN Software component clarification

    Hi, I ran SGEN by selecting the sap_appl software component but even after the process finished the FI module t.codes are not fully compiled yet. For example when i went to fb50 t.code the program was not pre-compiled yet and the system compiled it o