Problem Filtering Drop Down List Choices

Contains tips for configurators working with Aware IM
Post Reply
Ewanm
Posts: 111
Joined: Mon Jun 04, 2007 11:09 am
Location: Scotland

Problem Filtering Drop Down List Choices

Post by Ewanm »

I have a form that has a reference to another BO which is displayed as a drop down list. I require to filter the values in the drop down list using the values already used in the main BO. i.e. if the value has already been referenced in another record in the main BO, I don't want it to appear in the drop down list. Can this be done?

I have tried using the filter in the Reference Elements Presentation dialog and criteria '<>' and 'Doesn't contain'.

Ewanm
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Ewanm,

I think it should be possible using EXISTS and NOT.

See Rule Language Reference for more info on these as well as Rule name "Uniqueness of login name" in the RegularUser BO.

Feel free to post again if you need more help. It would also be good to post your solution.

Tom
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Ewanm,

Actually it was easier than I first thought. Try this filter query:

FIND Users WHERE Users.DropDownTest IS UNDEFINED

Explanation:
1- 'Users' if BO you want in the dropdown
2- 'Users.DropDownTest' is the reference in Users that cross references back to the BO you are creating.

Does that help?

Tom
Ewanm
Posts: 111
Joined: Mon Jun 04, 2007 11:09 am
Location: Scotland

Post by Ewanm »

Tom,

Worked great, thanks.

Ewanm
Ewanm
Posts: 111
Joined: Mon Jun 04, 2007 11:09 am
Location: Scotland

Post by Ewanm »

Back again,

The final solution worked great but I also have a similar problem with an unrelated BO.

I need to create a drop down list with values from one BO if they do not already exist in a second BO. I have tried numerous permutations using EXIST and NOT but cannot seem to get the list to display.

Any Suggestions

Ewanm
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Ewanm,

If that can be done, I don't know how.

You might want to try creating a third BO of values of BO#1 that are not in BO#2

You can find some discussion of similar things at:

http://www.awareim.com/forum/viewtopic.php?t=1578
http://www.awareim.com/forum/viewtopic.php?t=1610

I'd be interested to know how you finally solve it.

Tom
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Ewanm,

I think I found it -- try this filter:

FIND FirstList WHERE NOT(EXISTS SecondList WHERE (SecondList.Info=FirstList.Info))

Tom
Post Reply