Jump to content

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

Recommended Posts

  • Newbies
Posted

Ok, I am pretty new to FM. This is also my first post. I have been gleeming a good amount of great info from this site, so it seems best that I seek your help here.

I am working on an Inspection DB. The records are basically inspection forms for vehicles. Part of the record is an actual inspection. I have a number of inspection points that i want to be able to 'check' or not to indicate that the vehicle failed on that point. What I would like to do is make it so if an inspection point was checked, the inspection is 'failed'. As part of the output, I would like to be able to have a printable layout w/ the specifics on it. Included in those specifics, i would like to (dynamically merge I think)the fields that are checked as 'failed'. In essence, I would like to be able to produce a list of all the failing points on a layout.

Any help would be appreciated. I am trying to do this as efficiently as possible with out having to make 45 definitions, 45 buttons, and so on.

Thanks!

taxicab

Version: v6.x

Platform: Windows XP

Posted

Hi and welcome to the Forums.

In my opinion, this is more a Relationship settings issue than Fields Definition.

I've done quite this same job a while back. Here's how, based on this experience, I'd handle this case.

I'd go for a starting 4 files structures,

Inspection Points

Inspections

Inspections_Items

Vehicles

If (as I believe) your set of Inspection Points would vary according to the kind of vehicle you're inspecting, I'd create a table to store each Inspection Points for Vehicles.

InspectionPoints_Vehicles.

Then, a script would populate the Inspections_Items file with those Inspection Points that need to be checked.

By setting up a portal to the Inspections_Items file, as you probably understood, each Inspection Point would be One related record.

You'd be able to check those failed points from the portals, say involving a script that set a number field 'nFailed' with a 1.

Filtering out (an lately printing) those failed records would be therefore rather easy, either :

- by a find in the related records with the Inspection N

  • Newbies
Posted

actually, the inspection is the same for all vehicles! Thanks for your advice. i think i follow it. my biggest problem is i learn by example. i use other databases to reverse-learn how to do things. finding examples to learn from is the hardest part of this whole process.

Thanks!

taxicab

Posted

Taxicab,

If all you want to do is click on the box next to any items that fail inspection and then generate a report for the vehicle owner, here's a quick and dirty solution.

This lacks ANY of the elegance of Ugo DI LUCA's solution, but is easily done in a short amount of time. There is one value list, one calculated field, and one script.

If you want to do anything more dynamic than just point, click, and print one report per inspection, this probably isn't flexible enough.

Paul

Posted

Paul,

It's good that you brought this extensive list here.

May I give some suggestions, if really you're doing alike in your job, I'd suggest the value list be related and stored in another file (Tests file) with 3 fields

TestID : 01

Category : Under the Hood

Test : Air Cleaner

Then, instead of using it as a value list, you'd display all these related records in a portal on the Inspection File Layout.

For a better use, I'd use a global key to filter the portla list by category, by creating a value list of those categories stored in the Test file.

Each click on a portal row would just create a related record in the Inspection_Items file, that would have these 3 fields :

serial

TestID

Inspection#

Then, based on a portal linked to the Inspection_Items, it would be very easy to display thos failed tests by a relationship Inspection#::Inspection#.

The report would be printed from the Inspection_Item file.

Having it structured this way always help when you need ulterior research or sort for When, What, Why and Who.

Does it make sense ?

FileMaker Version: 6

Platform: Mac OS 9

Posted

Thanks Ugo....

I assume that my low number of posts acts as a warning to readers that my posts and possible solutions may not be the most fluid or smooth. Even so, it's fun to hammer out some of the problems and solutions.

I'm not currently doing anything like this at work, (I "borrowed" the list from another web site.) but created the database specifically with "simple" in mind. After I tested it, I noticed that if you select the items from the list in random order, they show up in random order on the "report". It's a marginal solution at best, I admit, but one that could be implemented by users with any skill level.

Your solution is how I would do it if I had a little time to sit and think.

Speaking of which, I'm not sure I understand the purpose of the "serial" field in the Inspection_Items file. If you are using Inspection# as a unique number, isn't "serial" redundant? Is a serial number a convention for all your files?

Also, picking from a value list was very limiting in terms of explanation or anything "out of the ordinary." I would add a "Comment" field to the Inspection_Items file in order to explain anything unusual and have it show up in the portal, and subsequently on the report.

I remember reading a discussion about storing concatenated numbers instead of the text so that all the inspection results would be searchable within one field, but I can't remember the maximum number of letters that FM will search in one field and so don't know if that would be a consideration in this case.

Paul

Posted

Hi Paul,

So you get as addicted as I (and many others here) are to take examples around and build your own. That's pretty cool.

Yes I use a serial (actually a random ID for each record in each file. This helps later on when you're doing job into the Line Items or any other file (well an Inspection# acts "as" a serial for me for sure).

The Inspection# is used as the foreign key in the Line Items, and would be linked 2 ways to the Inspections file (one way from the Inspection file for record creation and display, the other for eventual lookups from the Inspection file).

Sure you'd make a comment, and it would be either attached to this particular id in the Line Item or to the Inspection#.

Well these are details we'd surely won't have to spend time on I guess. wink.gif

I'm not sure I'm understanding your multiple Ids into one field though. I this instance, I'd guess there would be individual records related to the Inspection#...

The indexing limitation did grew exponenetially with 7.

FileMaker Version: 6

Platform: Mac OS 9

  • Newbies
Posted

I have been playing with this for a while now. Paul's format looks right, but Ugo Di Luca's thought process makes more sense. the problem i am having is the simple fact that i am still very green with FM. I could really use a simple example like Ugo's in order to understand the mechanics behind it. i cant seem to get my portals working, i don't know if the files are set up correctly or what. not to mention, the help files i have been referencing are pitifully simple.

any help would be appreciated!

TaxiAgent

This topic is 7604 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.