I have a strange requirement, which I think is not possible:
Customer wants to have a Prompt to choose between Regions and States. Now, when Customer chooses Regions, the next prompt should populate all regions, if he chooses States, the following prompt should populate all States.
He will choose either Regions or States.
But, since these are two different columns (for Region and State), I cant make both the conditions works together.
Any suggestions?
P.S.: There is an option for optional prompts, I am just looking for the above requirement.
REGION IN (CASE When @Prompt(‘Enter Region/States’,‘A’,{‘States’, ‘Region’},MONO,FREE) = ‘Region’ Then TABLE.REGION Else ‘1111111’ END)
OR
STATES IN (CASE When @Prompt(‘Enter Region/States’,‘A’,{‘States’, ‘Region’},MONO,FREE) = ‘States’ Then TABLE.STATES Else ‘1111111’ END)
Thanks for your response, but I did not understand your solution.
The ‘Then’ part should return something, what would I use there?
Suppose a User picks up Region from the first prompt, in the next prompt (which I believe would be cascaded one) should show him all the regions. In this case, the region column would be equated with the regions he chooses to result in the report. Same goes for States.
if I follow the logic, if you don’t select region, that half of the OR statement resolves to ‘region in 11111’ - false. It basically turns that half of the or into no results.
It’s pretty slick, wish I had thought of it first : )
You can replace the TABLE.REGION and TABLE.STATES with different @Prompts separately; but in WebI reports you’ll see all the 3 prompts in the prompt dialog.
Not sure of DeskI though, give it a try and post your progress.
You may need to modify the join condition based upon your requirements.
Next, you will have to create a Cascading Prompt (between Name and Value from Derived Table) and a Condition Object (with the Prompt definition). And you are done !!
On your report, you can select the Objects, along with the Condition Object, it will prompt you for Regions/States, and on selecting one of them, you would be prompted for the (corresponding) values.
I’m working on a blog post that shows how to do this now. I actually started it months ago based on a question from SCN but have not finished it. The prior post (just prior to mine) has a solution that is similar to what I am working on. It certainly has the same concepts.
That’s great Dave It is indeed one of the (multiple) sought after problems.
Certainly It will create a Complex Join in Universe.
Yes, you can do this. You can use Substring() (If I am not wrong, you can even use Substr() on Teradata). You will have to make changes in Derived Table, as well as in the Join condition. Something like: