Skip to Content

Scriptlogic Ternary operator + For variable

Hello people. first of all I've been searching, and I've read a lot of post about ternary conditional,

but i can't find any similar to what I want to accomplish

Maybe someone can help me:

Right now the code is copying a value for an entire month (DAYS)

*WHEN ACCOUNT

*IS <> A_BANK

*FOR %DAY% = %DAYS%

*REC(EXPRESSION=R_DATE=%DAY%)

*NEXT

*ENDWHEN

What i want is:

Having two dimension with dates:

R_DATE = The day we write a record.

L_DATE = The limit date till we have to write

Write the record till R_DATE = L_DATE.

//Next code is wrong " syntax error", don't know if I can do this.

*WHEN ACCOUNT

*IS <> A_BANK

*FOR %DAY% = %DAYS%

*REC(EXPRESSION=L_DATE > %DAY% ? R_DATE=%DAY%:0)

*NEXT

*ENDWHEN

Example:

Month 1-30 days = (01.10.2015,02.10.2015...)

L_DATE = 15.10.2015

Write the value until we reach L_DATE in R_DATE

Thanks for your help & regards

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 11, 2014 at 05:14 PM

    Sorry,

    But can you explain the following:

    R_DATE and L_DATE - what is it? Members of ACCOUNT dimension??? Or What?

    What do you mean by:

    L_DATE = 15.10.2015 ???

    Vadim

    Add a comment
    10|10000 characters needed characters exceeded

    • P.S. Select description in help is old and incorrect:

      On the recent SP you can even use multiple members condition like "[ID]=MEM1,MEM2,MEM3"

      And for sure you can use AND and OR to combine criteria...

      But you can't use SELECT inside FOR/NEXT loop - it will be calculated only once before the loop processing.

      B.R. Vadim

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.