Concatenate text and property of dimension in script logic

hello experts,
how to concatenate text and property of dimension in script logic?
as example:
dimension : interco
property    : mgmtallocdefcc
*WHEN TIME.YEAR
*IS %YEAR_VAR%
*REC(EXPRESSION=%VALUE%,ACCOUNT=12345,ENTITY="I_" [INTERCO],MGMTALLOCDEFCC)
*NEXT
then it will read all as text: I_[INTERCO].MGMTALLOCDEFCC
for example the value of property mgmtallocdefcc in interco dimension (INTERCO.MGMTALLOCDEFCC) is ABCDE.
what i expect is :I_ABCDE
thanks!

Hi Yoki,
Concatenation is only possible between text and variables %VAR% or $VAR$.
Like ENTITY=I_%SOMEVAR%
But in your case instead of concatenate you have to use other property like TARGETENTITY having valid ENTITY members:
ENTITY=INTERCO.TARGETENTITY
B.R. Vadim

Similar Messages

  • [ASK] Get One Row of Property Value From Dimension in Script Logic

    Hello, i need help about how to get one row of property value from dimension in script logic.
    Let say there is CATEGORY dimension and the members are like this :
    ID                                                  YEAR   Status
    PLAN_2011                                   2011        A
    PLAN_2011_V1                            2011        I
    ACTUAL_2011                              2011        I
    FORECAST_2011                         2011        I
    FORECAST_2011_V1                  2011        A
    PLAN_2012                                  2012        A
    PLAN_2012_V1                           2012        I
    ACTUAL_2012                             2012        I
    FORECAST_2012                         2012        I
    FORECAST_2012_V1                  2012        A
    If i scope CATEGORY like this :
    *XDIM_MEMBERSET CATEGORY = [CATEGORY].PROPERTIES("YEAR") = "2011"
    Then i will get member scope like this :
    PLAN_2011                                   2011        A
    PLAN_2011_V1                            2011        I
    ACTUAL_2011                              2011        I
    FORECAST_2011                         2011        I
    FORECAST_2011_V1                  2011        A
    Question :
    In script logic, how can i read the second record of scope and move it to variable ?
    Ex. : I read second record, so i can get the data of second record (PLAN_2011_V1, 2011, A).
    Is there any function to read all record that had been scope ? So i can read all those 5 records.
    Is there any substring or offset function in script logic ? How to use it ?
    Thank you.

    Hi,
    Firstly, when we scope the logic, it doesnt fetch the entire record from the member sheet. It just fetches the ID.
    Secondly, we dont have the feasibility to read only the second ID and skip the others. However, one alternative is that you use the SELECT statement to store all the IDs in a variable, and then use a FOR loop. But this will loop through all the 5 IDs, as per your example. If you want to skip all the IDs except one, you should maintain some property, so that all the IDs are neglected which doesnt have a particular property value.
    Hope you got the idea.

  • Test script logic file - Errror "Invalid Dimension Account"

    Hi BPC Experts,
    I am a new bee in BPC and have developed HCM applicaton in BPC 5.1. The Appset contains Finance, Rate & HCM applications.
    I am working on HCM and wants to write a script logic file for HCM and it is giving an ERROR "Invalid Dimensin Account".
    I have following dimensions in HCM Application:
    account_hc --> type A
    category_hc --> type C
    company_hc --> type E
    time_hc       -->  time t
    costcenter_hc --> type u
    datasrc_hc      --> type d
    employerole_hc --> type u
    geography_hc --> type u
    rptcurrency_hc --> type r.
    I had defined Dimensions in system_cnstants file as mentioned below.
    // application constants
    *FUNCTION CATEGORYDIM         =CATEGORY_HC
    *FUNCTION TIMEDIM  =TIME_HC
    *FUNCTION CURRENCYDIM  =RPTCURRENCY_HC
    *FUNCTION ENTITYDIM  =COMPANY_HC
    *FUNCTION ACCOUNTDIM  =ACCOUNT_HC
    *FUNCTION INTCODIM  =INTCO
    *FUNCTION CATEGORYDIM         =CATEGORY
    *FUNCTION TIMEDIM  =TIME
    *FUNCTION CURRENCYDIM  =RPTCURRENCY
    *FUNCTION ENTITYDIM  =ENTITY
    *FUNCTION ACCOUNTDIM  =ACCOUNT
    // This part is needed when a RATE cube
    // is associated to the application
    // (FX = single or multi currency)
    *FUNCTION THISAPP  =HCM
    *FUNCTION RATEAPP  =RATE
    *FUNCTION RATEENTITYDIM =RATESRC
    *FUNCTION RATEACCOUNTDIM =RATE
    *FUNCTION INPUTCURRENCYDIM =INPUTCURRENCY
    *FUNCTION RATEENTITYMBR =RATEINPUT
    *FUNCTION RATESRCCALCMBR =RATECALC
    *FUNCTION AVGRATEID=AVG
    *FUNCTION ENDRATEID=END
    I tried to validate and save standard default script logic. But it gives me an error " NO match defined for lookup dimension Category"
    So I could not use default logic file to write my script logic. Hence I have created HCM logic file. and Given the following script logic.
    *XDIM_MEMBERSET  ACCOUNT = XYZ_INC_RetPlan
    *WHEN ACCOUNT
    *IS  XYZ_INC_RetPlan
    *REC(FACTOR = 1.1, ACCOUNT)
    *ENDWHEN
    *COMMIT
    While validat & save, I get an error "Invalid Dimension Account".
    I do not understand why these errors occuring.
    I have checked Category & Account dimensions checked. Every thing is ok. I have created Input schedules and they are working ok. It means the dimensions are fine.
    Then why the error ?
    Can you guys please guide me.
    Appreciate your kind help.

    Eswara,
      try  to  close  down  BPC  for  ExCEl  in  case  your  IS/Reports  are  trying  to  access  the  APPlication.And  also  any  other  BPC  ADmin screens  accessing  the  same  Application/Dimension.
    1)try to  only  do  a  "process "  on the  account  dimension without  including  the  processing for Applications...
    2)then  try  to  do a  process  on the  application.
    Now  your  script  should  be  able  to recognize  Account  dimension  and  validate  fine..
    hope  this  helps...

  • FOR loop in script logic

    Dear Gurus,
    This is the logic I am working with:
    *FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
    [ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]? [ACCOUNT].[EQUIPMENT1] : ([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
    *NEXT
    I am trying to execute the above script logic, but the system is throwing an error that says 
    "Duplicate formula found:  [ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+......."
    Any idea why this is happening?
    Also, could you please suggest a better way of writing the above code?
    Thanks,
    Vijay.

    As a testing scenario, I have calculated the depreciation in a different part of the same logic.  Here it is:
    //This logic calculates the accumulated depreciation amount for the time period specified in the logic
    //NOTE:  This logic is not very dynamic and is only valid for the accounts specified in the logic
    //A FUTURE ENHANCEMENT TO THIS LOGIC WOULD BE TO MAKE THE "LIFE" OF THE ASSET A $DATAMANAGER VARIABLE$
    //AND WRITE A CUSTOM SCRIPT LOGIC
    //BEGIN SCRIPT LOGIC FILE//
    //CONSTANTS
    *XDIM_MEMBERSET CATEGORY=ACTUAL
    *XDIM_MEMBERSET ACCOUNT=Depreciation,AccumDepr,NBV_EQUIPMENT1,EQUIPMENT1
    *XDIM_MEMBERSET ENTITY=STORE1
    *XDIM_MEMBERSET TIME=2008.JAN,2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //BEGIN: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE //
    *WHEN ACCOUNT
    *IS EQUIPMENT1
         *WHEN TIME
         *IS 2008.JAN
              *REC(FACTOR=1,ACCOUNT="NBV_EQUIPMENT1")
         *ENDWHEN
    *ENDWHEN
    *COMMIT
    //END: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE   //
    //BEGIN: CALCULATE DEPRECIATION //
    *WHEN ACCOUNT
    *IS EQUIPMENT1
         *REC(EXPRESSION=(%VALUE%/6),ACCOUNT="Depreciation")
    *ENDWHEN
    *COMMIT
    //END: CALCULATE DEPRECIATION   //
    //BEGIN: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE //
    *FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
    *WHEN CATEGORY
    *IS ACTUAL
    *REC(EXPRESSION=IIF((([ACCOUNT].[AccumDepr] + [ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]), [ACCOUNT].[EQUIPMENT1], [ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
    *ENDWHEN
    *NEXT
    //*FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE NET BOOK VALUE OF THE ASSET IS LESS THAN ZERO//
    //*[ACCOUNT].[#NBV_EQUIPMENT1] = (([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation])>0? ([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation]) : 0)
    //*NEXT
    *COMMIT
    //END: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE   //
    //END SCRIPT LOGIC FILE//
    Please let me know if there is a better way to write this code.
    Thanks for all your help.

  • MEASURES in script logic

    Hi All!
    How can I use YTD measures in script logic? My aplication is PERIODIC ( YTDInput set to No) and I need in my script logic to use YTD values for some calculation. I tried following syntax
    *REC(EXPRESSION=([C_ACCT].[PLM],[MEASURES].[YTD]))
    but after validation error appears
    http://screencast.com/t/q2gChPrqbVXy.
    Please help, how to use measures dim in script logic??
    Regards,
    Justyna

    Full script not it is working fine after change *XDIM_MEMBERSET MEASURES=YTD to *XDIM_MEMBERSET MEASURES=PERIODIC
    *XDIM_MEMBERSET C_ACCT = VALCON_EN020
    *XDIM_MEMBERSET MEASURES=PERIODIC
    *WHEN_REF_DATA = MASTER_DATA
    *WHEN C_ACCT
    *IS VALCON_EN020
    *REC(EXPRESSION=([C_ACCT].[PLM],[MEASURES].[YTD]))
    *ENDWHEN
    *COMMIT

  • SAP SCRIPT Header text and Item text not printing in customized PO

    Hello Experts,
                          I have copied the standard MEDRUCK to ZMEDRUCK and customized the form according to the requirement.
    I want to print the header text and Item text in my form.
    For Header text I have used :
    /: INCLUDE &EKKO-EBELN& OBJECT EKKO ID F01
    Problem 1: The text what I enter in header text is flowing only when I hit on print preview without saving the form. Once I save the SAP SCRIPT  and click on print preview the field is appearing blank. I also tried to print the form, but the field is appearing blank even on the print out.
    Problem 2: For item text the field is concatenation of  EBELN & EBELP. Can anyone suggest me how to concatenate and fetch the text in item text.

    Hi,
        Im getting an error in my subroutine pool for i_xtline which is to fetch ITEM TEXT., It says its not a in any internal table nor defined as data. How can I proceed further. I have pasted my code below. Please check and revert ASAP
    PROGRAM  ZMEDRUCK_SUBP1.
    TABLES: EKPO, EKKO.
    FORM fetch_table_data TABLES in_tab STRUCTURE itcsy
                                 out_tab STRUCTURE itcsy.
    data xname like THEAD-TDNAME.
    data i_xtline like xtline.
    clear i_xtline.
    refresh i_xtline.
    CONCATENATE EKPO-ebeln EKPO-ebelp INTO v_item_text.
    MOVE v_item_text to ITEMTXT.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
      CLIENT                        = SY-MANDT
        id                            = F01
        language                      = EN
        name                          = ITEMTXT
        object                        = EKPO
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = i_xtline
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.

  • How to Read the "text file and csv file" through powershell Scripts

    Hi All
    i need to add a multiple users in a particular Group through powershell Script how to read the text and CSV files in powershell
    am completly new to Powershell scripts any one pls respond ASAP.with step by step process pls
    Regards:
    Rajeshreddy.k

    Hi Rajeshreddy.k,
    To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
    To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
    $Users = Get-Content -Path 'C:\ListOfUsernames.txt'
    $Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
    Add-ADGroupMember -Identity $Group -Members $Users

  • When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this? ex) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.

    When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this?
    It's always a decimal point too.
    ex 1) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.
    ex 2) moved a 124pt text to the right (Shift + arrow right a few times) and text changed to 14.06pt.

    When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this?
    It's always a decimal point too.
    ex 1) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.
    ex 2) moved a 124pt text to the right (Shift + arrow right a few times) and text changed to 14.06pt.

  • Script logic using Dimension.Property

    Hello, Gurus!
    I have next problem with script logic:
    Dimension Company
    Company1
    Company2...
    Dimension Document
    Document1
    Document2...
    Dimension Document has property PCompany, where there is Company ID.
    I need to summation all data for Company=Company2 (for example).
    How can I choose records from Dimension Document for PCompany=Company2 with BPC script logic?
    Thanks!
    Regards,
    Svetlana.

    Hello Gersh!
    Thank you very much. It's worked.
    I should clarify the question
    I have several company which I choose with property of Company (for example, INTERCOMP=Y)
    So, I have :
    *SELECT(%COMPANY%,ID,COMPANY,INTERCOMP=Y)
    *WHEN Document.PCompany
    *IS  %COMPANY%
    *ENDWHEN
    This construction doesn't work.
    Regards,
    Svetlana.

  • Create mirror text and stroke text in AI Scripting

    Hello All,
    Please help me with the Script of creating mirror text and stroke text in Adobe illustrator scripting.
    Thanking you.
    With Regards
    Sawlay Singh.

    second: mark your answers as correct if you're helped, or at least come back and say "thanks"
    remember 'dinner for one'?
    http://forums.adobe.com/thread/1146984

  • Concatenate hex and text into text in old versions

    Hello!
    The code
    DATA: v_hex1 TYPE x VALUE '0A',
          v_text1 TYPE char100,
          v_text2 TYPE char100.
    CONCATENATE v_hex1 v_text1 INTO v_text2.
    works fine on my 4.7 WAS 620 system. However, I've got complaints from other SDNers (I've posted a weblog with code) that they get systax error <i>V_HEX1 must be a character-type data object (data type C, N, D, T or String), field string).</i>
    Is there an alternative, version-independant way, to concatenate hex and text into text?
    My problem is that I don't have older SAP version available, so I can't test.
    Thanks!
    Igor

    Hi Igor,
    I have executed this very code on a 4.6C system and on a 4.0B system. I did not get any error. But if I change the type of v_hex to an integer, then I get the error which says the data type of v_hex should be C,N,D,T or string.
    I wonder why I do not get the error even when v_hex is of type x.
    Anyways, if the error does come, then may be we can use something like this -
    DATA: v_hex1 TYPE x VALUE '0A',
          v_text1 TYPE char100,
          v_text2 TYPE char100.
    write v_hex to v_text2.
    CONCATENATE v_text2 v_text1 INTO v_text2.
    This will not give you any error as such, but 0A is interpreted as a character string :-(.
    =======================================
    More surprisingly, if I execute your code on a 4.7 with WAS 640, I get the error you are talking about.
    With some confusion,
    Anand Mandalika.

  • Script Logic: Using a property in MDX *REC statement (BPC NW)

    Hi,
    Is it possible to use a Property in an MDX statement without using  *LOOKUP() function? I have script successfully working but it takes 15 minutes to execute and would like to speed it up.
    I understand that [DIMENSION].[MEMBER].Property is not valid syntax, and do not believe NW has any other functions to resolve the issue, except *LOOKUP which takes a long time.
    Specific Example is below:
    I have a piece of script that successfully splits JV Expense by customers. A Profit Share planning driver determines the percentage that each customer is entitled to. Typically this will be 100%, but could be 50% between two customers.
    The PROFIT SHARE planning drivers records, and PARTNER_INCOME transactional records are below:
    ACCOUNT
    ENTITY
    PARTNER
    SIGNED DATA
    PROFIT_SHARE
    UK_001
    PARTNER_A
    0.5
    PROFIT_SHARE
    UK_001
    PARTNER_B
    0.5
    PROFIT_SHARE
    UK_002_PLANNING_DRIVERS
    PARTNER_B
    1.00
    PARTNER_INCOME
    UK_001
    NO_PARTNER
    $5,000
    PARTNER_INCOME
    UK_002
    NO_PARTNER
    $5,000
    UK_001 has two partners that are each entitled to 50% of the $5,000 NET PROFIT.
    For UK_002, one one single Partner is entitled to 100% of the $5,000 NET PROFIT.
    Using script logic, you can scope the Profit Share account (PROFIT_SHARE) - , and use a *REC statement to multiply this by the driver. It would look like:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *REC (EXPRESSION = %VALUE% * ([ACCOUNT].[PROFIT_SHARE],[PARTNER].[NO_PARTNER]), ACCOUNT = PARTNER_PROFIT_SHARE)
    *ENDWHEN
    This wouldn't be a problem if the Planning Driver is always stored on the same Entity that the Income is stored on, but for UK_002, the planning driver is stored on another Entity - which is stored in a the PLAN_DRIVER_REF property of the entity. It should use UK_002_PLAN_DRIVERS
    ID (Entity)
    PLAN_DRIVER_REF
    UK_001
    UK_002
    UK_002_PLAN_DRIVERS
    UK_002_PLANNING_DRIVERS
    In this scenario, we need to switch out the Entity used in the MDX, however I do not believe you can use a property in MDX - can anyone confirm?
    I have currently implemented the *LOOKUP functionality to loop through, changing each *LOOKUP partner for each loop.
    Lookup:
    *LOOKUP PLANNING_JV_US
    *FOR %LOOP_ASLS% = %ASL_LOOKUP_LOOP_VARIABLE%        
      *DIM LOOK_%LOOP_PARTNERS%:ACCOUNT = "PROFIT_SHARE"
      *DIM LOOK_%LOOP_PARTNERS%:PARTNER= %LOOP_PARTNERS%
    *NEXT
    *DIM ENTITY = ENTITY.PLAN_DRIVER_REF                   //   Use PLAN_DRIVER_REF Property of Entity
    *ENDLOOKUP
    Scope and *REC:
    *XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
    *WHEN ACCOUNT
    IS *
    *FOR %LOOP_PARTNERS% = %PARTNER_LOOKUP_LOOP_VARIABLE%      // 1000 Partners
    *REC(EXPRESSION = %VALUE% * LOOKUP(LOOK_%LOOP_PARTNERS%), PARTNER= %LOOP_PARTNERS%, ACCOUNT = TCOJVSHAR_CALC, AUDIT_ID = PP_EXPENSE_BY_PARTNER)
    *NEXT
    *ENDWHEN
    The problem with the above, is that because the Lookup is being generated for every single Partner, there are significant numbers of loops.
    Does anyone know of another way this can be implemented in Script Logic? Otherwise we'll need to explore BAdI route.
    Thanks,
    Nick

    Hi Nick,
    Use property in LOOKUP - will dramatically speed up the calculation without FOR/NEXT.
    Vadim

  • Search for text and font

    I have an 800 page pdf document to index and so far I have a script that will search for a list of keywords. But the text has large sections of code in a different font, and I think we would like to generate an index of just code examples. Is there a way to search for text of a given font in applescript? Something like
    set theSel to find text theText
    if the font of theSel is "Times"
    write to file, etc.

    Please do send a page, I might be able to spot where the font problem is coming from - but no guarantee Address is in my profile.
    You asked about the script formatter. red_menace of this forum wrote the script I use. To use it, you copy the script that you want to format to the clipboard and run the formatter. This then places the marked-up text in the clipboard so that you can paste it into the forum page.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;">
    script formatter - formats the clipboard text for forum posting
    last reviewed January 19, 2009   red_menace[at]mac[dot]com
    Input: text read from the clipboard
    Output: formatted text copied to the clipboard
    set AppleScript's text item delimiters to " "
    -- some constants and switches
    property TextColor : "#000000" -- black  (see http://www.w3schools.com/tags/ref&#95;colornames.asp)
    property BackgroundColor : "#FFDDFF" -- a light plum/purple
    property BorderColor : "#000000" -- black
    property TheWidth : "width: 720px; " -- a width attribute  (deprecated in HTML 4.01)
    property UseWidth : true -- use the width attribute?
    property LineCount : 25 -- the number of lines before including the height attribute
    property TheHeight : "height: " & ((LineCount * 13.6) as integer) & "px; " -- a maximum height for the <pre> box
    property Emphasize : false -- emphasise (bold) the script text?
    property UseURL : false -- include a Script Editor message link?
    property AltURL : false -- use an alternate URL encoding?
    property ToolTips : {¬
    "this text can be pasted into the Script Editor", ¬
    "this text can be pasted into an Automator 'Run AppleScript' action", ¬
    "this text can be pasted into an Automator 'Run Shell Script' action", ¬
    "this text can be pasted into a HTML editor", ¬
    "this text can be pasted into a text editor", ¬
    "- none -"}
    property TooltipDefault : {item 1 of ToolTips} -- keep track of the last tooltip used
    property TempFile : "Script_Formatter_TempFile" -- a temporary work file
    try
    -- write the clipboard to the temporary file
    set TheClipboard to (the clipboard) as text
    if TheClipboard is in {"", space, tab, return} then return -- clipboard is (basically) empty
    set MyOpenFile to open for access ("/tmp/" & TempFile & ".txt" as POSIX file) with write permission
    set eof of MyOpenFile to 0 -- empty any previous temp file
    write TheClipboard to MyOpenFile
    close access MyOpenFile
    if UseURL then
    -- encode URL  (see http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/pydoc.1. html)
    do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of TheClipboard
    -- add a link wrapper
    set URLtext to "applescript://com.apple.scripteditor?action=new&script=" & the result
    if AltURL then -- use an alternate URL encoding
    set URLtext to "Click here to [url=" & URLtext & "]open this script in the Script Editor[/url]:<br />"
    else -- use HTML anchor tag
    set URLtext to "Click here to <a href=\"" & URLtext & "\">open this script in the Script Editor</a>:<br />"
    end if
    set PromptText to ((count URLtext) as text) & " URL and "
    else
    set {URLtext, PromptText} to {"", ""}
    end if -- UseURL
    -- convert to HTML  (see http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/textutil .1.html)
    do shell script "cd /tmp/; /usr/bin/textutil -convert html -excludedelements '(html, head, title, body, p, span, font)' -encoding US-ASCII " & TempFile & ".txt"
    -- fix up some formatting and add a pre wrapper  (see http://www.w3schools.com/tags/default.asp)
    set HTMLtext to rest of paragraphs of (read ("/tmp/" & TempFile & ".html" as POSIX file))
    if (count HTMLtext) is less than LineCount then -- skip the height attribute
    set Height to ""
    else
    set Height to TheHeight
    end if
    set HTMLtext to FixCharacters from (HTMLtext as text) -- additional character encodings
    if UseWidth then
    set Width to TheWidth
    else
    set Width to ""
    end if
    if Emphasize then set HTMLtext to "<strong>" & HTMLtext & "</strong>"
    set HTMLtext to "<pre style=\"
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid " & BorderColor & ";
    " & Width & Height & "
    color: " & TextColor & ";
    background-color: " & BackgroundColor & ";
    overflow: auto;\"
    title=\"\">
    " & HTMLtext & "</pre>
    -- assemble everything on the clipboard
    set TheResult to choose from list ToolTips ¬
    with title "Script Formatted" with prompt PromptText & ((count HTMLtext) as text) & " HTML characters will be placed on the clipboard (plus the following ToolTip):" default items TooltipDefault OK button name "OK" cancel button name "Cancel" with empty selection allowed without multiple selections allowed
    if TheResult is false then -- cancel button
    error number -128
    else -- add the selected title attribute (tooltip), if any
    set TooltipDefault to TheResult as text
    set Here to (offset of " title=" in HTMLtext) - 1
    set There to (offset of ">" in HTMLtext) - 1
    if TheResult is in {{}, "- none -"} then -- no tooltip
    set the clipboard to URLtext & (text 1 thru (Here - 1) of HTMLtext) & (text (There + 1) thru -1 of HTMLtext)
    else
    set the clipboard to URLtext & (text 1 thru (Here + 9) of HTMLtext) & TheResult & (text There thru -1 of HTMLtext)
    end if
    end if -- TheResult is false
    on error ErrorMessage number ErrorNumber
    log space & (ErrorNumber as text) & ":" & tab & ErrorMessage
    try
    close access MyOpenFile
    end try
    if (ErrorNumber is -128) or (ErrorNumber is -1711) then -- nothing (user cancelled)
    else
    activate me
    display alert "Error " & (ErrorNumber as text) message ErrorMessage as warning buttons {"OK"} default button "OK"
    end if
    end try
    to FixCharacters from TheText
    fixes (converts) formatting characters used in some message forums  (see http://www.asciitable.com/)
    parameters - TheText [text]: the text to fix
    returns [text]: the fixed text
    -- this list of lists contains the characters to encode - item 1 is the character, item 2 is the HTML encoding
    set TheCharacters to {¬
    {"!", "&#33;"}, ¬
    {"*", "&#42;"}, ¬
    {"+", "&#43;"}, ¬
    {"-", "&#45;"}, ¬
    {"[", "&#91;"}, ¬
    {"\\", "&#92;"}, ¬
    {"]", "&#93;"}, ¬
    {"^", "&#94;"}, ¬
    {"_", "&#95;"}, ¬
    {"~", "&#126;"}}
    set TempTID to AppleScript's text item delimiters
    repeat with SomeCharacter in TheCharacters
    if item 1 of SomeCharacter is in TheText then -- replace
    set AppleScript's text item delimiters to item 1 of SomeCharacter
    set the ItemList to text items of TheText
    set AppleScript's text item delimiters to item 2 of SomeCharacter
    set TheText to the ItemList as text
    end if
    end repeat
    set AppleScript's text item delimiters to TempTID
    return TheText
    end FixCharacters
    </pre>

  • Fetching property value in script logic!!

    Hello Experts,
    We are using BPC 7.5 M, I am working on a script logic and need to fetch a value of a property of a dimension member where dimension member is itself defined in some property.
    We have a Org dimension which has a property "FORECAST_UNIT" and this property contains a member Id of Org dimension itself, In my script logic I need to fetch value of "Currency" property for the Org dimension member defined in "FORECAST_UNIT" property.
    Please Advice.
    Thanks & Regards,
    Rohit

    Hi Roberto,
    Attached code (In Image) is of our Aggregate Forecast Unit logic, Every Org (Entity) has an forecasting unit defined in Forecasting unit property in Org dimension and Forecasting unit is also a member of Org dimension, below logic aggregates the data at Forecasting unit level:
    The issue is that I need to check before the code marked in Red executes that if Org-- Forecasting unit -- Currency is USD then only Red part of logic should execute.
    Thanks & Regards,
    Rohit

  • Resizing text and images with actions and keeping it resized for the next slides, how to?

    Hello everybody,
    I searched over the net and in this support section for a solution to my problem, but i didnt find any, so...here I am asking you experts.
    Through a particular use of different actions I make a logo "compose" in the first slide of my presentation (the logo is composed by text and images that interact), then in the second slide i make it resize so it goes 50% of its size and moves down like a TV logo, in the corner of the slide, and I want it to stay there for all the lenght of the presentation.
    It might be a stupid problem, but I didnt understand how to keep it there, 50% of its size and always in that position. If i duplicate the slide I obviously duplicate the 100%-size-logo, not its 50%-size-version, and if i shrink it in order to make it be 50% of its size the text size doesnt shrink so i have to change the text size manually, but the visual effect is imperfect.
    Lets summarize:
    slide 1: text appears, image appears, the text and the image move and "compose" the logo
    slide 2: the complete logo reduces its size to 50% and moves in the lower corner of the presentation, in the place I want it to be for, lets say, 20 slides
    slide 3: i want to have this logo already reduced in size and in its position, in the right lower corner, but if i try to group the different parts of the composed logo and i try to squeeze them the font doesnt change its size, I only squeeze the area that the text occupies.
    Some help please guys?
    Thanks in advance,
    Dom-
    (add: the problem is kind of similar to this: https://discussions.apple.com/message/9179367#9179367 . the idea of making a slide that contains the logo and text in the exact positions they would be after the move and scale actions is good and that was my first attempt, the probem is that it looks impossible to me to create a second "little" version of the logo that looks exactly the same of the first one that i reduced, so i hope there is some way to tell the app to use "the first logo, only resized the way i want", and thats the point where the problem with the size of the text comes out)

    Hi pritam,
    The “maintain proportions of window for different monitor
    resolutions” property will maintain the proportional size of the front panel
    (its x and y sizes) when opened in a different resolution. The front panel
    objects will not be resized and will appear larger (and may not fit inside the
    front panel) when saved in a higher resolution, and moved to a lower
    resolution. You can use the “Keep window proportions” property to achieve the
    same results.
    To have both the front panel dimensions and front panel
    controls scale, you need to have both the above property and the “scale all
    objects on front panel as the window resizes” selected. The labels will not be
    resized by this.
    I tried using both properties on two monitors and noticed
    that the change does not occur when the resolutions between the monitors are
    different. I had to lower both monitors’ resolution to see the change work
    properly.
    Please post back if you have any questions. Have a great day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

Maybe you are looking for