This topic is locked

Lookup Wizard FIlter

4/13/2011 7:06:15 AM
ASPRunnerPro General questions
P
paulstone author

Hi,
Great Program! Have made very good use of the trial version. Would love to buy soon after seeing the great potential of usage.
I have a question regarding lookup wizard...
I have a Query with 2 or more fields using the exact same lookup (data from another table) in the same form.

I would like one of two things to happen to filter the data after the first selection has been made...
1st possibilty is that after the 1st dropdown box data has been selected, that selected data becomes unavailable in the second lookup,
2nd possibility (achieving the same result) after the fist dropdown box data is selected, a corresponding field with the selected data changes. The Where expression would then filter out that data in the second lookup because of the data change..
Have I made this clear?? Sorry if not but any help would be appreciated..
Regards,'
Paul.

Sergey Kornilov admin 4/13/2011

Paul,
I'm not 100% sure I fully understand this. It would be nice to see the actual data.
Anyway, WHERE filter is applied on the server side when page is loaded which means you cannot change it on the fly. There are possibilities to remove items from dropdown box on the fly using Javascript but it can be proved complicated as you also need to add previously removed items back. It's not impossible but complicated and some manual coding will be required.
Do I understand it right you need to make two different selections from the same lookup table?
What if you simply create a single multiselect lookup wizard?

P
paulstone author 4/14/2011



Paul,
I'm not 100% sure I fully understand this. It would be nice to see the actual data.
Anyway, WHERE filter is applied on the server side when page is loaded which means you cannot change it on the fly. There are possibilities to remove items from dropdown box on the fly using Javascript but it can be proved complicated as you also need to add previously removed items back. It's not impossible but complicated and some manual coding will be required.
Do I understand it right you need to make two different selections from the same lookup table?
What if you simply create a single multiselect lookup wizard?


Thanks for the quick response !
Sorry if I am not explaining very well.
You can go to a live demo of this data

If that link doesnt work try this...
http://paulstone.homeserver.com/Nexus/QDTM___IMAC_Installs_list.asp
to see what I am trying to achieve. Once at this table.. select add new record and you should see the form/Query that I have created.

In the Analogue decoders installed TAB of the form I would like to achieve what I have described....

Once a record is selected for the field of SKY 1 Decoder Serial Number.. I would like that same data to be unavailable for selection in the field of SKY 2 Decoder Serial Number

I.e the data can only be chosen and selected ONCE!
Hope this helps and thanks for you time,
Regards,
Paul.

Sergey Kornilov admin 4/14/2011

Thanks, I see what you mean.
Check this example:

http://demo.asprunner.net/kornilov_gmail_com/Project25/Cars_add.asp
Select Make and Model. Option selected in Make disappears from Model and vice versa.

P
paulstone author 4/14/2011



Thanks, I see what you mean.
Check this example:

http://demo.asprunner.net/kornilov_gmail_com/Project25/Cars_add.asp
Select Make and Model. Option selected in Make disappears from Model and vice versa.


Sergey thanks,
it looks like this demo is trying to achieve exactly what I am, except it doesn't seem to do what you described <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57646&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />

When I select a make or model, the same value is still selectable in the opposite field.

Either way if there is a way to make that work then how would I go about achieving this?? I have a feeling that the way some sites do a similar thing is that when you make a selection in the first field, the page seems to refresh, therefore refreshing the filter to reflect changes for the second field... Am I making sense??

Thanks again for your time..
Paul.

Sergey Kornilov admin 4/14/2011

Paul,
strange, it works from here. I've shot a quick video for you:

http://screencast.com/t/eBFnJW05aJeF
Initially all options are available. Then I select Audi from the first dropdown box and it disappears from the second one. Next step I select BMW from the second one and its no longer available in the first one.

P
paulstone author 4/15/2011



Paul,
strange, it works from here. I've shot a quick video for you:

http://screencast.com/t/eBFnJW05aJeF
Initially all options are available. Then I select Audi from the first dropdown box and it disappears from the second one. Next step I select BMW from the second one and its no longer available in the first one.


Sergey,
Thanks, I don't know why it doesnt work my end?? I am using Explorer 8 on Windows 7. I can select the same value in both fields. Weird.. Anyway thanks for the video!! That is what I am trying to do.. But how do I do it?? Can that be achieved within the ASPRunner Program or does it require editing of the outputted pages??
Kind Regards,
Paul.

Sergey Kornilov admin 4/15/2011

This was implemented within ASPRunnerPro with the help of Javascript API in events. No need to modify generated pages.
I recommend you to contact me directly at http://support.xlinesoft.com so we can discuss the details.