Jump to content

Peter Barfield

Members
  • Content Count

    93
  • Joined

  • Last visited

  • Days Won

    1

Peter Barfield last won the day on June 2 2016

Peter Barfield had the most liked content!

Community Reputation

4 Neutral

About Peter Barfield

  • Rank
    member
  • Birthday 04/23/1966

Profile Information

  • Industry
    Self employed
  • Gender
    Male

FileMaker Experience

  • Skill Level
    Intermediate
  • FM Application
    14 Advanced

Platform Environment

  • OS Platform
    Windows
  • OS Version
    Win 10

FileMaker Partner

  • Certification
    Not Certified

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Peter Barfield

    Filter one portal based on another filtered portal

    Got it. I didn't realise that the variable could start with a minus and it would still work. My wife often saids to me that I over think things and don't see the obvious. This is a classic example. Thanks for your help
  2. Peter Barfield

    Filter one portal based on another filtered portal

    Comment, I have attached a screenshot of the script in question. As I said going forward in days via your script is a pearler and works without flaw. Just cannot seem to get it to go backwards in days to show the past. As you can see I have imitated your script added the variable $j (I used J as it was the next after i which you used) and created a Global variable same as you did however just threw a 1 before the final letter to give it a differentname obviously and changed the Weekview Interface _g_selectedDate to -1 instead of +1 (my thinking is this would go backwards in dates not forwards. The only thing I did not alter (or add in was the last line (line 19) i moved your code to the end and so did not perform that after the first loop. ( i did however try with it replicated although that did not work either) maybe I am not fully understanding the script although I think I do. Cheers
  3. Peter Barfield

    Filter one portal based on another filtered portal

    Comment, I will do just that however, at the moment I am not able to access my computer and will be on the road for a 6 hour drive home. When I get home I will post it. Cheers
  4. Peter Barfield

    Filter one portal based on another filtered portal

    That works a treat. Only 1 issue and I have played around with the script but I cannot get it to show the day previous days unallocated. If I follow the script I can see what it does so I created another variable similar to yours but calculated to go gdate - 1 however that falls flat and sets the field at the end to about 10 days prior to the current Gdate any ideas on where that might be failing? Other than that I am just about completely happy. I have used script triggers on field modify or exit depending to refresh and show everything correctly. once again thanks for your input.
  5. Peter Barfield

    Filter one portal based on another filtered portal

    Comment, you have completely got me there. how would 1 go about gathering the list by scripting? Do you have to loop through the records from the plant unassigned table? Or am I thinking this through all wrong?. How do you filter a portal via script? I know I can filter a portal from the portal setup but I am not aware how to do that via script. Sorry to ask so many questions once I get a grip on it I am sure i will be fine. also in one sense the assigned jobs are there I just have to have a way of building the list by looking at the global Date + 1 day, 2 days etc. as the assigned plants come from a relationship with the jobs table based on dates I thought I might be able to tap that information by virtue of the above mentioned criteria. Maybe I am clear as mud again in my explanation if I am I apologise.
  6. Peter Barfield

    Filter one portal based on another filtered portal

    Just the unassigned plant for those days Comment I received a notification from you that does not appear here for some reason you said comment said: I would try converting the last portal to a filtered one, based on a relationship using the x relational operator. Then just add more portals and change the filtering expression. That would save you the need to define 6 global fields and 6 relationships. With only a few jobs per day, and a fixed amount of plants it should be fast enough - but you need to test this for real. I have created a relationship of x from the unassigned plant to a TOC of that. Is that what you meant?
  7. Peter Barfield

    Filter one portal based on another filtered portal

    Comment, that works perfectly for the given day. I.e. Global Date. My question if you are able to help is applying the same concept to pick up unassigned from the global Date say +1 giving you the next day. In another portal. I think I tried to describe last night that they want for want of a better expression a week view broken up and displayed per day. My thought was 6 portals in "column" 3 each replicating each other except picking up the global +1, +2 etc. thanks again for that work yesterday.
  8. Peter Barfield

    Filter one portal based on another filtered portal

    Comment, I can see what you have done here and that is a different angle to what I was thinking. Sometimes a fresh mind can help. I will play around with this tomorrow and I will duly report on my success (keeping it positive).It certainly on face value appears to do exactly what I want. Thanks for the effort you have taken.
  9. Peter Barfield

    Filter one portal based on another filtered portal

    Sorry, comment. Only 1 plant per job or a clearer understanding would be 1 job sheet per plant. Due to the way invoices have to be created for contractual reasons every plant going to a site even if there are 3 plant on site they will all have their own job sheet, driver, offsider etc. so therefore 1 plant to 1 Job sheet. I know that sounds strange however, different contractors on he one site may very well have different plant on site and therefore invoices go to different departments or sometimes totally different companies.
  10. Peter Barfield

    Filter one portal based on another filtered portal

    Comment, I think you are right in that I have a table called plant with a primary ID and in the jobs table I have a key field for plant. With a relation to both of many to many. now for the next part. I will try and explain. There can only be 1 job at a time for any plant. Albeit it could involve 2 jobs on the one day. They will however, be different records.Though that is rare as more often jobs take the best part of the day to complete. So in the job table I have a field called Job Date which obviously indicates the day the job occurs. somehow I need to be able to tell if the plant is being used for a job on a given day and then remove it from a list of available plant. Does this throw any light on the subject or am I still clear as mud? 😀
  11. Peter Barfield

    Filter one portal based on another filtered portal

    Comment, Thanks for the reply. I was afraid of that response yet, expecting it. I will try and explain my situation. I have created a db for a family members business and on the whole it is doing what they were after. The db basically is a job allocation come invoicing solution. They operate plant. My brother in law came to me this morning with a request for the allocator to have a screen which would replicate his day planner sort of. What he wants is basically the screen divided into 3. The first "column" would be a space for creation of a new job, the 2nd would be a listing of the plant and their status for the day. I.e. Allocated or unallocated. And the third would be the same as the 2nd column save for the fact that would be broken down into 6 "boxes" (I'm thinking portals perhaps) these would show the previous days allocations the next day and the next so on until all boxes are full. In other words the first "portal" would be yesterday the 2nd tomorrow and so on. i have a table for the plant that is related to the job table by a plant Id field. The purpose is that the allocator is not completely computer literate ( actually he is totally illiterate.) and he is pen and paper person (old school) thus the effort to try to replicate and give him a good snap shot screen. I may very well be looking at this totally the wrong way and am happy for any suggestions on what might be a better way forward or a way to implement what he wants. IHave used a TOC of the plant table with is it a ?Cartesian join that shows all plant listed in the respective table. I guess I just need a way to filter that to show the allocation status for the given day. hope this makes a little more sense. I have had a brain zapping day trying to make this work.
  12. Is it possible to filter a portal based on another filtered portal content where a relationship exists. My question stems from a scenario where I have a jobs table and a plant (being machinery) table. I am trying to figure out a way to filter a complete list of plant to only show those that are not allocated to a specific day on the job table. I guess I am just seeing if it is at all possible or is there a better method to do it.
  13. Peter Barfield

    batch import via script

    Wim, This is the script as it stands now. Got Record/Request/Page [First] Loop Insert File [Reference;Never compress; Table:: Field; "".""] Go to record/Request/Page [Next Exit; after Last] End Loop. I know this is not going to do what i am after it was a test to see the idea behind the step Insert File. The script goes to the first record then displays the error unknown file and i am assuming that is because it can't find the ""."" file as it isn't a true file. I realise from what docs i have read if I specified a file that exists at that directory (let's just say ABC.txt) then it would work and import it into the field. As I have explained I am working on the basis that I have no idea what docs or how many exist in that directory and they will be updated throughout the day and the directory will be populated throughout the day with new docs. I just want to import what is in the directory into a container field for each one in filemaker a reference to them. So in other words the script if it is possible would be along the lines of Go to the directory specified Get the first Document Look in the filemaker table if they document name does not exist create a new record and insert the reference to the doc in a container field. If it exists skip that one and go to the next and so on - loop through all the docs in the directory until finished. I don't even know whether this is in the scope of filemaker or not. Hope this makes sense.
  14. Not sure if this is the relevant area however, I couldn't seem to find a scripting section What I would like to do and I have had no success so far is the following scenario. I have database which stores references to files in container field located on a folder on a shared computer. What I want to do is have a script which when run populates the database with the names of those files located in the folders on the computer and create a new record for those not already present and if they are already present ignore the import. I have tried a test script which gets the documents path and loops through each record however I get file unknown when debugging and that is as far as it goes. The script in no one handles the above scenario of omitting and inserting only new docs it was just a test to see if it was possible to import via this method. From what I can see the script is asking for a particular filename and if it can't be found it throws the error. That though is no good as essentially the filename is in a sense unknown at the time of import and that is what the purpose of the script would be i.e. too find those files and create a new record with reference only in a container. Documentation on this is either non existent or sparse and confusing to say the least (or at least that's how I find it) Any enlightenment would be appreciated.
  15. Peter Barfield

    Completely lost with ExecuteSQL

    thanks comment, I have just finished playing around and did in fact just created another field for the purpose of testing called it datework and yes that worked. going to try and get the other where part working now. Quick question though is there any rules to using global fields in the where criteria. just purely for eg where productdescription = _global_productdescription field.?
×

Important Information

By using this site, you agree to our Terms of Use.