• Content count

  • Joined

  • Last visited

  • Days Won


siroos12 last won the day on February 25 2016

siroos12 had the most liked content!

Community Reputation

7 Neutral

About siroos12

  • Rank

Profile Information

  • Gender
  • Location

Contact Methods

  • Website URL
  • Skype

FIleMaker Profile

  • FM Application
    14 Advanced
  • Platform
    Windows 10
  • Skill Level

Recent Profile Visitors

1,179 profile views
  1. Hi John, Can you post the script here So we can have a better understanding of the situation? I assume that there is a sub script within your script which is missing or deleted, so when the script trigger runs, it actually runs the main script correctly but when it reaches the line to execute the subscripts, it generates that error. Regards,
  2. Hi rmanh, It is going to be a bit tricky but I will try my best to explain it as clear as possible. You would need to add 2 tables to your file. 1- SuppliersList ==> Fields : ID and SupplierName 2- ItemList ==> Fields : ID , ItemName and SupplierIDfk (You may change the names the way that they make more sense to you.) Make a relationship between the two tables via SuppliersList:ID = ItemList:SupplierIDfk (Allow create and delete records from Suppliers to ItemList) On the other hand, you need to add field called SupplierIDfk into Line Items and Purchase Orders tables (your existing tables) and make a relationship like this: Line Items:SupplierIDfk=SuppliersList:ID . Make a layout for Suppliers, put the SupplierName field on the layout and add a portal to show up records from ItemList. This is to add Items which are related to each supplier. We have two options here to assign a Supplier to a PO. 1- Make a relationship between the two tables using SupplierName and then lookup the SupplierID. 2- Make a relationship between the two tables using SupplierID and then lookup the SupplierName. I would prefer the second method, it is more complex but more appropriate way. Lets do it: After making the relationship, on the PO layout, add the field Purchase Orders:SupplierIDfk and overlay it with Supplier_Company Field. Set Purchase Orders:SupplierIDfk as a drop down field and make a value list for it to show up the values from field ID . I know, it will show up the IDs instead of Suppliers Names but here is the trick, check the check box "Also display values from second field" and select the same table (SuppliersList) and set it to show values from SuppliersName and check the check box called" Show values from second field only". By this, we actually have our drop down to show up Suppliers Names but it inputs the SupplierID into the relevant field. and based on the SuppliersID, SuppliersName will be looked up. So far you made your proper structure for your file. Now add a button on the PO Layout and call it "Add". Assign below script to it. It sets the SupplierID as variable and add a line item for the PO then set the field Line Items:SupplierIDfk for us. At this stage if you set the ItemDescription as a drop down and make a value list for it to show up values from field LineItemsList:Item , it will only show up the relevant values for that specefic Supplier. Here is the script: Set Variable [ $SupplierID; Value:Purchase Orders::SupplierID ] Go to Portal Row [ Select; Last ] Set Field [ Line Items::SupplierID ; $SupplierID ] If [ Get(LastError)=0 ] Commit Records/Requests End If Go to Field [ Line Items::Product_Description ] [ Select/perform ] I have modified your file to give you a better Idea of what I mean by above. Please check attached. I hope the i could make it clear enough. And please mark the post as solved if it is Regards, Purchase Orders V1.fmp12
  3. I made a quick sample for you. Please note that this is just a very simple sample, it need a lot of more work to function as a solution. PO Sample.fmp12
  4. Hi rmanh, No script needed, You can create Table Occurrences based on the parts table and relate them to the Order table using vendor ID or name. So to elaborate; 1- You will have a table called "Orders" which keeps record of your purchase orders including Vendor ID or Vendor Name. 2- You will need another table called parts which keeps record of the parts and their vendors. (rather use a unique ID for each vendor). 3- Now make a table occurrence based on the "Parts" table and call it something that make sense to you (like "Parts to filter by Vendors") and relate the this table to "Orders" table using the Vendor ID or Vendor name. 4- You are half way through, at this stage, make a value list based on the parts name from part table. You would need to check the radio button says "include only related values starting from" and then choose the table occurrence you added for the Vendors. All done! Regards, Siroos
  5. Hi, Make a relationship between the two tables if they are not related yet, then use "Count()" function to count related records from the related table. So it is going to be something like this: This is the relation: Table 1 "StaffID" = table 2 "StaffID" This is the calculation: Then in table 1 make a calculation field and call it "StaffRecordsCount" for example. The calculation would be "Count(Tabel 2 :: StaffID)". You may name the fields whatever that does make sense to you. I hope this would help you. Regards,
  6. Use script parameters as Comment said to tell the script that which button has been clicked. Instead of adding buttons on top of fields, use script triggers to run the script. Either "on object entre" or "on objecmodified" (if I am not mistaken by names of triggers.
  7. Just a shoot in the dark, Why don't you use remote desktop or Team viewer free version to access their PC? This how I normally help my clients. I even install a Filemaker Pro Advanced on their system if they don't have it already and I uninstall it when I am done. I will be able to help in this way if it helps at all. Let me know please.
  8. Hi, Did you try to debug the script on the client PC? step by step?
  9. Not a problem at all mate, Happy that it is fixed now. Let me know when you are here in SA. Regards,
  10. Cool, Good luck.
  11. I just tried to replicate the problem here. I did simulate your script and it works here. I am not sure what is wrong based on the screen shot of you. I wonder if you can print the whole script or attached your file here. If you decide to attached the file, please make a clone copy so there is no confident information in it.
  12. Where in your script you set the portal row number? is it possible to post the script here so I can have a look?
  13. Hi Philip, Consider you have "Main" and a "Child" table. These two tables are in a relationship using a field called "Key" in both tables. Below script would do the job for you: Set Variable [ $RecNo ; Value:Get(ActivePortalRowNumber) ] Go to Related Record [ From table: “Child” ; Using layout: “Child” (Child) ] Set Field [ Child::Text ; "test" ]// Do your caculations here Go to Layout [ original layout ] Go to Portal Row [ $RecNo ] [ Select; No dialog ] Please give it a try and let me know if it works from your end. Regards,
  14. Wim, After hanging around making ODBC connection with no success, I am back here to ask more explanation about the "Execute SQL" and "Import (from ODBC source)" script steps. My Pervasive SQL has an ODBC driver but when I try to assign it as a data source to a table occurrence in Filemaker, I get the error stating that the data source is not supported by Filemaker. I have no clue of "Execute SQL", Do you think I would be able to read data from my Prevasive SQL database using "Execute SQL" and "Import (from ODBC source)" script steps? Can you please guide me through that? The volume of data need to be transferred is not really high. The hole story is that we have an accounting software called "Pastel" which uses Pervasive SQL to store data. We keep record of manufacturing orders in Pastel. Now I need to update my Filemaker database with the new orders data added to Pastel every now and then to be able to process order data in Filemaker. I really appreciate your time. Regards,
  15. Thanks Fitch, I will give it a try. Regards.