August 21, 200124 yr Hi people, another question... I want to use a checkbox value as a basis for a relationship between two files (it's actually the same file). The Value List for the checkbox only has one value "Order Placed". I want to know, how do I set up my field as a calculation so it checks my Order Placed checkbox and I can tell my portal to only show records where the Order Placed checkbox hasn't been placed. I'm looking for the Calculation Value for the relationship It would probably be along the lines of Order_Placed_Calc = SOMETHING BY HERE Any suggestions? Thanxs Steve Griff
August 21, 200124 yr The simplest form of this calculated key is something like: OrderStatus (text) CalcKey (calculation, number, indexed) = If(OrderStatus = "Order Placed", 0, 1) These are fields in the realated order file. In the master file, the MasterKey would be: MasterKey (calculation, number, indexed) = 1 As I said, this is the simplest case. You might want to use a more complex key to show orders not yet placed, say to a particular vendor, by including the vendor ID in the key. -bd
August 22, 200124 yr Author Urhmm... I don't know what your going on about I just want a portal on a layout. The portal shows the records of the database it is on. Therefore the relationship would be : - Order_Database to Order_Database (A relationship to itself) The thing that will be used to filter the records to be shown would be a checkbox that is not ticked. That's what I'm trying to work out. How to do that. Hope that makes more sence on what I'm looking to do, and if what you explained in your last post is supposed to be the solution, then you'd have to explain it a little bit better ) Thanxs LiveOak, and sorry for this hassle. Steve Griff
August 22, 200124 yr I sometimes "go on" about stuff because you are not the only person in the audience. Of the over 4500 members of the forum, only a few post, but many read the topics. . Yup, your answer is all in the last post. The ideal is to create a relationship that matches a constant 1 (left side) with a checkbox in a record that MAY be set to one (right side). In this way a record can be made to display in the portal or not by checking a checkbox which results in a "1" appearing in the field used for the right side of the relationship. -bd
August 23, 200124 yr Author Ok.. I gotcha but one question. I've got my two fields here, the first is a calculation field that holds the "answer" that my checkbox value must give if it wants to be shown in my portal. Secondly is my text field that will hold the checkboxes (In this case just one that is defined with a value list with "Order Placed" So then, what is the answer that is needed in my calculation field that my checkbox is meant to have? Is it "Order Placed", 1, "1" or something else? I've tried these and it doesn't seem to work. In essence, my relationship at the mo is: - Quote_Database::Order Placed = Quote_Database::Order_Calc What does the Order_Calc value need to be? Thanxs Steve Griff
August 23, 200124 yr To describe my first post a little differently, go through the following steps: 1) I'm callin your entry field: "OrderStatus" displayed as a checkbox with the value list "Order Placed" ---------------------------------------------------- 2) From this calculate the field: CalcKey (calculation, number, indexed) = If(OrderStatus = "Order Placed", 0, 1) ---------------------------------------------------- 3) Also create the field: MasterKey (calculation, number, indexed) = 1 ---------------------------------------------------- 4) Create the relationship "OrdNotPlaced" Define "OrdNotPlaced" with: Quote_Database::MasterKey <---> Quote_Database::CalcKey ---------------------------------------------------- 5) Define your portal to use this relationship. That's it. -bd
Create an account or sign in to comment