JenNicole Posted October 22, 2008 Posted October 22, 2008 Hi all... I am just getting started with portals and have a question.... Currently I have a Portal setup that displays the results of payments from customers.... Payments are divided into 3 groups... "Dues", "Contributions', and 'Events'. When my portal displays the information I have learned that I can sort this information in order of Dues, Contributions and Events... BUT.. I would like this portal to display ONLY 'Dues' and NOT the others. All help appreciated.
mr_vodka Posted October 22, 2008 Posted October 22, 2008 What you are looking for is a filtered portal. See here. http://fmforums.com/forum/showtopic.php?tid/198574
JenNicole Posted October 22, 2008 Author Posted October 22, 2008 Thanks a mil! I will give this a try and hopefully come up with a solution! Thanks for your help. Keep your fingers crossed! Thanks again!
JenNicole Posted October 24, 2008 Author Posted October 24, 2008 I have researched only simple filtered portals and most seem to point in creating a global field in the parent table.... About global fields: I have tried to validate it text only ="Dues" and tied this in with my 'payment_for" field in the other table but I am having no luck... Perhaps I need help creating my global field... All help appreciated.
mr_vodka Posted October 24, 2008 Posted October 24, 2008 (edited) If you ALWAYS want it to be Dues, then you can use an unstored calc of the string "Dues" instead of the global field. Otherwise, allow the user to change the type of payments that they are filtering for. You dont really need any validation per se. P.S. Make sure that your 'payment for' field is indexed as well as the foreign key. Edited October 24, 2008 by Guest
bcooney Posted October 24, 2008 Posted October 24, 2008 You do need a filtered portal, however if you do not wish to show anything but payments of type "Dues", then you need a calc field in the Customers table, PayType_Dues="Dues", result text. The relationship from the Customers table to the payments table will be multi-predicated, CustomerID=foreign Customer ID AND PayType_Dues=PaymentType. However, I strongly suggest you get away from text values for payment types. Make a table of payment types and store IDs in the payment record. Let's say Dues becomes payment type 100. Then calc field in Customers becomes, PayType_Dues=100. If you wish to let a user switch the portal between payment types, then you'd use a global in the parent, PayTypeID_g, storage set to global. This global would appear above the portal, formatted as a popup menu, and would use the same value list of payment types that you use in the payments entry layout. Your relationship from Customers to Payments for the portal would be CustomerID=foreign CustomerID AND PayTypeID_g=PaymentTypeID
JenNicole Posted October 29, 2008 Author Posted October 29, 2008 Thanks for your response. I understand getting away from text values for payment.. but this particular database already has 30K records in it and I am just getting started with FM. Previous DB was custom C# and SQL.. anyway.. besides the point. I have tried what you said (it makes sense) but don't understand how to calc the payment_for... I other words.. my payment_for field contains only 3 types of data based on a value field of "Dues", "Contributions", and "Event/Purchases"... I need to somehow filter the results to show only records where the Payment_For="Dues". I know you have provided the answer and I appreciate your help.. but maybe I need it explained in a more elementary way.. All help appreciated. Thanks again.
bcooney Posted October 31, 2008 Posted October 31, 2008 This is the direct answer to how to filter your portal: You do need a filtered portal, however if you do not wish to show anything but payments of type "Dues", then you need a calc field in the Customers table, PayType_Dues="Dues", result text. The relationship from the Customers table to the payments table will be multi-predicated, CustomerID=foreign Customer ID AND PayType_Dues=PaymentType. In other words, you will have a relationship from Customer to Payments. The relationship will have two matches; CustomerID and Payment_For. To match Payment_For, you're looking for only the records in payments that have "Dues" in the Payment_For field. So, for the "left-hand" side of the relationship, you need a field in Customers that has the word "Dues" in it. To do so, create a calc field in Customers that equals "Dues".
Recommended Posts
This topic is 5866 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