Value on P0 to var on script

hi:
How i can give the value on a P0 to a var in script in html region???
Thanks

This is a example for one script:
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
var ctwitter = $v('P0_TWITTER');
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 5,
interval: 30000,
width: 250,
height: 300,
theme: {
shell: {
background: '#a31010',
color: '#ffffff'
tweets: {
background: '#ffffff',
color: '#000000',
links: '#6c47ff'
features: {
scrollbar: true,
loop: false,
live: true,
behavior: 'all'
}).render().setUser(ctwitter).start();
</script>
I want the twitter script go to a region with each user that log in.
So i want the value for count was on ctwitter.
If i do at this mode, the var ctwitter is blank.

Similar Messages

  • Assigning a value to a constant in Calc Script

    Hi All,
    I'm trying to assign a value to a constant in a calc script, but not able to make it work.
    I need to get a user entered value from the database such as Indexation Value, and use that many times in my script. Rather than use:
    "member1"->"member2"->"member3"->"member4"->"member5"
    every time I access the value, I'd like to use:
    VAR IndexVal = "member1"->"member2"->"member3"->"member4"->"member5";
    and then use IndexVal in the script.
    Is this possible?, or do I have to use a substitution variable?
    Thanks.

    It is possible, but the variable and the calculations that use it must exist in the same Calc Bloack statement (Beginning and ending in parens)

  • [JS/AS] Storing values that persist between runs of scripts

    I have written a number of Applescripts that use Applescript Properties to to store the values chosen by users in dialog boxes etc between successive runs of the script (in AS they persist until the script is recomplied).
    I am investigating converting these scripts to JS to enable them to be used cross platform, and am slowly bringing myself up to speed with JS. However, I cannot see any obvious equivalent to AS properties.
    Does any one have any advice on how they store user defaults, preferences etc between script runs. Any code fragments would be appreciated.
    Many thanks, Nye

    //NeonWithPrefs.jsx
    //An InDesign CS3 JavaScript
    //This script creates a "blend" or "graduation" from the selected object or objects.
    //For more on InDesign scripting, go to
    http://www.adobe.com/products/indesign/scripting.html
    //or visit the InDesign Scripting User to User forum at
    http://www.adobeforums.com
    main();
    function main(){
    var myObjectList = new Array;
    if (app.documents.length != 0){
      if (app.selection.length != 0){
       for(var myCounter = 0;myCounter < app.selection.length; myCounter++){
        switch (app.selection[myCounter].constructor.name){
         case "Rectangle":
         case "Oval":
         case "Polygon":
         case "GraphicLine":
          myObjectList.push(app.selection[myCounter]);
         break;
       if (myObjectList.length != 0){
        myDisplayDialog(myObjectList);
       else{
        alert ("Please select a rectangle, oval, polygon, or graphic line and try again.");
      else{
       alert ("Please select an object and try again.");
    else{
      alert ("Please open a document, select an object, and try again.");
    function myDisplayDialog(myObjectList){
    var mySwatchNamesList = new Array;
    var myLayerNamesList = app.documents.item(0).layers.everyItem().name;
    for(var myCounter = 0;myCounter < app.activeDocument.colors.length; myCounter ++){
      //Do not add(); unnamed colors.
      if(app.activeDocument.colors.item(myCounter).name != ""){
       mySwatchNamesList.push(app.activeDocument.colors.item(myCounter).name);
    for(var myCounter = 0;myCounter < app.activeDocument.mixedInks.length; myCounter ++){
      mySwatchNamesList.push(app.activeDocument.mixedInks.item(myCounter).name);
    //New stuff for setting dialog box controls to the last-selected options.
    //While the basic XML preferences-reading mechanisms are generic,
    //significant handling has to be done by the dialog box to read and
    //use the stored values.
    //List of dialog box parameters for Neon.jsx:
    //NumberOfSteps--integer
    //FromStrokeColor--string
    //FromStrokeWeight--double
    //ToStrokeWeight--double
    //FromStrokeTint--percent
    //ToStrokeTint--percent
    //LayerName--string
    var myParameterArray = myGetDialogPreferences("NeonWithPrefs", ["NumberOfSteps", "FromStrokeColor", "FromStrokeWeight", "ToStrokeWeight", "FromStrokeTint", "ToStrokeTint", "LayerName"]);
    //myPreferences is the XML object that should lead off the array.
    var myPreferences = myParameterArray[0];
    try{
      if(myParameterArray.length == 8){
       //If any of these conversions fails, we'll set the
       //values back to the defaults by handling the error.
       myNumberOfSteps = parseInt(myParameterArray[1]);
       if(myNumberOfSteps <=1){
        throw "Too few steps.";
       myFromStrokeColor = myParameterArray[2];
       myFromStrokeWeight = parseFloat(myParameterArray[3]);
       myToStrokeWeight = parseFloat(myParameterArray[4]);
       myFromStrokeTint = parseFloat(myParameterArray[5]);
       myToStrokeTint = parseFloat(myParameterArray[6]);
       myLayerName = myParameterArray[7];
      else{
       throw "Could not read from preferences file.";
    catch(myError){
      //Default values.
      myNumberOfSteps = 12;
      myFromStrokeColorName = "Black";
      myFromStrokeWeight =12;
      myToStrokeWeight = .25;
      myFromStrokeTint = 100;
      myToStrokeTint = 10;
      myLayerName = "Layer 1"; 
    //Now process the stroke color index.
    myFromStrokeColorIndex = myGetIndex(mySwatchNamesList, myFromStrokeColor);
    //Now process the layer index.
    myLayerIndex = myGetIndex(myLayerNamesList, myLayerName);
    //End of preference-gathering stuff.
    var myDialog = app.dialogs.add({name:"Neon"});
    with(myDialog){
      with(dialogColumns.add()){
       with(borderPanels.add()){
        with(dialogColumns.add()){
         staticTexts.add({staticLabel:"Number of Steps:"});
        with(dialogColumns.add()){
         //Updated.
         var myNumberOfStepsField = integerEditboxes.add({editValue:myNumberOfSteps});
       with(borderPanels.add()){
        with(dialogColumns.add()){
         staticTexts.add({staticLabel:"From:", minWidth:36});
        with(dialogColumns.add()){
         with(dialogRows.add()){
          with(dialogColumns.add()){
           staticTexts.add({staticLabel:"Stroke Color:", minWidth:100});
          with(dialogColumns.add()){
           //Updated, var name mySwatchIndex.
           var myFromStrokeColorMenu = dropdowns.add({stringList:mySwatchNamesList, selectedIndex:myFromStrokeColorIndex});
         with(dialogRows.add()){
          with(dialogColumns.add()){
           staticTexts.add({staticLabel:"Stroke Weight:", minWidth:100});
          with(dialogColumns.add()){
           //Updated.
           var myFromStrokeWeightField = realEditboxes.add({editValue:myFromStrokeWeight});
         with(dialogRows.add()){
          with(dialogColumns.add()){
           staticTexts.add({staticLabel:"Stroke Tint:", minWidth:100});
          with(dialogColumns.add()){
           //Updated.
           var myFromStrokeTintField = percentEditboxes.add({editValue:myFromStrokeTint});
       with(borderPanels.add()){
        with(dialogColumns.add()){
         staticTexts.add({staticLabel:"To:", minWidth:36});
        with(dialogColumns.add()){
         with(dialogRows.add()){
          with(dialogColumns.add()){
           staticTexts.add({staticLabel:"Stroke Weight:", minWidth:100});
          with(dialogColumns.add()){
           //Updated.
           var myToStrokeWeightField = realEditboxes.add({editValue:myToStrokeWeight});
         with(dialogRows.add()){
          with(dialogColumns.add()){
           staticTexts.add({staticLabel:"Stroke Tint:", minWidth:100});
          with(dialogColumns.add()){
           //Updated.
           var myToStrokeTintField = percentEditboxes.add({editValue:myToStrokeTint});
       with(borderPanels.add()){
        with(dialogColumns.add()){
         staticTexts.add({staticLabel:"Destination Layer:"});
        with(dialogColumns.add()){
         //Updated.
         var myLayersMenu = dropdowns.add({stringList:myLayerNamesList, selectedIndex:myLayerIndex});
    var myResult = myDialog.show();
    if(myResult == true){
      //Get the values from the dialog box controls
      var myNumberOfSteps = myNumberOfStepsField.editValue;
      var myFromStrokeColor = mySwatchNamesList[myFromStrokeColorMenu.selectedIndex];
      var myFromStrokeWeight = myFromStrokeWeightField.editValue;
      var myToStrokeWeight = myToStrokeWeightField.editValue;
      var myFromStrokeTint = myFromStrokeTintField.editValue;
      var myToStrokeTint = myToStrokeTintField.editValue;
      var myLayerName = myLayerNamesList[myLayersMenu.selectedIndex];
      myDialog.destroy();
      //Write dialog preferences file.
      //Change the values in the XML preferences object.
      myPreferences.NumberOfSteps = myNumberOfSteps;
      myPreferences.FromStrokeColor = myFromStrokeColor;
      myPreferences.FromStrokeWeight = myFromStrokeWeight;
      myPreferences.ToStrokeWeight = myToStrokeWeight;
      myPreferences.FromStrokeTint = myFromStrokeTint;
      myPreferences.ToStrokeTint = myToStrokeTint;
      myPreferences.LayerName = myLayerName;
      //Write the values back to the XML file.
      myWriteXMLPreferences("NeonWithPrefs", myPreferences);
      //Apply the effect.
      myNeon(myObjectList, myNumberOfSteps, myFromStrokeColor, myFromStrokeWeight, myToStrokeWeight, myFromStrokeTint, myToStrokeTint, myLayerName);
    else{
      myDialog.destroy();
    function myNeon(myObjectList, myNumberOfSteps, myFromStrokeColor, myFromStr

  • Calculation of values in a dunning form (SAP Script)

    Hi Experts!
    I want to add values to a sum (dunning-amount + dunning-fee + interest) in a dunning form (SAP Script; Z150_DUNN_02).Therefore I'm using a subroutine (Z_FI_KX_DUNN_02_INTEREST) to summarize. Problem is the format of the output-field &Z_FAEBT&. It's not similar to field &MHNK-FAEBT& which was formerly printed (without calculation of interest and dunning-fees.
    /:   DEFINE &Z_FAEHW& := &MHNK-FAEHW&                 
    /:   DEFINE &Z_ZINHW& := &MHNK-ZINHW&                 
    /:   DEFINE &Z_MHNGH& := &MHNK-MHNGH&                 
    /:   DEFINE &Z_FAEBT& := &MHNK-FAEBT&                 
    /:   PERFORM ZFAEBT IN PROGRAM Z_FI_KX_DUNN_02_INTEREST
    /:   USING &Z_FAEHW&                                  
    /:   USING &Z_ZINHW&                                  
    /:   USING &Z_MHNGH&                                  
    /:   CHANGING &Z_FAEBT&                               
    /:   ENDPERFORM                                       
    /:   ENDIF                                            
    A3   &MHNK-WAERS& &Z_FAEBT(C)&       
    It would be fine to get a hint how to format the field &Z_FAEBT& correctly. Must be done in the subroutine Z_FI_KX_DUNN_02_INTEREST by a special WRITE-command? Is it possible to add these values only in the form?
    Thanks for support!
    Regards, Bernd

    hi!
    I defined the field like you said! After moving this field to a numeric field to add the different amounts the
    following error occurred:
    Runtime errors         CONVT_NO_NUMBER           
    Exception              CX_SY_CONVERSION_NO_NUMBER
    Occurred on     16.06.2009 at   15:15:25  
    Unable to interpret " 1.316,59" as a number.     
    Definition:
    FORM zfaebt TABLES in_par STRUCTURE itcsy
                       out_par STRUCTURE itcsy.
      TABLES: mhnk.
      DATA: z_faehw_num LIKE mhnk-faehw,
            z_zinhw_num LIKE mhnk-zinhw,
            z_mhngh_num LIKE mhnk-mhngh,
            z_faebt_num LIKE mhnk-faebt.
      DATA: z_faehw TYPE string,
            z_zinhw TYPE string,
            z_mhngh TYPE string,
            z_faebt TYPE string.
    statement:
      READ TABLE in_par WITH KEY 'Z_FAEHW'.
      CHECK sy-subrc = 0.
      z_faehw = in_par-value.
      z_faehw_num = z_faehw.
    I suppose a type-conflict.
    Regard, Bernd

  • How can i pass parameter values from html to a shell script

    Hi Guys...
    I had a requirement where i need to execute a sql statement and print the output in HTML page. This report has parameters to enter. So i created a HTML form which accepts parameters. When the submit button is pressed, the action tag in the form invokes unix shell script file. It will open sqlplus and run the sql script file .sql and print the output in the HTML page.
    sql script contains the query and some set options which prints the output in HTML page. Like "SET MARKUP HTML ON"... The query has some parameters like "select * from emp where empno = &&empnumber. I will use the same name "empnumber" while created the HTML parameter form like " <input type = "text" name="empnumber" size="10" align="left">.
    user sees this parameter form and enters some value in to that empno text box.
    My question is how can i catch these parameter values in a shell script and pass it to the sql script to execute it.
    Help Appreciated
    Thanx

    This is a A Bad Idea (tm). This type of CGI processing is old and were (and still is) full of security holes. Very easy to inject stuff (Unix commands and SQL) into it.. To get those parameters into SQL*Plus requires using Unix shell commands to process it - and something like a backquote allows all kinds of nasty stuff to be injected. The Unix shell was never designed to be used as a secure CGI environment.
    There are far better and far superior alternatives. Perl (with Perl_DBI) and PHP (using Zend Core for Oracle) come to mind as web scripting languages.
    Even easier is using HTMLDB. Very few moving parts. Is free. Supports Oracle 9.2 and 10G.

  • In eCATT, How to mention the values as  input parameter during test script

    Hi,
    1. I am just learning eCATT tool. I created a Test Script by recording my transaction. But if i want to execute the recorded transaction with different data then how to store the values.
    2. How to execute my Test Script created in one client to another client of same server. is it just by mentioning the target system or do we have to do anything in anothere client.
    Lakshmi

    Hi
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0e0ebec-c9da-2910-689e-b1a22a621c7f
    Manoj Shakya.

  • How can I pass value from sql query to unix script

    I am new to oracle/unix.
    I want to write a simple script to find max date from a table and then pass date into a variable in a korn shell script.
    sql is select max(date) from table;
    how can I pass that value in unix shell as a variable. Thanks

    I use to code like this.
    Enjoy Scripting.
    cmd.sql
    select sysdate from dual;
    exit
    db.sh
    #! /usr/bin/ksh
    . ~oracle/.orapaths
    dbdate=$(sqlplus -S user/pwd@servicename @cmd.sql)
    echo $dbdate
    Run shell scripts
    ./db.sh
    SYSDATE --------- 19-JAN-07

  • How to create a field value as constant while creating eCATT scripts

    Hello Guru's,
    I am updating thousands of records using eCATT.  How should i declare a field value as constant while creating a eCATT script it self,  so that it automatically picks that value and  update the records. I should not mention the field value in the upload file.
    Full points for the answer,

    Dont parameterize the value that you would like to keep as constant. Pass the default value to that feild while reocrding .

  • Is it possible to define default value of a variable in sql scripts

    Hi,
    I was thinking of a way to assign a default value to a variable without any prompt by the script as we do in shell script.
    To make my query more clear, consider the example.
    suppose we have a sql script like test.sql with contents
    ===========================================
    define x=&1
    declare
    x1 number;
    begine
    x1:=nvl(&x,10);
    dbms_output.put_line(x1);
    end;
    ===========================================
    even though I am using nvl it will prompt for value of 1 which needs user interference. for example if I run test.sql output is as below:
    =============
    SQL> @test
    Enter value for 1:
    10
    =============
    Is there any way to avoid sql from prompting for values of variables for which we want it to take a default value (if not specified as input argument)
    Thanks
    now if i run this as
    sql>@test 10
    it executes

    I wan't to accept the value as command line argument. say the whole statement is written into an sql file say test.sql so that &1 will hold any value specified as input.
    So the issue is although sql will execute the procedure if no value is specified but it will still prompt once for any variable (&x or &1). if you don't specify anything and just press enter than only the default value is taken.
    I wan't the script to be executed on cron without user interference. So, was looking if there's a way to specify default value for cron script.

  • Assigning values to repeating subforms using a script

    I am using a script to add values to a repeating subform. Below is a simple example. In the real script I would use a loop to do the inserts.
    //declare XML structure
    String hrxdproot = /process_data/hrxfaform/object/data/xdp/datasets/data/form1";
    //assigning repeating subform number
    int i = 1;
    //assign a value to the first repeating subform
    patExecContext.setProcessDataStringValue(hrxdproot + "/Details[" + i +"]/employee_name", "Aditya");
    However, the error I get is
    "Target exception: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. "
    I also tried to use a SetValue module to perform the same function and got the above error.
    /process_data/hrxfaform/object/data/xdp/datasets/data/form1/Details[1]/employee_name = "Aditya"
    Finally, I manually merged a sample xml (with 2 instances of the repeating subform) with the pdf and it worked fine. So I don't think there is a problem in the XML.
    Can someone please help...
    Aditya

    But the question is wether or not you're going to dynamically add nodes to your structure. Even if the schema permits to have multiple nodes under a specific section, it's hard to use xPath to do that. For example if you have a structure like the following:
    <Root>
      <Node1/>
    </Root>
    and use the following xPath /process_data/xmlvar/Root/Node1/Child1, you're going to end up with the following:
    <Root>
      <Node1>
          <Child1>
       </Node1>
    </Root>
    Now if you try to add another node under child node with a similar xPath /process_data/xmlvar/Root/Node1/Child2, you're going to end up with the following:
    <Root>
      <Node1>
          <Child2>
       </Node1>
    </Root>
    It won't append the node, it will replace everything under Node 1.
    So if this is what you're trying to do (add multiple children nodes), then you would have to create the xml structure using standard DOM objects within a custom component or the script service and the set the resulted xml to an xml variable.
    I hope this clears thigns up.
    Jasmin

  • How to get the old value of any property in DRM script or formula

    Hi,
    Can we somehow capture the old property value in DRM formula or Script.
    Let's say, I have property ABC with possible values as 'Yes' and 'No'.
    Now once this property value is changed to Yes, a restriction has to be placed so that no-one can change the property value to No.
    Can this be achieved in DRM?

    Can we somehow capture the old property value in DRM formula or Script.
      - No, not possible with Formula, to some extent you can load a script from Transaction History, that will just give you the latest values for the node Properties.
       - If you just wish to report out the Node property current and previous values, you can perform Audit or Execute a Transaction log Export.
    Let's say, I have property ABC with possible values as 'Yes' and 'No'.
    Now once this property value is changed to Yes, a restriction has to be placed so that no-one can change the property value to No.
    - Please create a validation to check if the Property value is 'Yes', if so,please throw an exception so that no one can perform further updates.
    -Murali

  • Get item value of hidden item in java script on standard report

    I've a report with following query:
    select "ROWID",
    "GTEMPDETAILID",
    "GTEMPID",
    "NORMTEXT",
    "ITEMTYP",
    "ITEM",
    "BEMERKUNG"
    from "#OWNER#"."ALAVIS_GTEMPDETAILS"
    Item GTEMPDETAILID is hidden (set in column attributes).
    I defined an onclick event in the report template to set the value of GTEMPDETAILID into a Page item. This works, if the GTEMPDETAILID is not hidden. But how can I get the value of an hidden item in javascript?

    I am guessing this hidden value is not a protected item because youre manipulating the value. How about setting is a textfield but inside the "HTML form element" property, specify style="display:none;" or you can nest <script type="text/javascript">$x_Hide("ID_OF_TEXTFIELD");</script> in the page somewhere...
    Question, have you tried using $x_Value('ID_OF_ITEM','VALUE_OF_ITEM') ? this is APEX javascript API
    you can also use $x('ID_OF_ITEM') to retrieve DOM object, or $v('ID_OF_ITEM); to retrieve item values.
    Let me know if you need additional assistance.
    Edited by: srbonham1 on Jul 27, 2012 4:31 PM

  • How to modify default value of Login Shell attribute via script

    Hi all,
    I'm configuring the "UNIX Attributes" tab here in Active Directory Users and Computers. I've noticed that on the Login Shell option it has a default value: /bin/sh. So I had manually changed it to: /bin/bash.  I just change this value one
    bu one manually.  Now, I want to change this value for all users via script. Could you please help me to receive this goal?
    Thank you in advance.

    Use Get-AdUser / Set-AdObject
    Get-AdUser -Filter * | Set-AdObject -Replace @{unixhomedirectory='/bin/sh','bin/bash'} -WhatIf
    ¯\_(ツ)_/¯

  • Passing value from a program to sap script ?

    Hello Friends,
    While defining the header,footer or address window to assign a text we goto text element and assign it.
    Now is there any way where we can pass the value from the program.
    Eg : I want to pass the value for address from the abap editor to the address window in a sap script instead of assigning the address using the text element in sap script. Is it possible?
    Regards,
    Ranjith

    You can have subroutines in script.
    if you have any fields used to get address then using that fileds you can retrieve the address by defining subroutines in your form
    Reward points if useful.
    Regards,
    Nageswar

  • How to assign money value to CRM money field in Script component?

    Hi All,
    Can anyone please help me with below issue?
    I have a money value (eg. 25.00) in the SQL table (Source) of type string which I am reading it in script component and want to push that same to MS CRM(destination) currency field.
    I have used Money class but still it is throwing the exception "System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #444AFC47"
    Used this lines of code. Please let me know if I am doing anything wrong and help with resolution.
                    if (!Row.Amount_IsNull)
                        Money Amount = new Money();
                        Amount.Value = Convert.ToDecimal(Row.Amount);
                        newTbldetails["new_amount"] = Amount.Value;
    Note: new_amount is the attribute in MS CRM (destination) with type Currency.
    Thanks,
    Sri

    This below code worked. There was a mistake in the assignment.
                    if (!Row.Amount_IsNull)
                        Money Amount = new Money();
                        Amount.Value = Convert.ToDecimal(Row.Amount);
                        newTbldetails["new_amount"] =
    Amount;
    Thanks,
    Sri

Maybe you are looking for

  • BAPI_POEC_CREATE

    Would anybody be kind enough to give me some example code for calling BAPI_POEC_CREATE !? I have used BAPI_POEC_GETDETAIL with existing POs to have a good look at what the data should look like. But despite all sorts of combinations of parameters and

  • Hide multiple selection of parameter related to Standard Report Category.

    Hi, I have created the report program with the logical database PNPCE , report category HRF_PNOC having PNPPERNR in the selection screen With Multiple selection. I want to hide the multiple selection button  for this PNPPERNR in the selection screen.

  • Pacman -Syu - errors occurred, no packages were upgraded

    Today I wanted to update my system so a ran pacman -Syu command, download worked perfect as usual    but when it got to installation I've seen this: checking package integrity... done. loading package data... done. checking for file conflicts... erro

  • SAP PS & Primavera difference

    Hi Everyone, How can I differentiate SAP PS from PrimaVera in terms of scheduling or three constraints? Want to know what are the things that are possible in PrimaVera but cannot be efficiently done in SAP PS? Reference docs will be appreciated. PL h

  • ICloud apps

    Is a Pages doc the only format that gets recognized and handled/transferred/"pushed" by icloud iOS? And/or, can I do this with Textedit in icloud?