Proper syntax for email function including a repeat region

Hey Guys, a fellow ADDT developer and myself ran into a odd challenge recently and was wondering if someone knew a shorter answer.
LET ME BE CLEAR..I’m not looking for a suggestion, we have resolved the problem..we ARE LOOKING FOR PROPER or shortest FORMAT.
(we used a submit redirect to a php page that used the “Send Page Section”  and then redirected back..the email looks great)
This may be a mood point since ADDT is going away but, until then, we feel this will be an useful post because quite often you may have multiple products to email from your SQL statement.
With that said. We used the send email function on submit.
1.       Our email content was a HTML content file. Since it was not a php file our repeat region obviously did not work.
2.       We substituted the HTML file for PHP (just for giggles)..no joy
3.       We tried regular content as a string..no joy
We know how to get single rows with the  {table.column} format…but we need to list all undetermined number of products/rows.
So how would the string or function re-write look  if you needed a repeat region.
EX:
emailContent (“ this” . ‘does’. “work”);  regular string
emailContent (“ this” . $var   . “work”);  regular string
emailContent (“ this” .   do{  $row; } while( xxx = xxx)  . “work”);  DOES NOT WORK
emailContent (“ this” .   while( xxx = xxx)  {  $row; }   . “work”);     DOES NOT WORK
I assume the conflict is you can’t have a function like DO or While in the string….but I also can’t use a php include file.
There must be a shorter, cleaner syntax that won’t require an advanced set of arrays or for each???
so  how would a nice clean example of  repeat region results  inside email content, or include file for email contnent, look?
Thanks

David, in theory I agree with you, but to a large degree I am completely changing the logic of my human interface. My existing code pre-processes the raw data and saves the results to disk for any future usage. 
It can then rapidly rebuild all pages for the entire Intranet site when your personal view of the data is changed. 
After the full creation of all pages, the fixed pages can be viewed using your browser. 
When you want to change your view, you run the code which completely rebuilds every Intranet page.
My new software will approach the data differently.  My raw data will be stored with no pre-processing. The pre-processing will occur as the user changes dates and the pages will be built individually on demand, one at a time.
The second phase of my Windows Form app will be to create pop-up windows that allow the users to modify the definitions for their custom views of the market. 
When a view is changed, the software will be able to pre-process, as needed, the current date’s data and rebuild the current page with any new changes.
I intend to create a Refresh.cpp file.  The various segments of the Form’s code will set variable such as date change, view changed, watch list changed, etc. and then call Refresh(). 
The refresh code will then be able to do the minimum recalculation necessary to rebuild the proper HTML stream. 
This is another reason to break up the code into various cpp segments such as: LoadRawData, RecalculateViews, BuildPage, etc.
PS: David, I tried to send you a personal e-mail using your home page link. 
Hope that was OK and not against forum rules!

Similar Messages

  • Syntax for Evaluate function in OBIEE

    Hi
    I have browsed through the docs but couldn't find syntax for Evaluate function. Could someone pass me the full syntax and if possible a helpful example against essbase.
    Thanks

    Hi
    definitely
    syntax:- EVAULATE('your db function(%1,%2)', parameter list)
    here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
    if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
    following exapmples are for ORACLE db,
    ex1: EVALUATE('upper(%1)', 'kishore kumar') gives the result as -> KISHORE KUMAR
    ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
    you also can call the user-defined functions through evaulate
    EVALUATE('functioname(%1,%2), column1, column2)
    the above function has 2 parameters to be inputted
    Thanks & Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Jan 16, 2009 11:00 PM

  • I need to know the proper syntax for my SELECT query, please.

    Hello All,
    Quick one for you:
    Let's say that I have several columns in a table with names such as subject_1, subject_2, subject_3, etc. The table's name is subject_names.
    The number in each of the three column name examples is also a value passed along a query string, the user can select choices, 1, 2 or 3. That query string's variable is $qs.
    So, what I want is a SELECT query that uses the query string value as follows (KEEP IN MIND, I know this is not the proper syntax):
    "SELECT subject_[$qs]
    FROM subject_names";
    I have tried all sorts of cominations of quotes (single and double), dots, brackets, braces and parenthesis. I just want to know how to include such a variable within this code.
    Any and all help is sincerely appreciated!
    Cheers,
    wordman

    Well, I did give you the syntax though.
    $query = 'SELECT ' . $qs . ' FROM tbl_name';
    I put spaces between the periods this time to make it more clear.
    If you put the actual word 'subject' in there and just want your form to name it's options as the numbers available you could do this:
    $query = 'SELECT subject_' . $qs . ' FROM tbl_name';
    In PHP you can use either single or double quotes around your query string, I always just use single quotes. I see a lot of other use double quotes.
    Double quotes would look like:
    $query = "SELECT subject_' . $qs . ' FROM tbl_name";
    Or when using double quotes you can actually just place the variable right in the string without having to concatenate multiple strings like above.
    Since you mentioned that you are good with passing variables I probably don't have to mention that you need to set the value attribute of your option tags (if you are using a select) to the value you want them to pass.
    Ex:
    <select name="choices">
         <option value="1">1</option>
         <option value="2">2</option>
         <option value="3">3</option>
    </select>
    If you have that part all figured out then you can use the syntax above for your query string.
    Good luck.

  • What is proper syntax for using PassBack in a Report page select statement

    In my select statement I reference the passBack function using:
    onClick="javascript:passBack()"
    In my Page Header I (Typically) define the passBack function as:
    <script language="JavaScript" type="text/javascript">
    function passBack(passVal1,passVal2) {
    opener.document.getElementById("P2000_CABLE_ID").value = passVal1;
    opener.document.getElementById("P2000_CABLE_LABEL").value = passVal2;
    window.opener.location.reload(true);
    </script>
    But I have never used the passBack function from the Select statement before and cannot happen onto the proper syntax.
    The Page Items I want to pass are:
    1. :P2004_CABLE_ID
    2. :P2004_LABEL
    I want to pass them to:
    1. :P2000_CABLE_ID
    2. :P2000_CABLE_LABEL
    Can someone please help me out... Again?
    Thanks- Gary

    Let's assume column XYZ has both numbers (1), and letters (any alphabet).
    I have a case statement on SQL to turn any value that's not 1 into 0, then I am getting a sum of that column.
    I am also grouping by Row A, B etc to get aggregated sum of column XYZ for those group.
    Now on Crystal Reports function, I need to sum up values under column XYZ for all the groups.
    If I try using sum function like below, I get an error stating:
    "A number field or currency amount field is required here"
    (sum({Command.XYZ}))
    So I thought if I can use a case statement to change the non-numbers to 0 prior to sum that will probably resolve it. But I could not get the below case statement to work either (Error: A string is required). 
    SELECT {Command.XYZ}
       Case 1:
          1 
       Default:
          0;

  • Syntax for existing function-based index

    Hi:
    I am on 10.2.0.3.
    Listed below is the list of indexes and index columns on one of the tables. Aparantly one of the columns (SYS_NC00220$ ) is in reality a function-based index.
    Anybody knows how to get SQL syntax for this index? TIA.
    INDEX_NAME UNIQUENES COLUMN_NAME COLUMN_POSITION
    PS0BI_HDR NONUNIQUE BILL_TO_CUST_ID 1
    PS0BI_HDR NONUNIQUE BUSINESS_UNIT 2
    PS0BI_HDR NONUNIQUE SYS_NC00220$ 3
    PS1BI_HDR NONUNIQUE BILL_STATUS 1
    PS1BI_HDR NONUNIQUE BUSINESS_UNIT 2
    PS1BI_HDR NONUNIQUE SYS_NC00220$ 3
    PS2BI_HDR NONUNIQUE CONTRACT_NUM 1
    PS2BI_HDR NONUNIQUE BUSINESS_UNIT 2
    PS2BI_HDR NONUNIQUE SYS_NC00220$ 3
    PSABI_HDR NONUNIQUE INVOICE 1
    PSABI_HDR NONUNIQUE BILL_TO_CUST_ID 2
    PSABI_HDR NONUNIQUE BUSINESS_UNIT 3
    PSABI_HDR NONUNIQUE BILL_STATUS 4
    PSBBI_HDR UNIQUE PROCESS_INSTANCE 1
    PSBBI_HDR UNIQUE BUSINESS_UNIT 2
    PSBBI_HDR UNIQUE INVOICE 3
    PS_BI_HDR UNIQUE BUSINESS_UNIT 1
    PS_BI_HDR UNIQUE SYS_NC00220$ 2

    query user_ind_expressions and look for COLUMN_EXPRESSION.
    this will give you expression.

  • Syntax for EVALUATE function - placing condition in it

    Hello All,
    I have a formula in discoverer like this
    SUM(col1)
    OVER(PARTITION BY col2, col3, col4
    ORDER BY col5 ASC
    RANGE BETWEEN col6-3 AND col6
    I need to implement the same in BI,
    I have used this to implement the SUM part
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4) ORDER BY %5)' as double,
    col1,
    col2,
    col3,
    col4)
    But, couldn't get the syntax for 'RANGE BETWEEN' clause..
    i have tried like this
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4) ORDER BY %5 RANGE BETWEEN %7 AND %6 )' as double,
    col1,
    col2,
    col3,
    col4,
    col5,
    col6,
    col7)
    Its throwing an error 'ORA-00905: missing keyword at OCI call OCIStmtExecute.'
    can anyone please suggest me some ideas to resolve this.
    Thanks in advance,
    Raghu

    Hi Goran,
    Thanks for the reply, it was of great help..
    Can you once check this please
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4,%5
    ORDER BY %6 RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW )' AS DOUBLE,
    "Global Distributor Sales (by Period)"."Net Sales",
    Specialist."Specialist Group Name", Specialist."Specialist Manager Name",
    Specialist."Specialist Name", "End Sold-To Customer"."Sold-To Customer
    Account Name", "Process Fiscal Period Calendar"."Fiscal Period")
    This is giving the running sum of values with in the partition window..
    but, can you suggest, how to modify the query, so as to get the values of 'Sales' between
    2 fiscal periods back and the current fiscal period..
    in the discoverer it is used like this,
    SUM(Net Sales SUM)
    OVER(PARTITION BY Specialist Group Name,Specialist Manager Name,Specialist Name,"Sold-To Customer Account Name",GPH Segment2
    ORDER BY "Fiscal Period (7)" ASC
    RANGE BETWEEN NUMTOYMINTERVAL("Fiscal Period Of Year"-1,'MONTH') PRECEDING AND CURRENT ROW )
    which gives the values between 2 periods back and current period
    Thank you,
    Raghu

  • What is the syntax for calling function from class file by jsp

    does anyone here knows what is the syntax of how to call a function from java class file by javascript code or any way to call it?
    and where should i put the calling function code? because the function is called depend on the user click.
    for example
    <%=pc.functionName(a,b)%>
    for the variable a and b, how can i get the value from html textbox and put it in a and b...
    urgent needed...
    thx

    Jsp's are executed before the Html forms are created and loaded. Dont try to use a java code function calling on a javascript click. You'll have to explicitly redirect it into a servlet where in you can call the function you want.
    Well! another way could be using AJAX. That seems to be powerfull enough and it might also serve your purpose.
    Hope this helps

  • Date Syntax for SUMIFS Function

    Converting my accounting from Excel to Numbers. Huge data sets ...
    I have a SUMIFS function that works properly using a manually typed date but I cannot figure out how to use the Today() function.
    This works: SUMIFS(Amounts, Account, B3, Check Date, B5) where B3 is the code for the specific account and B5 contains <=12/31/2009 - note there are no quotes around the expression.
    BUT, I don't want to manually enter the date everyday. I want to use the Today() function for condition. It works if I use Today() in B5 but returns only the totals for today's transactions. I need to be able to use "less than or equal to Today" for the condition but I cannot figure out the syntax.
    If we can figure that out, then I want to use "less than or equal to Today PLUS X" where X is a variable I can enter in B7 to look at projected cash flow 7, 14 or 21 days out.
    Any help? Thanks

    Jane Knox wrote:
    Yvan!
    That worked. Thank you! When I posted the question I thought you would be the one to answer.
    Thanks for the feedback.
    I'm sure that Ashka, Badunit, Barry, Fruhulda, Jaxjason, Jerrold … are able to respond the same.
    The difference is that I was in front of my computer when they weren't
    I would NEVER be able to figure that out
    Not surprising, the syntax required to use a reference to a cell in a testr is not described in delivered resources.
    Very different from Excel...
    Happily, Numbers isn't duplicating Excel behaviour. A world with a single kind of spreadsheet would be really annoying
    Yvan KOENIG (VALLAURIS, France) samedi 26 décembre 2009 18:12:19

  • Syntax for @MDSHIFT function

    I'm attempting to create matrix type results for several accounts, displaying a rolling 12 months. An alternate hierarchy is one solution, but would like to try a calcscript using @MDSHIFT."Incomeprior" =@MDSHIFT("MTotalIncome", 1, "2002", , 0,"Income Stmt Accounts",);The error received is "The 2nd parameter of function "2002" must be a non-negative number or Lev/gen name string"Any ideas?Thank you in advance,Cbucklin

    Hi
    definitely
    syntax:- EVAULATE('your db function(%1,%2)', parameter list)
    here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
    if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
    following exapmples are for ORACLE db,
    ex1: EVALUATE('upper(%1)', 'kishore kumar') gives the result as -> KISHORE KUMAR
    ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
    you also can call the user-defined functions through evaulate
    EVALUATE('functioname(%1,%2), column1, column2)
    the above function has 2 parameters to be inputted
    Thanks & Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Jan 16, 2009 11:00 PM

  • Syntax for nested function/procedure?

    Hi,
    What's the syntax to create a sub function/procedure in another function/procedure? Is this available in 9i?
    Thanks.

    Nested functions and procedures have been available since at least 7.3. However, any nested functions or procedures need to be the last things in your declare section.
    This works:
    SQL> CREATE OR REPLACE PROCEDURE test_proc is
      2     l_v VARCHAR2(100);
      3     FUNCTION nested_function RETURN VARCHAR2 IS
      4     BEGIN
      5        RETURN('nested function call') ;
      6     END;
      7  BEGIN
      8     l_v := nested_function;
      9     DBMS_OUTPUT.Put_Line(l_v);
    10  END;
    11  /
    Procedure created.But this does not:
    SQL> CREATE OR REPLACE PROCEDURE test_proc is
      2
      3     FUNCTION nested_function RETURN VARCHAR2 IS
      4     BEGIN
      5        RETURN('nested function call') ;
      6     END;
      7     l_v VARCHAR2(100);
      8  BEGIN
      9     l_v := nested_function;
    10     DBMS_OUTPUT.Put_Line(l_v);
    11  END;
    12  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE TEST_PROC:
    LINE/COL ERROR
    7/4      PLS-00103: Encountered the symbol "L_V" when expecting one of the
             following:
    12/0     PLS-00103: Encountered the symbol "end-of-file" when expecting
             one of the following:
             begin function package pragma procedure formTTFN
    John

  • Proper syntax for adding a keyboard event listener in Illustrator

    Hi all,
    Sorry for the newb question. For some reason, I am unable to capture any keyboard action in my extension. Probably doing it wrong....
    My extension is a panel that only has buttons. The shortcuts for cut and paste become disabled after clicking on a button and I wanted to see if my extension could capture "command-x" and then fire the command via script.
    Seems pretty basic, but for whatever reason I'm stumped. does the below look accurate? Why aren't I seeing any alert?
    function keyHandler(){
        window.addEventListener('keypress',
                function(e)
                    function that evaluates script to show alert("yuck");
                false);
    Also, when I do command A after clicking a button, it selects the objects in my extension panel. Then when I copy.... well, I get this....
    LSC
    Sure does seem like the panel has focus. Any workarounds?

    OK. No wonder. It doesn't appear that the panel can pick up key commands unless it has focus. I created a text input and when that was active, my code worked fine. BUT, my panel doesn't HAVE a text input. I don't mind hacking something together with a hidden or super small box that has hidden focus, but it does not appear that autofucus or document.getElementById("id").focus(); works. Anybody confirm.
    Does ANYBODY have any sort of workaround for this frustrating state of affairs. I just need for command + X to actually cut after clicking a button in my panel. I don't care if I have to send a menu-command to jsx. That would be fine. Just need to get focus somehow....

  • Which is correct Syntax for IN function in SQL expressions filters?

    Hi,
    I want to build a report which looks at the last 4 snapshot dates.
    I obtained each snapshot date using this filter
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 7 - dayofweek(current_date) + 2), current_date) ) A
    now the second one would be:
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 6 - dayofweek(current_date) + 2), current_date) ) B
    third one
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 5- dayofweek(current_date) + 2), current_date) ) C
    4th one
    Snapshot Date."Snapshot Date" =TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 4 - dayofweek(current_date) + 2), current_date) ) D
    to simplify them let's call the filters A, B , C, D
    so, my sql expression should be like something like Snapshot Date."Snapshot Date" in 'A', 'B', 'D', 'C'
    I have tried to combine the below, with brackets and comma separated, without brackets, with single quotes and without, but I always get a syntax error.
    Snapshot Date."Snapshot Date" in TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 7 - dayofweek(current_date) + 2), current_date) ) ,
    TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 6 - dayofweek(current_date) + 2), current_date) ) ,
    TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 5 - dayofweek(current_date) + 2), current_date) ) ,
    TIMESTAMPADD( SQL_TSI_WEEK,-10, TIMESTAMPADD(SQL_TSI_DAY, ( 4 - dayofweek(current_date) + 2), current_date) )
    It doesn't seem to like the IN function either.
    Any idea?
    Regards
    G.
    Edited by: user6185307 on Oct 27, 2009 8:07 AM

    Take each of these filters and union them in your answers report.
    This way, you filter down to exactly the last 4 days.

  • Syntax for CASE Function when multiple values equates to the same result?

    Tried using the 'IN' keyword with the CASE function but it does not work, does each case have to be stated separately? trying to save some lines..
    tried:
    case me607.rmc_code
    when in ('M','MS','MP') then 'H311'
    end as carrier_code
    Do i have to do:
    case me607.rmc_code
    when 'M' then 'H311'
    when 'MS' then 'H311'
    when 'MP' then 'H311'
    end as carrier_code,
    etc..
    Thanks for any help..

    One other thing forgot to ask, how do you do a second case selection as:
    case when me607.rmc_code
    in ('M','MP','MS') then 'H311'
    case when me607.rmc_code
    in ('1','2') then 'H252'
    end as carrier code
    wanting to keep the results in carrier_code..
    Thanks..
    Edited by: user12296489 on Dec 10, 2009 3:53 PM

  • Is this a valid syntax for main() function

    hi
    here is a very basic question...
    is this signature a valid entry point to an application..?
    public static int main(String[] arg)
    i compile it and it gives me no error but when i run it, it throws an exception in main...
    I am asking this question because one of the certification books has a question which says that this is a valid signature.
    please do let me know ur comments...
    thanks a lot.

    thanks for all the replies....
    it compiles and here is the run time error that i get
    Exception in thread "main" java.lang.NoSuchMethodError: main
    also the book is Complete Java2 Certification study guide 2nd Ed Sybex
    chapter 1, page 26, question 3.
    which of the following sig. are valid for the main() method entry point of an application
    a> public static void main()
    b> public static void main(String arg[])
    c> public void main(String[] args)
    d> public static void main(String [] arg)
    e> public static int main(String [] arg)
    so the answers shud be b,d and not b,d,e right?
    thanks

  • Need proper syntax for CommonviewFields

    Hello all,
    Am using SP Online
    I have read and tried many blogs and have had partial success with the steps proposed. But when I change
    <property name="CommonViewFields" type="string" />
    to
    <property name="CommonViewFields" type="string" />Title, Text</property>
    I get an error in sharepoint online, saying the XML might not be "well-formed"
    If I export the Content search web part, and re-import it as is, I don't get the error.
    Is there another line of code that I need to change? Or my syntax is wrong? I have tried other column names without success (using the internal name of course)
    Thanks
    Pierre
    pgg02

    Hi Pierre,
    Please remove the first character /, then it should work.
    <property name="CommonViewFields" type="string" >Title, Text</property>
    Thanks
    Daniel Yang
    TechNet Community Support

Maybe you are looking for

  • After 10.6.8 freeze on login

    I all After last 10.6.8 update my MBP 13 2011 does go after login page... Finder does not appear, i tried boot in safe mode and it go , i downloaded the update again (from site) and installed, but is the same. Can anyone help me?

  • Adding page link

    Hi, I have a simple flash movie which which fades an image in. Is it easy to add a link to the flash move/ image without adding a button or text in order to link to another web page?

  • Authorization group class maintenance

    Hi experts, I have a question for restricting the maintainance of classes and material classification. I am uploading classes in SAP and these classes the user should not be able to maintain or create material assignments to them, only the user who i

  • Server 2003 backup

    i search from the internet and find some recommendation for server 2003 backup solution, i wonder which is better. the only requirment is userfriendly, and cheap of course. i am not intend to put too much energy into this. i know Acronis, Aomei and m

  • From Bridge cs4 to Flas cs4 to dreamweaver cs4.  Help please

    Hello all in thank you for any help. I have Mac os x 10.5.7 here is my prblem. I created a web gallery in bridge cs4   ( great I got that). now I open it with flash cs4. Now I like to go with the gallery to dreamweaver cs4 (8) or (9) last one Any hel