Jump to content

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

Recommended Posts

Posted

How can i have a calculation field thats result will be a container check 15 records in a related db and if one of them has a bitmap in it then the calculation field will then contain that bit map otherwise leave the field alone? did i say that right? hehe basicly i say 15 because thats what i expect to be the max number of related records in any given day. then i want to check the related field in the related record to se if its empty. if so check the next related record and so on till i either have no more related records or i find one with a bitmap in it. i need to have it in a calculation field because i intend to have another db look at the results through a portal. is this possible?

Posted

I use a calculation in a field called Image Yes|No

Case(Image of File=0,"No", "Yes")

You can then use that for just about anything.

Note: Image of File is the Containger field.

HTH

Lee

Posted

How could i make that work with 15 related records? say, have a case check the containts of the same field in 15 related records and only = the one field that has an image in it? and if none have an image in it just leave it empty.

Posted

Hi James,

If you use a boolean calc as Lee suggested (mine would be c_checkEmpty = not is Empty(yourContainerField), and then sort your relationship Ascending based on that Boolean result, you could either :

- Have a calculation c_RelContainer = ::yourContainerField

- Drop a related field ::yourContainerField.

HTH

Posted

Hmm, would this work if i had 96 container fields? i will have to repeat this calculaction in 96 fields. frown.gif each record has 96 of these fields. and the file doing the checking will have 96 calculation field result being a container. thank you for all your help.

Posted

yea, i have a bit of a project going on. crazy.gif the 96 container fields will serve to draw a line in a portal showing the time frames that a service tech has been doing different things in the course of the day. I have found out what i want to do is pretty complicated and have been trying to figure out what to do for about a week. thinking till my brain hurts. frown.gif

Posted

From what I've seen in one of your previous posts, you'd better deal with one calc and 96 relationships.

Or 96 scripts setting a Multikey for each "period" so that you can match any hour within that range in the related file.

Or, if you can, split the way you display the hours...

Do you really need to see a span from 00:00:00 to 23:45:00 ?

Why not split it in 3 or 4 "big period" (0-5:45/6-11:45/12-17:45/18:23:45)

and move by script from one period to another. You'd reduce the relationships...

Just an idea.

Posted

well, because scheduling can be very on predictable. it just adds flexiblty to the scheduler but as i have learned its making it tough for me to make it work. It seems whatever way i try this I have a ton of typing. frown.gif I intend to make it so that whatever a tech does it will showup in this display. so i think i will have records in the job file for when he is at the shop or some other time not on a regular job. so i can make a report to see if techs are spending too much time not being productive etc. just a thought. the reason for it is lots of them i have worked with before i had my own company tended to waste alot of time and the company suffered for it. i want to be able to see where the waste is. and this like going to get gas or pickup parts etc may only take 15 minutes. so i figured that would be a good cutoff time instead of a field for every 30 minutes. but of course it makes things rough trying to figure out the best way to do this. I was thinking maybe I could do the following :

have the jobs file which has the jobs info which would have the techs name and the date of the job and the job number and the time started and ended plus other info. and have a line items file related to it that will use say 15 relationships and have each of the 96 calculations use a case function to check the related records in jobs to see if the container field has an image in it if so then it equals that. why 15 relationships? well i figure in a shift i can't see having more that 15 different events go on. now what i think need to do to make it all work is be able to have 15 relationships that i can predict. like the job number being the date&serialnumber but the serial number would reset each day. so relationship 1 would always be the shedule date&1 and the first job of the day would always be the schedule date&1. i don't know how to do that as of yet. i only thought of this the other night and havent had much time to think about it. basicly have a calculation that used the case function to check the 15 relationships to the related db which would check all 15 possible jobs for the day to see if there is an image in that field. and all 96 fields would do the same check. in this way I hope to show and image in the given field if in any of the jobs that day fell in that time frame. can i have a case function leave the contents of a field alone if say isempty(pm8) is false?

Posted

Hard Time you'll have.

If what you're looking for is a "Graphic Presentation", then, you'd better go to the scripted way for sure.

Here's the way I'd go (from which I'd also explore and learn a lot...)

1. Create a TimeSlots.fp5 with serial Number (1 to 96) and a timefield.

2. Build a time range field in the Job file, from start and end hours using SmartRanges technique.

3. Create a relationship from the Time Range field to the TimeField (text converted) in the TimeSlots.fp5.

4. Generate a value list of serials.

5. Create a Repeating Container field, with 96 blocks

6. Script each repetition using a loop script in the related records.

Extracting one at a time, each serial (1 to 96) using Ray's "Extract from Value List " technique,

Use this serial extracted to fill the block, using Ernst technique (in the Sample section)

You could then display the result in a portal, having all your techs represented and their repetions graphs...

Posted

See attachment for an interpretation of my former post. Doesn't use Smart Ranges though...

This file simulates an "Internet Connexions Check" in a company, representing in a chart the connexions of employees, by day from 00:00:00 to 23:45:00.

The whole process is based on a repeating field with 96 repeats, one relationship based on a concanation of keys, and another based on a Hour Range, using a Hour.fp5 file.

Then , as pointed earlier, I've implemented, step by step Ernst SetRepeating sampler, in order to reset and set in a looping script all records from the employee file.

There may be another way to do this, probably using the 96 calculations or relationships we were talking about. But I doubt it would be an acceptable solution....

HTH

spyfiles.zip

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