Oyseka Posted December 4, 2012 Posted December 4, 2012 Hi all, I am trying to populate a portal with all the items that are used in an installation. If I perform a find in the portal on the installation number I am only getting the first portal row. How do I get this right.
bruceR Posted December 4, 2012 Posted December 4, 2012 To begin with, you start by providing more information, so that others can help you. The best would be to attach your file or a clone or a simplified example. Also, note that finds in portals don't work the way that you expect. If you do a find in a portal for "red", you do not end up with a portal full of "red" items. You end up with a found set of records where one or more of the items listed in the portal is "red". The contents of a portal are always based on what the portal relation is based on.
Oyseka Posted December 4, 2012 Author Posted December 4, 2012 I apologise for the lack of information. The tables affected are: Installation Items table. This contains a list of the fire equipment on a particular site, different types and sizes of fire extinguishers, hose and reels, fire blankets etc. Job Card table. I want this to create a job card for the regulatory service of all the equipment. The items have to be listed separately as the service may involve using different parts on the same type of equipment. The relationship is based on the installation number. Gasman.fp7.zip
bruceR Posted December 4, 2012 Posted December 4, 2012 Ok. Now then: what exactly is your question? What are you trying to accomplish? On which layout? No, the relationship is not based (solely) on installation number. It is based on installation number; and productID.
bruceR Posted December 4, 2012 Posted December 4, 2012 You are not trying to "perform a find" at all. You are using a filtered portal. You have redundant data: you have fields "Active" and "Active_flag" You are using a filter that points to the wrong field.
Oyseka Posted December 4, 2012 Author Posted December 4, 2012 You are not trying to "perform a find" at all. You are using a filtered portal. You have redundant data: you have fields "Active" and "Active_flag" You are using a filter that points to the wrong field. The reason why the find is not scripted is because I am just trying things to get it to work. What I am trying to achieve is that from the Installation_Contact layout, when a client has been contacted and a date agreed to service the fire equipment, a button is pressed and a script triggered that takes the records from the current viewed client into the Job_Card layout which would sit in two parts. One part for the technician which lists all of the fire equipment to service and a series of check boxes to show what actions were taken on each piece of equipment and the other part for the office to record the seven possible actions on any piece of equipment
bruceR Posted December 4, 2012 Posted December 4, 2012 "lists all of the fire equipment to service" All of WHAT fire equipment to service? For the client? For the installation? For the product? What is the intended relation of Job Card to anything? Right now you have a Job card defined as having a combined key of InstallationID and ProductID. Given that definition, there is no point in having an items portal on a job card. What is a job card?
Oyseka Posted December 5, 2012 Author Posted December 5, 2012 Any fire fighting equipment at any installation has a mandatory service requirement annually. On installation number L00002 there are 13 pieces of active equipment. The production of the job card is to list those pieces of equipment and for the technician to record on that piece of paper the actions taken during that service, this could be just a service or replacement of components or gas recharge. We must then record which of these actions were taken on each piece of equipment and keep those records for five years. That is the purpose of the job card
bruceR Posted December 6, 2012 Posted December 6, 2012 Still not quite clear on the relation between the job card, the item, and the installation; and the periodic annual inspections. As previously mentioned - if you change the relationship to drop the part number; and correct the portal filter; the items do show up on the job card. But then why was there a part number as a property of the job card in the first place? If the job card just links to installation items, then you see all the installation items on the job card. Sounds like there should be a job card for each installation/each year? The yearly card is to be kept in the database or only printed? GasmanMOD.fp7.zip
Oyseka Posted December 7, 2012 Author Posted December 7, 2012 Hi BruceR, Sorry for the delay in replying. As I am still sorting out what is and isn't needed I have changed some of the field definitions to more accurately reflect the true purpose. In the Product Table I have changed the Product ID just to ID as in the Installation Items Table the Product IDis not meant to be a part number but an individual product ID and is an allocated number which is validated as being unique. This is so that the particular item can be tracked for it's service history from cradle to grave. As this is validated as unique I could not have several occurances of that particular number for service entries, hence the requirement for a Job Card table that allowed the same value to be present. The service records will be kept in the database.
bruceR Posted December 7, 2012 Posted December 7, 2012 So can you upload the modified file that reflects the changes you just described?
Oyseka Posted December 10, 2012 Author Posted December 10, 2012 Sorry about the delay, no power since the storm on Friday. How can I not show the products that are not active in the Job card. Gasman.fp7.zip
bruceR Posted December 10, 2012 Posted December 10, 2012 See message 5. You have redundant data. Get rid of the "Active_flag" field. Find All Installation Items where Active = Yes; do a replace, using 1 as the value. Change Installation Items::Active to a number field, checkbox; value 1 or empty. Relate Jobs::Active to InstallationItems::Active. Set Jobs::Active to a calc, number result, value 1. But - is Jobs::Active supposed to be about the JOB? Or is it there for relating to the Installation Items Active field?
bruceR Posted December 10, 2012 Posted December 10, 2012 I'm not following what is supposed to happen with the Job card. It is about just one product from an installation? So an installation with 8 active installation items would have 8 job cards? Or does one Job Card cover ALL the items for an installation?
Oyseka Posted December 10, 2012 Author Posted December 10, 2012 Hi BruceR, a job card is meant to cover all of the products in any installation and I don't think I will be able to print from the Job Card as there are some installations with 200 extinguishers plus all the other parifinalia, but never the less will have to be produced so a job number can be issued and any service items recorded against that job. Is there a way I can bring in the Job Card number to the Installation Items and produce a different layout to print from there? The Active Flag is for the Installation to show how many items there are to service at a particular installation. As the service record is kept in the form of the job card I suppose that I could actually remove them from the Installation Items rather than just hide them !!
Recommended Posts
This topic is 4365 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