BusinessObjects Board

problem in prompt

Hi All,
I created a prompt which will ask user to select month value from the list of values and i am validating it to some condition.The syntax of the prompt is datepart(month,cast(‘01’ + ‘-’ + @prompt(‘1-File Review Month’,{‘January’,‘February’,‘March’,‘April’,‘May’,‘June’,‘July’,‘August’,‘September’,‘October’,‘November’,‘December’},)+’-’ +‘2007’ as Datetime)) in (some condition)

but now my users want to include ‘ALL’ or blank value in this list so that they can run without having this month filter

if i use ‘ALL’ in @prompt it is throwing error as ALL is not the valid month

can any body please tell me how can i achieve this

i am using sql server database

Thanks,
Kumar


kumar446 :india: (BOB member since 2006-01-23)

Create an EXCEL file, put all the month names including ‘ALL’ as one of its option and create a ALL prompt; An example of how to create an ALL prompt is available in Designer FAQ’s… for your reference.

Send the EXCEL file to all the users who uses this report.


BO_Chief :us: (BOB member since 2004-06-06)

Hi,
Sorry for the delayed response but my users dont want the excel file option.Is there any option apart from this


kumar446 :india: (BOB member since 2006-01-23)

Before suggesting anything I would like to ask you that since there will be a single value returned (month number) by the above expression to be used in another condition. Then why do you want ‘ALL’ to be passed to prompt.
You can create a standalone object and add this to the LOV SQL

 SELECT 'January' 
           UNION
          SELECT 'January' 
          UNION
          SELECT 'ALL'

Use this object in your prompt expression

.


haider :es: (BOB member since 2005-07-18)

Hi,
Thanks for the reply i am little bit confused.Please explain me more

Thanks,
Kumar


kumar446 :india: (BOB member since 2006-01-23)

Tell your exact requirement.
How you want prompt object to be used in universe or reports.
And the need for passing ALL to the prompt

.


haider :es: (BOB member since 2005-07-18)

Hi,
My requirement is.I want to prompt the user for selecting month value from the drop down list and i am converting that text month value in to numeric and validating that to the month value in the right hand side

datepart(month,cast(‘01’ + ‘-’ + @prompt(‘1-File Review Month’,{‘January’,‘February’,‘March’,‘April’,‘May’,‘June’,‘July’,‘August’,‘September’,‘October’,‘November’,‘December’},)+’-’ +‘2007’ as Datetime)) in (some condition)

For that i am creating the month prompt without having any database column reference

But my user now want to have all values in the list so that they can use them for all months

Thanks,
Kumar


kumar446 :india: (BOB member since 2006-01-23)

But it will be always one value rather than multiple values which should be returned by it (left side) and pass to the condition (on right)
In other words what you want the ‘ALL’ to do in this scenario.

.


haider :es: (BOB member since 2005-07-18)

Yes what i am dooing is i am creating a condition like based on the status
if status=act then take active month if the status is draft then draft month and for the month input i created the prompt


kumar446 :india: (BOB member since 2006-01-23)

This is still unanswered.
You agree that there will be always one month value checked.

Please reply to everything written to avoid unnecessary posts.

.


haider :es: (BOB member since 2005-07-18)

Hi,
If i select All then it should run for all the months i.e
if i select ALL then the condition should take all months as input and should execute


kumar446 :india: (BOB member since 2006-01-23)

Hi,
Here i am giving my complete condition

datepart(month,cast(‘01’ + ‘-’ + @prompt(‘1-File Review Month’,{‘January’,‘February’,‘March’,‘April’,‘May’,‘June’,‘July’,‘August’,‘September’,‘October’,‘November’,‘December’},)+’-’ +‘2007’ as Datetime)) in (select case when @Select(File review\FR Status)=‘Draft’ then @Select(File review\FR Draft Month) when @Select(File review\FR Status)=‘Finalized’ then @Select(File review\FR Finalized Month)
end )

when all is selected then it should take for all values of month


kumar446 :india: (BOB member since 2006-01-23)

Hi,
Now i want to add all to the above prompt so that when the user enter all the he should see all the values for all months

REGARDS
kUMAR


kumar446 :india: (BOB member since 2006-01-23)

Pleasy search the FAQ and the board because this is the subject of many threads!

HenkK


HenkK :netherlands: (BOB member since 2004-03-02)

This has to be done in Designer. Check the Designer FAQs here and here.


Anita Craig :us: (BOB member since 2002-06-17)

Hi,
I am creating it in designer.please see the code i posted.i am harcoding the month list.Now i want to give my user an option to select all or two or three months from the above prompt

how can i achieve this

Regards,
Kumar


kumar446 :india: (BOB member since 2006-01-23)

Hi,
I can able to apply all but i am not able to include multi values in the selection

I am using the prompt to validate against condition

(some condition) in @prompt(…)
or
‘ALL’ in @prompt(…)

But it is not allowing me to place ‘in’ between prompt and condition by which i am unable to give multi option

Please help me in sorting this out

Regards,
Kumar


kumar446 :india: (BOB member since 2006-01-23)

Moving to the Semantic Layer forum for further attention.

kumar446, you are going to have a problem adding “All” to a date prompt because the datatypes don’t work. In your code you are creating a date by adding ‘01’ to the front and ‘2007’ to the back of the selection. If you want to include ALL in the list of months, since you are hard-coding it you would simply add it to the beginning (or end) of your list. But then you have to deal with the fact that “All” is not a valid month, and therefore will fail to convert to a proper date value for your comparison.

If I might make a suggestion… You have several very similar topics running. Similar, but not identical. If they were identical then we could close the extra ones and try to focus the attention on the remaining one. But since they are not identical, I would ask that you pick one and post your complete requirement there, instead of fragmenting the answers in more than one topic. Please post in your other topics which ones you would like closed and a moderator will close them for you. I know I am personally quite frustrated trying to decide which of your topics to participate in, and as a result will probably just stop answering altogether.


Dave Rathbun :us: (BOB member since 2002-06-06)

Hi Dave,
I searched a lot and cannot find any answer for the problem i am facing.Please eloboarate me

((case when tablea.sts=‘draft’ then cast(datepart(qq,strt_dt) as char) when table.sts=‘finalized’ then cast(datepart(qq,end_dt) as char) end) in @prompt(‘File Review Quater’,‘A’,‘class/object’,multi,))
or
(‘ALL’ in @prompt(‘File Review Quater’,‘A’,‘class/object’,multi,))

But this is not allowing me add multiple month values

Regards
Kumar


kumar446 :india: (BOB member since 2006-01-23)

I am not asking you to search. :slight_smile: I am asking you to pick a topic and stick with it instead of posting the same (or very similar) questions all over the board.


Dave Rathbun :us: (BOB member since 2002-06-06)