Skip to Content

Optional prompt on universe level

Applied code below in order to have optional prompt, although optional prompt is succeed but after that I get the error which attach below

where

(A.BATCTRCDE='T413' or (A.BATCTRCDE='T405' and E.REPTYPE in (select REPLCODE from CDE_T_T3586)))and A.SACSCODE in ('FG', 'CO')

and

(

A.BATCACTYR = @Prompt('Enter This Year','N','Year Others':'BATCACTYR',Mono,Constrained,Persistent,,User:-1,Optional)

AND

(

A.BATCACTYR = year(getdate())

OR

A.BATCACTYR = @Prompt('Enter This Year','N','Year Others':'BATCACTYR',Mono,Constrained,Persistent,,User:-1,Optional)

))

Untitled.png (15.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2014 at 09:23 AM

    Hello,

    try this:

    (A.BATCTRCDE='T413' or (A.BATCTRCDE='T405' and E.REPTYPE in (select REPLCODE fromCDE_T_T3586)))and A.SACSCODE in ('FG', 'CO')

    and

    (

    1. A.BATCACTYR = isnull(@Prompt('Enter This Year','N','Year Others':'BATCACTYR',Mono,Constrained,Persistent,,User:-1,Optional), A.BATCACTYR)

    AND

    (

    1. A.BATCACTYR = year(getdate())

    OR

    1. A.BATCACTYR =isnull( @Prompt('Enter This Year','N','Year Others':'BATCACTYR',Mono,Constrained,Persistent,,User:-1,Optional), A.BATCACTYR)

    ))


    regards

    Andreas

    Add a comment
    10|10000 characters needed characters exceeded

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.