Jump to content

Filtered value list


Flxbrown

This topic is 3008 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello,

I have a problem with making a filtered value list work. I want to have a drop-down list in one of my portals showing only certain records from a related table, but I can't make it work.

I have (for the purposes of this problem) 3 tables: "Quotations::" "Line Items::" and "Products::". "Line Items::" is the child in both relationships. The table "Products::" contains all of our stock, not all of which is for sale, so I would like to have a check-box field that allows me to include the item or not in the value list of sellable items.

From what I read on the forums here, the way to do this is to create a second occurrence of "Products::" and relate it to the first. I created a global field called "g.Included" and created "Products::g.included" and related it to "Products | Included::Included". I then made a value list showing "Products | Included::Item ID match" and "Products | Included::Item". If I don't check "Include only related values starting from: Products | Included" it doesn't filter and if I do, it only shows the active value and doesn't let me chose anything in a normal layout and in a portal it says <unrelated table>

What am I doing wrong?

Many thanks in advance

Whole Tree.JPG

Detail.JPG

VL.JPG

Relationship Products.JPG

Included example.JPG

Link to comment
Share on other sites

The problem with your approach is that the "Products | Included" TO is not related to "Line Items" until you have selected a "ITEM ID" value in "Line Items" - which kinda defeats the purpose here.

To make it work the way you have started, you must place the  global field in the "Line Items" table, and relate the "Products | Included" TO to it directly. Then define the value list to include related records from "Products | Included", starting from "Line Items".

 

A simpler method would be to define a calculation field in the Products table =

If ( Included ; ITEMID )

then define your value list to use values from this field. This eliminates the need for the additional TO and relationship. Note that here "Include" is a Number field and it contains 1 when a record is marked.

 

Edited by comment
Link to comment
Share on other sites

This topic is 3008 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.