Sharepoint get URL of directory one level up

[%Current Site URL%] helps pull the current URL of the page.
For example: https://fm.site.com/sites/IT/ITProjectTemplate/Lists/Risks/AllRisks.aspx
But how do I pull the URL of the folder one level up.
For example: https://fm.site.com/sites/IT/ITProjectTemplate/Lists/Risks/
The reason is that I want to pull the URL one level up, then add a string (string is /AllItems.aspx) after it like: [%One Level Up URL%]/AllItems.aspx

Did you try fetching SPFolder object from the URL and then its ParentFolder URL?
SPSite site = SPContext.Current.Site;
SPWeb web = SPContext.Current.Web;
SPFolder folder = web.GetFolder("<URL>");
if(folder.ParentFolder !=null)
string url = SPUtility.GetFullUrl(site, folder.ParentFolder.Url);
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

Similar Messages

  • How to get the Organizational Unit One level up

    Hi
    Does any one know any function module to get the org unit one level up by giving the current Organizational unit as input. Please reply very urgent.

    Hello Nirmal
    I am usually using the following function module to read to OM:
    *   SAP_SORG
    * OrgStructure with assigned orgunits)
        REFRESH: lt_struc.
        CALL FUNCTION 'RHPH_STRUCTURE_READ'
          EXPORTING
            plvar             = '01'            " active Planvar.
            otype             = 'O'             " OrgUnit
            objid             = l_wa_cb1-objid  " Toplevel-Node
            wegid             = 'SAP_SORG'
            begda             = iw_begda
            endda             = iw_endda
            pup_info          = 'X'
            with_stext        = 'X'
            tdepth            = 0               " alle Sub-Levels
          TABLES
            stru_tab          = lt_struc
          EXCEPTIONS
            catalogue_problem = 1
            root_not_found    = 2
            wegid_not_found   = 3.
    The parameter <b>WEGID</b> is the crucial on which determines the objects that are read from the OM. In your case you will need <b>WEGID = 'A002'</b> (reports (line) to).
    To understand the <i>evaluation path</i> (WEGID) better have a look at transaction <b>PPST</b>.
    Regards
      Uwe

  • [svn] 3120: When you point Flex Builder at a local sandbox trunk build, it couldn' t generate the html-templates folder correctly for new projects so we moved all the html templates up one level and removed the html-templates directory and adjusted build

    Revision: 3120
    Author: [email protected]
    Date: 2008-09-05 10:44:10 -0700 (Fri, 05 Sep 2008)
    Log Message:
    When you point Flex Builder at a local sandbox trunk build, it couldn't generate the html-templates folder correctly for new projects so we moved all the html templates up one level and removed the html-templates directory and adjusted build.xml's to accommodate the directory change
    Modified Paths:
    flex/sdk/trunk/build.xml
    flex/sdk/trunk/webapps/webtier/build.xml
    Added Paths:
    flex/sdk/trunk/templates/client-side-detection/
    flex/sdk/trunk/templates/client-side-detection/AC_OETags.js
    flex/sdk/trunk/templates/client-side-detection/index.template.html
    flex/sdk/trunk/templates/client-side-detection-with-history/
    flex/sdk/trunk/templates/client-side-detection-with-history/AC_OETags.js
    flex/sdk/trunk/templates/client-side-detection-with-history/history/
    flex/sdk/trunk/templates/client-side-detection-with-history/history/history.css
    flex/sdk/trunk/templates/client-side-detection-with-history/history/history.js
    flex/sdk/trunk/templates/client-side-detection-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/client-side-detection-with-history/index.template.html
    flex/sdk/trunk/templates/express-installation/
    flex/sdk/trunk/templates/express-installation/AC_OETags.js
    flex/sdk/trunk/templates/express-installation/index.template.html
    flex/sdk/trunk/templates/express-installation/playerProductInstall.swf
    flex/sdk/trunk/templates/express-installation-with-history/
    flex/sdk/trunk/templates/express-installation-with-history/AC_OETags.js
    flex/sdk/trunk/templates/express-installation-with-history/history/
    flex/sdk/trunk/templates/express-installation-with-history/history/history.css
    flex/sdk/trunk/templates/express-installation-with-history/history/history.js
    flex/sdk/trunk/templates/express-installation-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/express-installation-with-history/index.template.html
    flex/sdk/trunk/templates/express-installation-with-history/playerProductInstall.swf
    flex/sdk/trunk/templates/metadata/
    flex/sdk/trunk/templates/metadata/AC_OETags.js
    flex/sdk/trunk/templates/metadata/readme.txt
    flex/sdk/trunk/templates/no-player-detection/
    flex/sdk/trunk/templates/no-player-detection/AC_OETags.js
    flex/sdk/trunk/templates/no-player-detection/index.template.html
    flex/sdk/trunk/templates/no-player-detection-with-history/
    flex/sdk/trunk/templates/no-player-detection-with-history/AC_OETags.js
    flex/sdk/trunk/templates/no-player-detection-with-history/history/
    flex/sdk/trunk/templates/no-player-detection-with-history/history/history.css
    flex/sdk/trunk/templates/no-player-detection-with-history/history/history.js
    flex/sdk/trunk/templates/no-player-detection-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/no-player-detection-with-history/index.template.html
    Removed Paths:
    flex/sdk/trunk/templates/html-templates/

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • HT4314 Hi I have clash of clans only Game Center on my iPhone and on my iPad and I want to get rid of the one on my iPad, on my iPhone it always comes up with 'would you like to use you town hall level 4' help!

    Hi I have clash of clans only Game Center on my iPhone and on my iPad and I want to get rid of the one on my iPad, on my iPhone it always comes up with 'would you like to use you town hall level 4' help!

    Please help me back my clash of clans game. I cant access my games. But im steel can visit. Please hepl me.

  • Hello, the 'Save As' dialog box used to allow the backspace button to go up one level in the directory when the focus is in the folder contents box but it does not work any more, please help.

    Hello, the 'Save As' dialog box used to allow the backspace button to go up one level in the directory when the focus is in the folder contents box but it does not work any more, please help. BTW the same 'Save As' dialog in other applications still allow the backspace button to go up one level in the directory.

    cor-el,
    I kept forgetting and procrastinating about following your instructions, since I have internet access only for limited amounts of time and usually I am busy with important tasks when I am.
    Out of the blue, the problem corrected itself (the Save As box started to open full screen, then shrunk down to a normal size and the edges can now be dragged to a custom size).
    Even the copy and paste problem in the filenaming area seems to have been less troublesome lately even though there have been no updates to Firefox in a few weeks.
    Even though I marked the solution as not helpful, the problem has in fact been resolved. I will save the solution instructions in case the issue returns.

  • How to get script to save up one level

    Here is my basic script so far:
    if (activeDocument.width > activeDocument.height)
    doAction("WalletName H_Right","X-Key Logos.atn");
    else if (activeDocument.width < activeDocument.height)
    doAction("WalletName V_Right","X-Key Logos.atn");
    I want a script that will save my current edited Photoshop CS3 open document image (stored in a folder called Client/jpg) and save it into a Client/edit folder.  In other words I want it to go up one level from the jpg folder to the Client folder then save into the "edit" folder that is in the Client folder.
    I want it to save as Jpeg, Level 8.
    In another script I use this to save the file as jpg level 12 into the same folder and append to the name:
    var CurrentFolder = activeDocument.path;
    saveFile = new File(CurrentFolder + "/" + imgName + "_" + "wal")
       saveOptions = new JPEGSaveOptions();
       saveOptions.embedColorProfile = true;
       saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
       saveOptions.matte = MatteType.NONE;
       saveOptions.quality = 12; //ranges from 0 to 12
       AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
    But in this case I just want it to save with same name jpg but level 8 in a differnt folder.  The Client/jpg folder will be different everytime.  "Client" refers to the client's name so that folder is not always in the same location. So what snippet of code can be placed into the saveFile area to say go up one folder and save to "edit" folder with the open document's current name.

    Ok I am not sure where to put it.  This is what I got so far now:
    //Determint wether document is Horizontal or Vertical and run that action
    if (activeDocument.width > activeDocument.height)
    doAction("DigiPhoto H","X-Key Actions.atn");
    else if (activeDocument.width < activeDocument.height)
    doAction("DigiPhoto V","X-Key Actions.atn");
    // Write file up one level into "digipics".
    var CurrentFolder = activeDocument.path;
    var parentFolder = decodeURI(activeDocument.path.parent);
    $.writeln(parentFolder);
    saveFile = new File(parentFolder/digipics, imgName)
       saveOptions = new JPEGSaveOptions();
       saveOptions.embedColorProfile = true;
       saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
       saveOptions.matte = MatteType.NONE;
       saveOptions.quality = 8; //ranges from 0 to 12
       AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
    It does the first actions and saves but prompts for where and what size.  What exactly does this need to look like so that it saves level 8, jpg without prompting and saves to the up one level folder as discussed earlier.
    I have searched and can't find anything.

  • SharePoint 2013 and MS Office Web Apps - error in sharepoint's url calls OWAps

    I have new SharePoint 2013 Server farm and one dedicated Office Web Apps (OWAps) server.
    This farm is placed in one domain (Acompany.local). There is other domain BCompany.local whitch has both trusted to first domain (two diffirent forests, two company's branches).
    Users from second domain BCompany.local well see intranet portal, build in sharepoint in the first domain (url like http://intranet.Acompany.local).
    But, when they try to use OWAps, f.e. whatching preview or try to open docs for edit in browser - they see error in frame.
    I'm looked it in google chrome's developer tools and find' that sharepoint use wrong url to call OWAps - like http://owaps/... instead of http://owaps.Acompany.local/...
    When I created new office web app farm by:
    New-OfficeWebAppsFarm -InternalURL "http://owaps.Acompany.local" - ExternalURL "http://owaps.Acompany.local" -AllowHttp -EditingEnabled
    And in sharepoint farm new SWOPI binding by:
    New-SPWOPIBinding -ServerName "http://owaps.Acompany.local" -AllowHTTP
    Get-SPWOPIBinding tell that all SWOPI bindings are http://owaps.Acompany.local, but in devtools I continue to see wrong http://owaps/... url
    Any idea to fix this behavior?

    The reason WAC is recommended to be installed on a dedicated server is that it recreates the IIS sites/settings. This is why you're seeing the setting reset itself after restart.
    What I'd probably recommend is creating a script that queries the WAC URL on a regular basis.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • I asked a question about organizing bookmarks in my toolbar bookmark. I'm not happy with the "help" I got. I'm very frustrated. I need to talk to a technician. How can I get in touch with one? Do you have contact information?

    Can't find out how to organize my bookmarks. can't do it after updating. Person tried to help, we had long conversations, I sent lots of images, it got to where I think the answer given were not related to the problem. I asked for help from a technician or to give my emails to one. She won't do it and I can't get help. So I'm starting over. It shouldn't be this hard. I need someone else to help me.

    re: How do I organize and delete bookmarks in my short toolbar list.
    * https://support.mozilla.com/en-US/questions/884877
    You say you have a lot of duplicate bookmarks, and want to know how to organize bookmarks, but from the pictures shown, I really only see a news subscription, some sample bookmarks in the bookmarks toolbar that you don't display on the toolbars so I don't see point in deleting anything there most of it are reports from the database or from a news subscription nothing of much concern, really. I would dump the news subscription if you don't use it.
    How do you want to arrange your bookmarks, but you must keep within some boundaries of what was expected of the three major folders.
    Bookmarks Menu -- this is your folder categorized bookmarks, originally all bookmarks were in this folder and the bookmarks toolbar was one folder within -- that has changed.
    Bookmarks Toolbar -- intended to be visible on the toolbar with main bookmarks and folders spread out horizontally to save one level of drilling down into folders, with very few bookmarks and folders visible on the toolbar but quickly accessed. You can use the bookmarks showing essentially as buttons a few primary bookmarklets. You can have folder structure there so you could actually have thousands of bookmarks there within folders.
    Unsorted Bookmarks (no folders within by intent not by restriction) -- new concept to not categorize bookmarks into folders because of bookmark tagging. Delicious.com will show you what they intended where you have lots of people. I think the concept of tagging breaks down with one person. The other reason bookmarks no longer had to be put into folders was the "AwesomeBar" feature of Firefox that is a great feature it will find bookmarks whatever folder they are in -- I hope you are familiar with it. You can throw bookmark separators into any folder but they are especially useful in the unsorted bookmarks folder, especially if you sort the folder. In other words a group probably within a date range.
    So how do you see yourself categorizing your bookmarks ?
    I'd like to get an idea of '''how many bookmarks '''you have altogether and how big your places.sqlite file is. To find out how many bookmarks you have all together bring up the Bookmarks Library list, place a colon (":") into the search field this will do a find on all of your bookmarks. At the bottom of the library window you will see the total number of bookmarks you may have to nudge the vertical scrollbar down, and as long as no bookmarks are selected you will see an '''item count'''.
    Open your profile folder Help > Troubleshooting information... then click on "Open containing folder" then looking in bookmarkbackups folder and report size of last .json file in there -- hope you can see the extension the filenames have dates.
    From the library list you can see if you actually do have a lot or any duplicated by eyeballing the list sorted by the location. You don't want to delete anything yet until you know what you want to do and what folders the bookmarks actually in, as you would not want to delete a categorized bookmark for an uncategorized one.
    I have 1256 bookmarks, a bookmarks backup file (.json) is 1849 KB.
    I have 750 of those bookmarks have a keyword shortcut -- most of my bookmarks may not actually be bookmarks to webpages.
    Install the "Show Parent Folder" extension, it would be important for manually categorizing and deleting bookmarks.
    *https://addons.mozilla.org/firefox/addon/show-parent-folder/
    At some point you will want to install the "Sort Places" extension that allows you to sort folders recursively in a matter of seconds. Only sort when you want to sort, never automatically.
    * https://addons.mozilla.org/firefox/addon/sortplaces/
    Other extensions of interest for working with bookmarks are included in
    * http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox
    The columns in the bookmarks library list that I show are
    :Name, Location, Parent Folder, visit date, visit count, Keyword, Description, Last Modified
    The important columns for eliminating duplicates are
    :Name, Location, Parent Folder, Keyword, Description
    :if you have Tags then that column would also be important not to delete the bookmark
    Sort on Location look for duplicates, expect you won't find as many as you thought you would, because Firefox makes it difficult to create duplicates if you use the bookmarks star. I wouldn't delete any until you really know what you want to do, if you have duplicate you would not want to delete one a primary location based on parent directory or the one you use with a keyword.
    I don't really think you have much to delete in your toolbars list, they are basically examples. Would highly recommend you keep something in the bookmarks toolbar even though you are not displaying it.
    The only case of having major duplicates are if you have imported bookmarks at the bottom of your bookmarks menu also named bookmarks menu or something similar. You would see that in the parent folder column -- you cannot sort on the parent folder column.

  • Files are one level too deep

    I uploaded my files to my server but they didnt show. My
    support guy said my files were one level too deep. How do I fix
    this. email me if you would like the pic of how my files are set up
    right now. The message below is what he sent me in regards to my
    problem
    Dear Rick Sepulveda,
    It appears that your files are one level too deep. You can
    see the site at
    http://profusiondesigns.net/html/
    but you want it to be
    http://profusiondesigns.net/
    so you need to move the files from /var/www/html/html/ up to
    /var/www/html/ and then you'll be all set.
    Your question was:
    how do i upload my webpages
    Reply from Jumpline.com, Inc. (Wed Nov-19-2008 23:44):
    Here's a link to our support site that includes information
    to get you started on this.
    Customer comment (Thu Dec-04-2008 03:12):
    I uploaded to my server but my new page wont display. There
    were other files in there before i trasferred mine but i cant
    delete them to start over. can you help. Attached is a pic of how
    my files look when im connected to my server.
    Thanks
    Sincerely,
    Jason Shaw
    Jumpline.com, Inc. Support Team

    What do you have in the Host Directory field of your Remote
    Site Definition?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "ricksepulveda" <[email protected]> wrote in
    message
    news:gh93gf$rso$[email protected]..
    >I uploaded my files to my server but they didnt show. My
    support guy said
    >my
    > files were one level too deep. How do I fix this. email
    me if you would
    > like
    > the pic of how my files are set up right now. The
    message below is what he
    > sent
    > me in regards to my problem
    >
    > Dear Rick Sepulveda,
    >
    > It appears that your files are one level too deep. You
    can see the site at
    >
    http://profusiondesigns.net/html/
    but you want it to be
    >
    http://profusiondesigns.net/
    so you need to move the files from
    > /var/www/html/html/ up to /var/www/html/ and then you'll
    be all set.
    >
    > Your question was:
    > how do i upload my webpages
    >
    > Reply from Jumpline.com, Inc. (Wed Nov-19-2008 23:44):
    > Here's a link to our support site that includes
    information to get you
    > started
    > on this.
    >
    > Customer comment (Thu Dec-04-2008 03:12):
    > I uploaded to my server but my new page wont display.
    There were other
    > files
    > in there before i trasferred mine but i cant delete them
    to start over.
    > can you
    > help. Attached is a pic of how my files look when im
    connected to my
    > server.
    > Thanks
    >
    > Sincerely,
    > Jason Shaw
    > Jumpline.com, Inc. Support Team
    >
    >

  • Move up one level in path and make new folder

    How do I get applescript to make a new folder one level up from myFolder i.e.
    set myFolder to ¬
    (choose folder with prompt "Where are the image files for which you want to change exif data ?") as reference
    make new folder at myFolder with properties {name:"Gallery JPEGs"}
    makes a new folder inside myFolder, but how do I tell it to move up one level from myFolder and make a new folder?
    Thanks.
    Pedro

    You can use statements such as the following ones:
    *tell application "Finder" to make new folder at container of myFolder with properties {name:"Gallery JPEGs"}*
    or
    *tell application "Finder" to make new folder at container of container of myFolder with properties {name:"Gallery JPEGs"}*
    and so on…
    And if you want the folder “myFolder” to be contained by the folder “Gallery JPEGs”, use the following statements:
    *tell application "Finder"*
    *make new folder at container of myFolder with properties {name:"Gallery JPEGs"}*
    *move myFolder to the result*
    *end tell*
    Message was edited by: Pierre L.

  • Keyword management - how do you move keywords up one level?

    How do you move keywords up one level in the hierarchy? Sometimes when working quickly, keywords and subgroups of keywords get inadvertently highlighted and moved as a child under another keyword or group. I can't figure out how to move them back out again to the root level.

    I can't figure out how to move them back out again to the root level.
    You can drag and drop sub keywords to other locations higher or lower in the nested folder but you don't seem able to drag from sub level to root level.
    The easiest workaround would be to have a regular Back up of the list (pop menu from icon top right keyword panel: export keywords) and when not having added new words just use clear and import the back up to restore.
    If you did edit the list you can choose to export current list and with a simple text editor make the changes for keywords and sub keywords you want, save and then use again clear and import to retrieve the correct list.

  • Tell AS to make new folder one level up

    How do I get AS to make a new folder one level up from myFolder i.e.
    set myFolder to ¬
    (choose folder with prompt "Where are the image files for which you want to change exif data ?") as reference
    make new folder at myFolder with properties {name:"Gallery JPEGs"}
    makes a new folder inside myFolder, but how do I tell it to move up one level from myFolder and make a new folder?
    Thanks.
    Pedro

    "AS?" What's that?
    myFolder? What application are you using? I think you are in the wrong forum.
    Shane

  • Sharepoint recovery 1 front-end one back-end

    I have a simple SharePoint environment with a SharePoint 2010 front end and a dedicated SQL back-end. Both virtualized on Hyper-V 2008 R2 host. There are no complicated apps - it is just a file serving SharePoint implementation.
    The VHD for the front end server (it only had one drive) got corrupted. I have an export of the complete server from the 29th December, including the VHD.
    The back end (SQL and all the databases) if unaffected.
    I tried creating a new VM with the three day old VHD from the export, but it does not seem to correctly connect to the back end.
    I also have DPM 2012 backups of the whole thing systems, though they are made via the SharePoint front end.
    With a whole panoply of solutions I can:
    1. import the exported front end and see if that works better than just re-creating the machine (GUIDs and all that)
    2. Forget the export of the front end on the 29th and do a fully fledged DR from DPM
    Any other ideas?
    CarolChi

    One thing to note is that SharePoint does not support VM backups (that is, snapshots or full backups of the VHD itself). Since your VHD is older than the data within the Configuration database, it is best to start with a new front end.
    You should be able to install SharePoint up to the same patch level on the new front end, "join" the existing farm, and then forcibly remove the defunct SharePoint server from Central Administration.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Hi! I need to load a GET url that si very long. On other browsers, I can load the url. In firefox 3.6, no. There is an addons or a plugin so I can extend this limit? If yes, is possible to load automatically this addons when loading a certain page? thanks

    Hi!
    I need to load a GET url that si very long. On other browsers, I can load the url. In firefox 3.6, no.
    There is an addons or a plugin so I can extend this limit? If yes, is possible to load automatically this addons when loading a certain page? thanks
    The url is sometingh like this (this is correctly loaded, but it could be longer)

    Firefox should have problems with long GET data appended to an URL (long would be over 64k).<br />
    If there are problems then it is possible that an extension is the cause of that.
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • PS: How to get the hierarchy of a level 1 WBS only?

    Hi,
    This corresponds to Projects System module.
    If we have 5 level 1 WBS elements.Out of them if I want to get only the WBS hierarchy corresponding to a level 1 WBS element (say 2nd level 1 WBS element).
    I know that we can get all the WBS elements' hierarchy from BAPI_PROJECT_GETINFO. But I want the hierarchy for only one level 1 WBS element not for all. How?

    you could read them from SETNODE table with SETCLASS = '0110'

Maybe you are looking for

  • Old Mainframe Programmer has java question....

    I've looked at other formum suggestions however, I'm still having problems. What should I try specifically? I notice trying to use classpath in autoexec.bat file under win98 doesn't work. Therefore, I set classpath in my manifest file. Is this practi

  • HT201371 how do I reset my touch and password ID

    Ihave forgotten my password and my touch id does not work. How do I reset.

  • CS 6 registration problem

    I purchased  the Photoshop CS6 upgrade, and am trying to install it on a new computer that does not have my previous CS5 version on it.  (It was installed on a laptop that suffered a catastrophic hard disk failure). The registration process is asking

  • How to install a bootloader

    I have a first-time linux install of Arch on my desktop. Going through the beginner's guide and told me to install a bootloader which has me lost... I don't know how to access the internet, let alone a thumb drive off of this machine at the moment to

  • Cisco Mobile 8.0 on iOS6

    Here is what I have! I am running Call Manager 8.5.1 I have installed Cisco Mobile 8.0 on my iPhone 4S with iOS 6.1. I have tried everything to get it to registar with no success! I have created a Cisco IP Communicator I have used this several times