Unable to use #A01# substitution variable in dynamic list

Greetings...
I am attempting to generate a dynamic list on the page.  The list will contain a flag indicating whether the list entry is actually hidden to the user or not.  If it is hidden to the user, then I want to apply a particular class to that list entry when rendered.
The dynamic list has the following SQL:
SELECT null lvl,
       menu.menu_nm label_value,
       q'!javascript:$s('P32_MASTER_MENU_ID', '!' ||
          menu.menu_id || q'!');!' target_value,
       null image,
       null image_attribute,
       null image_alt_attribute,
       case when menu.hidden = 'Y'
              then 'class="hiddenNode"'
              else null end attribute1
from ( select 'N' hidden, vis.* from std_vw_apex_menu vis
        union all
       select 'Y' hidden, hid.* from std_vw_apex_menu_hidden hid ) menu
where menu.menu_ty = 'MAINMENU'
order by menu.sort_order
I am then using a list template with the following as the "Current" list entry:
<li class="active"><a href="#LINK#"><span #A01#>#TEXT#</span></a></li>
... and the following as the "Non-Current" list entry:
<li><a href="#LINK#"><span #A01#>#TEXT#</span></a></li>
The result I see in the rendered page however is that the substitution is not happening, as indicated in the following snippet :
<li><a href="javascript:$s('P32_MASTER_MENU_ID', '18893191201');"><span #a01#="">Education</span></a></li>
We are on ApEx 4.2.1.  What am I doing wrong as I've seen other threads indicate that it is possible for dynamic lists to use substitution variables in their list templates.
Shane.

I found the solution at Attribute substitution  not working in templates for dynamic lists.

Similar Messages

  • Unable to execute the substitution variable in calc scripts in essbase 11.1

    Unable to execute the substitution variable in calc scripts in essbase 11.1.3
    FIX(&CURRVERSION,COLA)
    Unit=units*Listprice;
    dataexport "file" "," "E:\NEW.TXT";
    ENDFIX
    Error: 1200471 Error parsing formula for FIX STATEMENT (line 1): expression expected before [)]
    This is error it throws when executing the calculation script
    I wonder whether its a problem with substitution variable i want to know wat went wrong inside the fix statement
    I have created substitution variable use maxl
    Installed the essbase in custom manner and standlone mode nt register with the shared services ,
    Is this problem with the custom installation of essbase
    Regards
    shenna

    If you remove the substitution variable and replace it with the actual value (whatever that is), does the code work? That will tell you if the issue is around the substitution variable or not.
    John -- First you race Glenn, then you race me -- and you always win. :)
    Regards,
    Cameron Lackpour

  • Substitution variable in Dynamic Calc

    Hi,
    We are using Essbase 9.3.0 on Windows and are seeing this behavior in our BSO cubes.
    When we use a substitution variable in a Scenario member with Dynamic Calc (not store) setting, after the first retrieve, if we change the value of the substitution variable, the subsequent retrieves do not generate updated results.
    I suspect that the value is cached in the Dynamic Calculator Cache, and for some reason does not track changes in Substitution Variables to know that the value must be re-calculated. Here is what I see in the Application log -
    [Mon Aug 09 10:31:51 2010]Local/App1/db1/user1/Info(1020055)
    Spreadsheet Extractor Elapsed Time : [0.032] seconds
    [Mon Aug 09 10:31:51 2010]Local/App1/db1/user1/Info(1020082)
    Spreadsheet Extractor Big Block Allocs -- Dyn.Calc.Cache : [4] non-Dyn.Calc.Cache : [0]
    This says that 4 blocks were used from the Dynamic Calc Cache, and none from outside it. Does this mean that existing blocks were read and not re-populated?
    If I make a change to the formula, wherein I hard code the value of the sub var and perform the retrieve, then the value is updated. Subsequent retrieves, after restoring the formula still returns the updated results.
    My question is, is this expected behavior? Or am I doing something /reading something wrong?
    Thanks,
    Andy

    when a subst variable value is changed... to use the value in member formula or calc script, the concerned application has to be restarted...
    - Krish

  • How to use a substitution variable in a load rule?

    I need to use a substitution variable in a load rule in a column, as I will receive a parameter to fix the Month and Year values within the data loading, could somebody tell me if this is possible. I put an expresion "&Yearproc" in the column value but it is not working.

    If you're a member of ODTUG (or even if not, you can sign up for an associate membership for free) you can download Glenn's presentation from 2009 Kaliedoscope "Little Used Features of Essbase (Like Data Mining and Triggers)" -- there is a section in that presentation on substitution variables -- he does a really good job in showing how this works.
    Go to: www.odtug.com, then Tech Resources, then Essbase/Hyperion, and search for Schwartzberg. Currently it's the ninth presentation on the list -- I think this changes based on popularity of downloads.
    Regards,
    Cameron Lackpour

  • Using a Site Studio 10R4 Dynamic List Element Definition

    Hi All,
    I've created and can use a Static List Element Definition > Region Definition > Region Template with no problems based off of the 10gR4 samples.
    However, there is no example that I've found to utilise the Element Definition of a Dynamic List. I'm attempting to use the same sample code as provided for a Static List but having no luck displaying the results of the query...
    Does anyone have some sample code used in a Region Template or Sub Template to show how we use a Dynamic List Element Definition please?
    I noted from another thread in this forum that there are some iDoc calls to make which load the query defined in the Element Definition... I can't find any documentation regarding this either.
    Thanks
    Edited by: user615721 on May 4, 2009 10:08 AM
    Edited by: user615721 on May 4, 2009 10:09 AM

    Found my answer in another thread, here... Re: Using a Site Studio 10R4 Dynamic List Element Definition
    'For 10gR4 Site Studio you can get examples and even a video talking about making dyanmic lists from here:
    http://www.oracle.com/technology/products/content-management/ucm/SiteStudio10gR4Tutorials/index.html'
    Edited by: user615721 on May 4, 2009 10:25 AM
    Edited by: user615721 on May 4, 2009 10:25 AM

  • Using a Substitution Variable in a text box when the member isn't used in a grid

    Hi,
    I'm trying to create a footer in my report to display a substitution variable for the "Period" dimension. The Period dimension is not used in any of the rows or columns in my grid in my report in FR studio. It is left as a POV. I am trying to reference the substitution variable for CurrentMonth, which is independant of what the user selects for the Peiod POV.
    For example, the user runs the report and selects YearTotal for the Period dimension. I want to bring back the substitution variable of &CurrentMonth for Period even though it is not selected in the Grid for the report. Is there a way to do that?
    The workaround I am using is adding a second Grid and selecting the Substitution variable in the row and referencing the function from the second grid, which is hidden. This is bulky, and I'm hoping for a cleaner solution. The function I'm using from Grid 2 is below:
    <<MemberAlias("Grid2", 1, "Period")>>
    If I referenced Grid1 for Period, the function would display the user's POV selection, which is not what I want.
    Any help would be much appreciated. Thanks so much!!
    Tiffany

    Tiffany,
    I do the following which I think may fit you need:
    Add the "Period" dimension to the Columns section.
    Make the "Period" dimension the top most member of your column selections.
    Hide that row.
    Set the left most column to "Current Poinf of View for Period"
    Select "Same As Col A" (for example) for the remaining report columns.
    Add a column to the far right and use the &CurrentMonth substitution variable for the "Period" dimension. (The other dimensions in that column should be set, if possible, to retrieve as little data as possible.)
    Hide the new column.
    Change the function in the footer to <<MemberAlias(Grid1, A, "Period")>>
    This should allow your user to select their desired period without impacting the hidden column value of &CurrentMonth which will be displayed in your footer.
    Bill

  • Using variable in dynamic list queries

    How can we use a variable value like metadata value of the parent content in the dynamic list query?
    I tried something following ways but the query was not picking up the value of xCountries.
    dDocType <matches> `State` <AND> xCountries <matches> xCountries
    dDocType <matches> `State` <AND> xCountries <matches> `xCountries`
    dDocType <matches> `State` <AND> xCountries <matches> `$xCountries`
    dDocType <matches> `State` <AND> xCountries <matches> `<!--$xCountries-->`
    None of them worked. But when I printed the <!--$xCountries--> on the secondary page for the selected country the value is getting printed.
    Regards,
    Pratap

    Hi Bex,
    You were right. Eval function call was helpful here.
    The problem was resolved only to an extent by using the eval function. This is
    evaluating the query string given in parameters window for ssQueryText to
    correct value. We used the eval() function in the dynamic list fragment. The
    format of query we were trying earlier was incorrect. The correct format is like
    this
    dDocType <matches> `City` <AND> xCountries <matches> `<$xCountries$>` <AND>
    xStates <matches> `<$xStates$>`
    There is another problem though. We are able to add new states or cities by
    going to the specific state page or to the cit page and then edit it. But if we
    click edit on a secondary page e.g. on a State page(which contains list of
    cities) the correct values for cities are not getting populated in the Cities
    dynamic list in state edit window. Possible cause is that the eval function is
    not called in the edit window (which shows all applets), instead the eval
    function is called only in dynamic list fragment which is evaluated in the
    secondary page template for State. How can we make the eval function execute in
    the edit window as well?
    In fact the query is failing from paramters window itself. If I use Test Query
    it is returning 0 results.
    Is there a work around to address this problem? Hope I didn't confuse much.
    Regards,
    Pratap

  • Using a substitution variable to pull data from a table

    Hello,
    I am working with a simple program that asks the user to enter any info that will relate to a table in the db.
    Thus far I have read 1,000 ways to accomplish this, and none of them work.
    PROMPT
    ACCEPT var PROMPT 'Enter var'
    DECLARE
    BEGIN
    SELECT &var
    FROM &table
    WHERE var=tablevar;
    END;

    Thanks for the feedback. Though I understand your logic, it doesn't seem to properly apply here. This is a more detailed explanation of what I've done.
    First, I create the table
    CREATE TABLE starbright
    (planet_num VARCHAR2(3),
    planet VARCHAR2(20));
    INSERT INTO starbright VALUES
    (257, 'Neptune');
    INSERT INTO starbright VALUES
    (367, 'Venus');
    INSERT INTO starbright VALUES
    (586, 'Mars');
    INSERT INTO starbright VALUES
    (725, 'Earth');Now, with that table created, I want to be able to periodically use PL/SQL to call data from the table, such as below
    DECLARE
    p_no := '&planet_num';
    BEGIN
    INSERT p_no
    INTO starbright;
    SELECT planet_num
    INTO p_no
    FROM starbright
    WHERE planet_num := p_no;
    dbms_output.put_line( 'Result: ' || planet );
    END;This is my generic error
    Error report:
    ORA-06550: line 2, column 6:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
       constant exception <an identifier>
       <a double-quoted delimited-identifier> table LONG_ double ref
       char time timestamp interval date binary national character
       nchar
    The symbol "<an identifier>" was substituted for "=" to continue.
    ORA-06550: line 6, column 8:
    PLS-00103: Encountered the symbol "P_NO" when expecting one of the following:
       into <a SQL statement>
    ORA-06550: line 11, column 18:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
       . ( * @ % & = - + ; < / > at for in is mod remainder not rem
       <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
       LIKE4_ LIKEC_ between group h
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:

  • Sharing complex substitution variable values between ASO and BSO databases

    We have ASO and BSO Essbase database member names with spaces in, and need to store some of these member names in substitution variables. However, this has to be done differently for ASO and BSO, due to calc script syntax requiring double quotes and MDX requiring square brackets. For example:
    ASO:
    &CurWeek value = Week 1
    MDX: [&CurWeek]
    BSO:
    &CurWeek value = "Week 1"
    Calc Script: &CurWeek
    As a result, the substitution variables cannot be shared between the ASO and BSO cubes, since the BSO variable value requires double quotes due to the space in the member name.
    Is there a way to get the above to work with both ASO and BSO? Can the double quotes be escaped in calc script syntax? Or can the double quotes be removed in the MDX formula?

    Hi TimG,
    Apologies for such a late reponse to this, genuinely haven't had a spare second to reply until now!
    Yes, I suspect a complex alias name may be the best solution here, and to remove the spaces from the actual member names.
    I was not aware of the latter part at all. My colleague has confirmed as much on this too - DBAG 11.1.2.1 pp117 & 118:
    "Note: If a substitution variable value is numeric or a member name starting with a
    numeral or containing the special characters referred to above is to be used both
    in MDX and non-MDX situations, create two substitution variables, one without
    the value enclosed in quotation marks and one with the value in quotation marks."
    "To ensure that a new substitution variable value is available in formulas, partition definitions,
    and security filters, stop and restart the application. All other uses of substitution variables are
    dynamically resolved when used."
    This last paragraph is the most concerning since we were planning to be able to update substitution variables values and then access the new values from calc scripts and formulae instantaneously. This quirk is unexpected and a little inconvenient. We may have to look at scheduling a change of substitution variable value overnight, followed by a stop/start of the app ready for the next day, and to work around needing to access changed values instantly.

  • Substitution Variable in Cursor

    Good morning,
    I'm creating a script that uses a substitution variable (comma-delimited list of numbers) in the main cursor. Here's the sql statement used in the cursor:
       SELECT individual_id
              FROM individual
             WHERE individual_id IN (&&individual_id)
               order by individual_id;I then loop through that cursor and look up additional information which is then written as output. My question is this, when an individual id (provided in the substitution variable's comma-delimited list) is not found, I need a way to parse it out and provide feedback. Since it's not located in the individual table, I need to find a way to still return it in the cursor (or find another way) in order to note that no processing could be done for that value.
    I hope this is clear.
    Thanks,
    Christine

    You mean you want to outer join?
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select '&emp_names' as txt from dual)
      2      ,emps as (select REGEXP_SUBSTR (txt, '[^,]+', 1, level) ename
      3                from t
      4                connect by level <= length(regexp_replace(txt,'[^,]*'))+1)
      5  --
      6  select emps.ename, emp.empno, emp.sal
      7  from emps left outer join emp on (emp.ename = emps.ename)
      8* order by emps.ename
    SQL> /
    Enter value for emp_names: SCOTT,JAMES,SMITH,JONES,BRADFORD
    old   1: with t as (select '&emp_names' as txt from dual)
    new   1: with t as (select 'SCOTT,JAMES,SMITH,JONES,BRADFORD' as txt from dual)
    ENAME                                 EMPNO        SAL
    BRADFORD
    JAMES                                  7900        950
    JONES                                  7566       2975
    SCOTT                                  7788       3000
    SMITH                                  7369        800
    SQL>

  • Financial Reporting (FR) using Substitution Variables with Quotes

    HI all,
    I've created a substitution variable, &CurWk, for a Period Dimension member. The member name, Dec Wk2, has an embedded space, so I enclose the member name in quotes when assigning it to the substitution variable in EAS. However, when I try to use that substitution variable in Financial Reporting, it does not recognize the Substitution variable. I've closed down and re-opened the FR Studio. If I remove the quotes around the member name when assigning it to the Substitution Variable, then FR will recognize the substitution variable. However, I get an error in the calc scripts if I try to reference the substitution variable if this member name is not enclosed in quotes. In my mind, this seems to be a bug in FR since quotes can be optional when referencing any member name. Has anyone else had this problem? Is there a work-around? I'm using EPM 11.1.1. Thanks for your help!
    Vince Kelly

    Hi Vince,
    For the Calc scripts add & to the front of the sub var and surround the sub var with [ ], for example:
    where sub vars are ReptQTR, ReptYR, ReptScenario:
    CASE
    When (Is(QTR.Currentmember,&#91;&REPTQTR&#93;) and (IS(FY.Currentmember,&#91;&REPTYR&#93;))) then
         CASE
         When ((ISUDA(L000.CurrentMember,"NC"))) then
              CASE
              WHEN (ISUDA(L000.CurrentMember,"Expense")) THEN
              ((&#91;&REPTPYR&#93;,&#91;ACT&#93;) - &#91;&REPTSCENARIO&#93;)
              ELSE
              (&#91;&REPTSCENARIO&#93; - (&#91;&REPTPYR&#93;,&#91;ACT&#93;))
              END
         END
    END
    Edited to fix stupid html codes: Iain Curtain on Feb 1, 2010 5:44 PM

  • Using an apostrophe in a substitution variable

    Hello, I have a simple sql plus script which sets a substitution variable and then uses this in an INSERT statement to insert the value of the variable into a database table.
    For example:
    DEFINE TEXT = 'For full details see PQPs website'
    insert into CONSTS(PARAMETER, VALUE, TYPE) values ('admin.marketing.website', '&TEXT1', 'ADMIN');
    That's all fine and dandy.
    However, I want to put a possessive apostrophe in PQPs, i.e. PQP's but can't find a way that lets me do it and I've tried everything I can think of.
    Using the escape character \ doesn't work
    i.e.
    set escape \
    DEFINE TEXT = 'For full details see PQP\'s website'
    I just get the string 'For full details see PQP\'
    Also using two apostrophes doesn't work either
    i.e.
    DEFINE TEXT = 'For full details see PQP''s website'
    I get the error "ORA-01756: quoted string not properly terminated"
    when I try and insert into the database.
    I've tried surrounding the value in double quotes etc. and everything I can think of but for the life of me I can't get a string containing an apostrophe into the database using a substitution variable. It must be possible though, isn't it?
    Thanks
    Andy Birchall

    Could this be a solution ?
    TEST@db102 > var text varchar2(50);
    TEST@db102 > exec :text := 'For full details see PQP'||chr(39)||'s website';
    PL/SQL procedure successfully completed.
    TEST@db102 > insert into CONSTS(PARAMETER, VALUE, TYPE) values ('admin.marketing.website', :text, 'ADMIN');
    1 row created.
    TEST@db102 > select * from consts;
    PARAMETER                      VALUE                                              TYPE
    admin.marketing.website        For full details see PQP's website                 ADMIN
    TEST@db102 >

  • Using substitution variables in a BS rule

    Hi there
    Im trying to use a substitution variable when selecting the current month. Se example below.
    I loading af YTD number on a member "YTD" and I would like to break the numbers down, so that I also can see the values as pr. month.
    I would like to use the substitution varible "currmth" to do this, so that it only calculates the current month. I know I could use a UDA for this, but shouldn't this work?
    ELSEIF (@ISMBR (&CurrMth) == "Aug")
    ("YTD" - ("jan" + "feb" + "mar" + "apr" + "may" + "jun" + "jul"));
    ELSEIF (@ISMBR (&CurrMth) == "Sep")
    ("YTD" - ("jan" + "feb" + "mar" + "apr" + "may" + "jun" + "jul" + "aug"));
    ELSEIF (@ISMBR ("Oct"))
    If you look at "sep" that is how I would like it to function, but I cant. It simple doesent calculate anything for the member. But if I use "Oct" and not the substitution variable "currmth" I get my member calculated.
    Is there something here im missing, or doesn't it work like this? Any help would be appreciated!
    Jacob

    Jacob,
    You don't need the @IsMbr when comparing the value of the substitution variable.
    ELSEIF (&CurrMth == "Aug")
    ("YTD" - ("jan" + "feb" + "mar" + "apr" + "may" + "jun" + "jul"));
    ELSEIF (&CurrMth == "Sep")
    ("YTD" - ("jan" + "feb" + "mar" + "apr" + "may" + "jun" + "jul" + "aug"));
    ELSEIF (@ISMBR ("Oct"))
    Robert
    Edited by: RobertR3 on Dec 4, 2009 9:45 AM

  • Substitution Variable in WA error

    Hi there,
    We have moved our server's IP beacuse we promoted developement (server07) to production (server08). Prior to that all reports worked fine. Now we're having some problems with the Substitution Variables, because everytime we select them, to include them in a report, it displays the following error:
    *"Actual_Month is not a valid substitution variable for dimension Period"*
    In fact I've tried to create a new variable with a new name and I get the same error. What intrigues me is that if we use the same variable for Dynamic Time Series let's say Y-T-D(Actual_Month) it works and displays a value.
    Maybe is there something in the connection but still with no clue how to fix it. Any database or setting at the config file to set?
    Thanks!

    I don't know about PL/SQL developer but in sqlplus you need single quotes around the variable.
    SQL> define freq = 'Weekly'
    SQL> select null from dual
      2  where &freq = 'Weekly';
    old   2: where &freq = 'Weekly'
    new   2: where Weekly = 'Weekly'
    where Weekly = 'Weekly'
    ERROR at line 2:
    ORA-00904: "WEEKLY": invalid identifier
    SQL> edi
    Wrote file afiedt.sql
      1  select null from dual
      2* where '&freq' = 'Weekly'
    SQL> /
    old   2: where '&freq' = 'Weekly'
    new   2: where 'Weekly' = 'Weekly'
    N
    SQL>

  • Substitution Variable & its usage in formulas

    Hi, I have a requirement of using Substitution variable ,say "CurMonth" in the formula for @PTD("JAN":&CurMonth). If I can be able to do this then I can update my substitution variable every month & then change the value in the PTD function using the substitution variable. My question here is whether substitution variable can only be used in calc scripts & not in formulas , if so why & is there any way my requirement can be met. Your ideas & solutions appreciated very much. Thanks & Regards

    Substitution variables cannot be used in the outline - only in a script. If you want to be able to use the function in a member formula, you will either have to hard-code the month range, or tag the proper months with UDAs, and use the @UDA function to select them. That way, you can just change the UDA's every month rather than the formula, but the change will be an equal amount of work for either solution.If you don't mind using a calc script, you can use a sub variable, but you won't be able to make it dynamic calc as you would a member formula.Hope that helps.Regards,Jade------------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

Maybe you are looking for

  • JavaScript validation/override red borders?

    We are creating numerous forms in LiveCycle and are very averse to having to specify "User Entered - Required" for two main reasons: doing so places those ugly, red boarders around required fields most fields on most forms are required, we don't want

  • Po tax - condition types defined sequence

    Hi Friends, we have v1 tax code defined for purchase order . There are five conditions typs in the tax code. I have to write some code for each condition type. for this I want to get these condition types in a sequence it is defined in the tax defina

  • BLOB with Form6i

    With the Form6i, I create a form in which one of the items is with type IMAGE. With this IMAGE item, I add a trigger for WHEN_IMAGE_PRESSED as below. read_image_file(get_file_name(),'TIFF','s_image.image'); If the data type of "s_image.image" is LONG

  • Halo around objects in PS

    There seems to be a "fuzz" around everything once I print it. Type, objects, etc... Any Suggestions?

  • OCCI and Object Views

    Can you use OCCI with object views? Here is the problem that I am seeing: SCHEMA.SQL: CREATE TABLE EMP_TABLE empnumber NUMBER (5), job VARCHAR2 (20) CREATE TYPE EMPLOYEE_T as object empnumber NUMBER (5), job VARCHAR2 (20) ) CREATE VIEW EMP_VIEW OF EM