If you are unable to create a new account, please email support@bspsoftware.com

 

YES or NO Selections by User and Using it As Parameters in a Query Filter

Started by gosoccer, 15 Sep 2015 09:34:40 AM

Previous topic - Next topic

gosoccer

Hey guys,

I have to have my main Query to include a "Y" or "N" condition to pullup a listing of certain Subject Query
values.

Like if they select "Y" in the Prompt Page Drop Down, the Query needs to go after only certain
CARS in White and if they select "N", it needs to go after All CARS or only the RED Ones.

Could you please help if you could.

Thx so much for your time, :) :)

BigChris

(?Prompt? = 'Y' and [Cars].[Colour] = 'White') or ?Prompt? = 'N'

MFGF

Quote from: gosoccer on 15 Sep 2015 09:34:40 AM
Hey guys,

I have to have my main Query to include a "Y" or "N" condition to pullup a listing of certain Subject Query
values.

Like if they select "Y" in the Prompt Page Drop Down, the Query needs to go after only certain
CARS in White and if they select "N", it needs to go after All CARS or only the RED Ones.

Could you please help if you could.

Thx so much for your time, :) :)

Hi,

You're not articulating the requirement very clearly here. What do you want to be returned if the users pick "N" from the prompt? All cars? Red cars? Some other choice?

Chris's solution will return all cars in that situation - but it's not clear from your post if this is your requirement?

MF.
Meep!

gosoccer

Sorry about that.

If the value returned from the prompt = 'Y', have the Query to go after only CARS with IDs (1-3) and return only
those cars, else have the Query to go after All cars.

So, something like this:

if (?prompt? in ('1','2','3') )
then return cars with ID# 1 or 2 or 3
else return all



Thx alot

gosoccer

 :) :) :) YES, Chris. That is perfect!!!! it worked for what I was trying to simply filter based on
a user selection. Thx so muchhhhh    8) 8)