Newbies Flxbrown Posted January 22, 2016 Newbies Posted January 22, 2016 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
comment Posted January 22, 2016 Posted January 22, 2016 (edited) 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 January 22, 2016 by comment
Newbies Flxbrown Posted January 22, 2016 Author Newbies Posted January 22, 2016 Thank you very much. I see what you mean about the relationship. I'll try your approach on Monday and let you know how it goes. Felix
Newbies Flxbrown Posted January 25, 2016 Author Newbies Posted January 25, 2016 Hi, It worked with the global field in Line Items. Thanks for your help. Felix
Recommended Posts
This topic is 3225 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 accountSign in
Already have an account? Sign in here.
Sign In Now