How to set PropertyBag Key and value at farm and sitecollection via PowerShell

Hi,
how could i create PropertyBag Key and value at farm and sitecollection via PowerShell?
Best Regards
Bog
Developers Field Notes | www.bog1.de

Hey, you can do it as follows 
asnp *sh*
$site = get-spsite "site url"
$web = $site.openweb()
$web.AllProperties["NEW KEY"] = "NEW VALUE"
$web.update()
$web.dispose()
Your new custom property will be present in the web Property bag. 
and you can access it by $web.AllProperties["New Key"] or simply $web.Properties["New Key"]
get2pallav
Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

Similar Messages

  • How to set Shortcut keys for button in Apex

    Hi
    Could anyone help me on how to set shortcut keys for buttons in Apex.
    I need to use say ALT + S to submit the page.
    The following thread pertaining to HTML DB refered to use ACCESS key. but that couldnt work in my case.
    Re: operation of the app. with the keyboard
    Any pointers on achieving this would be helpful.
    Thanks
    Vijay

    Hi Vijay,
    I’m afraid you must do it using javascript key listener. You can’t use action() on template based buttons because they are actually not HTML buttons but images with hyperlink.
    Key listener checks which key has been pressed down and invoke some JS function. For example, write this code in page header:
    <script>
    document.onkeydown=keyCheck;
    function keyCheck(e){
         var KeyId = (window.event) ? event.keyCode : e.keyCode;
         switch(KeyId){         
              case 113:
                   doSubmit('SAVE');
                   break;                    
              case 118:
                   alert('Hello');
                   break;
    </script>
    This script will submit page with request 'SAVE' if you press F2 or will show alert message if you press F7. Modify it to your issue.
    Regards,
    Przemek

  • How to set primary key of the VO.

    I have a problem with the master detail search. The search works fine on the first search, all details can be seen fine, but in the second search I get this error.
    The number of displayed records, 1, exceeds the actual number of records, 0, in view object EgoItemAdvancedSearchAM.MYACCESSOR001_MYLINK001_DetailsOrderLinesVO. Some of the displayed records may have been deleted.
    Somwhere in another thread, someone had the same problem and the soultion was to set primary key of the master VO. I am not sure how to set primary key of a VO. In my case the master VO is dynamic. Is there a way I can set PK of a dynamic VO.
    Any help greatly appreciated.

    Hi
    Thanks for your reply...
    am seting the primary key to VO attribute in my controller(PR)...but its not mapping to the VO attribute..
    OAAttachmentImageBean Ibean = (OAAttachmentImageBean)webBean.findChildRecursive("OpAttachments");
    String[] pkvaule = {"ResAttribute15"};
    Ibean.setPkColumns(pkvaule);
    Regards
    Harrrry

  • How to set up internet connection between MacBook Pro and an old eMac?

    I got an old eMac without wifi and a MacBook Pro. I'd like to share the network connection via ethernet cable to my eMac, but I can't get it work.
    I'd like to use it with screenrecycler and it needs a network connection.
    How to do it? How to set up the connection between the client and the host? Could somebedy give me a step by step guide?
    Thank you very much

    Hello,
    First, are you using Wifi for Internet on the MBP?
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list, Wifi on the MBP.
    In Shating on both, enable File Sharing, Screen Sharing, & Web Sharing on both.
    Then with the Ethernet cable between the two, find the IPs of both, or use Finder>Go>Connect to Server>Browse... see what shows up.

  • Where we use Conversions? like Fixed Value and Value mapping? and use of th

    where we use Conversions? like Fixed Value and Value mapping?
    and what is the use of that....

    Hi
    Have a Look at this
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    Value mapping is used to map different representations of an object to each other.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    You can do value mapping both in IR and ID
    IR: Message Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    ID: Tools --> Value Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/content.htm
    Value mapping replication: For uploading data from tables, excel sheet etc. into XI
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    Value mapping
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Thanks

  • How to set a 3 default values for a dependent key flexfield

    hi,
    I have an inquiry in oracle applications 11i - Oracle General Ledger module, Accounting Key flexfield structure.
    we have an independent key segment PROJECT and a dependent key segment SUB-PROJECT.
    Can we define 3 dependent value for the SUB-PROJECT to be the default for any new entered value in the PROJECT segment??
    e.g creating 3 default SUB-PROJECT values: X, Y, and Z. Any new value entered to the PROJECT key segment will have X, Y and Z by default as it's SUB-PROJECTS.
    If the above scenario is possible, please guide me to the best solution...
    Thank you...

    I can find that the value set of any dependent value set has only one room for a default value.
    What are the implications of creating a new Independent value set and assign it to the SubProject segment, on historical data and reports?
    thank you...

  • How to set a payload field value only once for multiple instances selected?

    The user needs to set a payload field value and then he can approve the task so the task can continue through the process, that's fine when the user selects one instance and sets the value in the task details section and then clicks the approve button, but how do we achieve the same behavior in a multiple way?, I mean the user can select multiple tasks in the workspace (in this case the details task page is not available and instead the following label appear "Multiple tasks selected") then if the user clicks the Actions drop down -> APPROVE he only gets the message "your request was processed successfully", so how can the user modify the payload field value only once for all the selected tasks so when he clicks APPROVE the value is populated in all the instances selected.
    Thanks,
    Carlos.

    In the action which displays the edit page just set the form idx value before displaying the jsp.

  • How to get the key Figure values.!.......?

    Hi friends...
          I have a scenerio , where I have loaded the data from 3 different data sources say A  , B and C in to 2 different DSO s and in to 2 different Info Cubes. And I have built Multi Provider from this 2 Info cubes.
    In the data source B , I have BELNR (Parked document number ).WRBTR (for Amount). In the report I have to show a field called Nr of Documents Parked and Value of Documents Parked. Same thing for Data Source C,  for Blocked Documents. Now My question is there is no Key Figure in My Data Model to Count the Nr of Parked / Blocked Docs....So in the Reporting how can I show this ? Do I need to use Customer Exits ? Do I need to have CKF /RKF ? if so , from what Key figures ? or Can I get the Count from the Backend (Modelling itself by using a Keyfigure with any Code)?...not only this 2 , I have lot many custom things to do in my Model...If any one can get me some idea on this , remaining will be very easier for me as they all are similar things to do....
    Please let me know if you have any questions or I need to elabarate it more to get an Idea on this....
    Thanks in advance

    THANKS GUYS ,
         I wrote the transformation routiene to count all the parked documents as
      IMPORTING
        request     type rsrequest
        datapackid  type rsdatapid
        SOURCE_FIELDS-/BIC/ZPARKBEF TYPE /BIC/OIZPARKBEF
       EXPORTING
         RESULT type tys_TG_1-RSTT_IPTDA
    DATA TMP TYPE tys_TG_1-RSTT_IPTDA.
    IF SOURCE_FIELDS-/BIC/ZPARKBEF = 'Y'.
    TMP = TMP + 1.
    ENDIF.
         RESULT = TMP .
             But when I see the Infocube data its showing only 0 for Parked Before value 'N' and 1 for Parked Before vale 'Y'. But I want to calculate total number of parked documents ..How can I do this?
    Thanks

  • How to set a default integer value in a form

    I have a form defined as follows:
    =================================================
    public static class ProjectForm extends FormData
    private int idx;
    private String name;
    private String projectNumber;
    private String description;
    public void setIdx(int index)
    this.idx = idx;
    public int getIdx(){
    return this.idx;
    public void setName(String name)
    this.name = name;
    public String getName()
    return this.name;
    public void setDescription(String description)
    this.description = description;
    public String getDescription()
    return this.description;
    public void setProjectNumber(String projectNumber)
    this.projectNumber = projectNumber;
    public String getProjectNumber()
    return this.projectNumber;
    ======================================================
    When I add a new entry into the database, I have no issues. However, when I want to modify an entry I run into some issues with the idx entry. For some reason, I cannot set a default value into the netui:label tag. My jsp code is as follows:
    ===================================================
    <tr valign="top">
    <td>
    Index:
    </td>
    <td>
    <netui:label value="{actionForm.idx}"
    defaultValue="{pageFlow.project.idx}"/>
    </td>
    </tr>
    <tr valign="top">
    <td>
    Name:
    </td>
    <td>
    <netui:textBox dataSource="{actionForm.name}"
    defaultValue="{pageFlow.project.name}"/>
    </td>
    </tr>
    <tr valign="top">
    <td>
    ProjectNumber:
    </td>
    <td>
    <netui:textBox dataSource="{actionForm.projectNumber}"
    defaultValue="{pageFlow.project.projNum}"/>
    </td>
    <tr valign="top">
    <td>
    Description:
    </td>
    <td>
    <netui:textBox dataSource="{actionForm.description}"
    defaultValue="{pageFlow.project.description}"/>
    </td>
    </tr>
    ======================================================
    The the project class is passes into the page and has the appropriate values. The name, project number and description fields work as I would expect. However, the idx value is alway '0'. If I print out pageFlow.project.idx it has the correct value.
    How do I fix this? My feeling is that it is related to the form field being an int and not a string. The default parameter indicates that is only works with null values, and ints default to zero. Do I need to use an Integer value instead in the form, or just stay away from non-string form fields.
    Thank for the help!!
    --John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    In the action which displays the edit page just set the form idx value before displaying the jsp.

  • How to set a form element value using javascript?

    Hello,
    I have been using the following two functions in AS 9.0.2 to set form values in javascript and it works correctly. However, the same code does not work in AS 10.1.2.0.2. Would appreciate if someone could let me know how to set form elements using Javascript(onchange of a field).
    function set_item_value(p_field_name, p_value)
    var v_index, v_full_name;
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if (v_full_name[2] == p_field_name)
    document.forms[0].elements[v_index].value = p_value;
    function get_item_value(p_field_name)
    var v_index, v_full_name, v_return="";
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if(v_full_name[2] == p_field_name)
    if(document.forms[0].elements[v_index].type != "radio")
    v_return = document.forms[0].elements[v_index].value;
    else
    if(document.forms[0].elements[v_index].checked)
    v_return = document.forms[0].elements[v_index].value;
    if(v_return == " ")
    v_return = "";
    return v_return;
    Thanks
    Dev

    This is not the best way to write JavaScript in Portal environment!
    You can't be sure that a form is the first in the html source!
    In Portal you change the order of your portlets, and also you can have several instances of the same portlet on the same page!!!
    You should use qualified form and field names!
    Please check the following JPDK methods:
    UrlUtils.htmlFormName
    HttpPortletRendererUtil.portletParameter

  • How to set the default context value for flexfield in OAFramework pages

    Hi,
    I have a page which contains a contexxt value field i.e Flexfields
    To select the context value we have to select the value from drop down
    So Here we want to display the context value immediately when the page is called
    How to set the default valu in this case
    Regards,
    Krishna

    You can set the Attribute category view attribute to the Flexfield context value and call prepareforRendering in the flex bean. Check the dev guide for details.
    Regards
    Sumit

  • How to set radio group default value

    Hi,
    I have a radio group in a portal form. How do I set one of them as checked when the form comes up?
    Thanks;
    Kelly.

    It might be possible with javascript. since a radio group is an array, you should loop
    through the index to set the correct
    checked value.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    Kelly,
    I tried that already, and it still didn't work. Any idea? I am using portal version 3.0.6.
    Thanks;
    Kelly.
    <HR></BLOCKQUOTE>
    null

  • How to set a dropdown display value

    I know how to access the current value of a dropdown box. But how can I set it?
    I have a dropdown box and one of the choices is 'Other'. When 'Other' is selected, a text box is enabled so the user can describe what they mean by 'Other'. Now, I want to make the dropdown more robust where if after selecting 'Other' and providing a comment the user willingly or not makes a different selection, the user is warned that the 'Other' description will be deleted with a choice to proceed or not. If the user proceeds the description is deleted and the text box disabled; if the user doesn't want to proceed with the deletion the text box is left enabled with its value untouched and the dropdown value is reset to 'Other'. This is the part that I can't figure out: how do I reset the display value of the dropdown?
    Thanks for the help!
    Marc

    Ok, thanks Malcolm. Yes, you were correct about using the rawValue property to reset the selected value of the dropdown.
    Why I got so confused is because all my scripting, including trying to reset the newly selected value, was done in the Change event of the dropdown. The rawValue property 'appears' to behave differently here I think because of the order of the events, where it holds the original value through the whole selection process. So essentially, the rawValue during the Change event doesn't hold the newly selected value and will not hold it until the Change event is fully completed.
    So I was able to reset the selected value through the Exit event by using a form variable whose value I set in the Change event. So my Change event uses this line at the right location in my script:
    cancelDDSelection.value = "yes";
    and my Exit event uses the following;
    if (cancelDDSelection.value == "yes") //if the Change event reset this form variable to 'yes'
    this.rawValue = "Other"; //reset the selected value to 'Other'
    cancelDDSelection.value = "no"; //reset the form variable to its default value
    Not sure if there's a better to do this, but all works as I wanted it to now.
    Marc

  • How to set a variable's value from job output

    Can anyone point me at documentation on how to set the value of a variable based on the output of a job? We are running TES v6.0.2.153.
    The Agent/Adapter is a Linux command line, so the Command could be for example:
    echo foo
    and I would like a variable named bar to contain the value foo.  (Obviously in real life the variable value would be dependent on what the command output)
    Thanks in advance,
    Martin

    One more nugget: to parse the response from a command from a UNIX/Linux agent for a specific string and store that in a variable, I followed Rami's advice and then had to find the string in the output.
    The below example puts the first digit of a random number in the variable:
    Job Command:
    bash -c
    Command Parameters:
    "'echo' Random number is $RANDOM | perl -ple 's/.*Random number is (\d{1}).*/\1/'"
    Note that your command itself (in this case "echo") cannot be put in the Command box, otherwise TES does not interpret the Command Parameters correctly.  So you need to set the Command to "bash -c" (run the command in the parameter string), and enter your command and parameters within double quotes in the Command Parameters, with the command being run (in this case "echo") in single quotes at the beginning.
    (I also had to make my .bash_profile run without any output to avoid it being prefixed to the variable value.)
    Hope this helps,
    Martin.

  • How to set primary key for a date column

    hello experts .,
    i need to set primary key for a column consists of the datatype date. how to solve this..?

    1008318 wrote:
    its my personal need..then it is a very bad personal need. DATE is not an appropriate type to be using for a primary key, as it cannot be guaranteed to be unique, especially when inserting multiple rows at once.
    You would be better working to business needs and implementing correct technical solutions to those needs, than to just do things based on your personal needs.

Maybe you are looking for

  • How to update Sold-To Party (In ORDER_SAVE BADI)

    Hi, I have a requirement as follows: In for a Sales Order, In ORDER_SAVE BADI, I have to do validation for Sold-to Party. If validation fails, I need to display an error message and I need to clear the Sold-to Party field, hence user has to select an

  • Satellite L300-15V - The system cannot install Wireless LAN driver

    After installed all drivers for that machine, the system shows that it need to install Wireless LAN driver, but i did!!! What's going on? Help! I can't make wireless net home!!!!!!

  • Flash Islands Tutorial I - Confusion with Flex/Flash Builder Versions

    Hi Guys, i am new to the Adobe Flex/Flash Islands technology and tried to implement Tutorial I by Thomas Jung. Unfortunately i am confused by the various different versions for flex and the corresponding IDE's. As far as i understood SAP at the momen

  • Laptop Design

    Toshiba Dear Sirs: I have purchased and appreciated many Toshiba laptop computers and TVs over the years. I have been wondering why laptops cannot have more style, for instance, the plastic case with wood grain patterns (like on my 2000 Subaru dashbo

  • I have problem with my G510

    I dont have is this my place to ask but... I use windows 8.1 on my G510 and when i instaling the drivers for Hotkeys(fn keys) i reciave this message: This program does not support this system...