Jump to content

bstrad

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by bstrad

  1. So I figured it out. The code I wrote in C# needed a very slight modification. I was entering in a new line after the pilcrow. So instead of looking like this Set Variable[$directories; Value:"filewin:/C:/Direc/TMA/CPAS/W10/CPAS, US, W10, TMA 377, SEC 001, TMA, Teacher1.csv¶ filewin:/C:/Direc/TMA/CPAS/W10/CPAS, US, W10, SCED 476, SEC 015, TMA, Teacher3.csv¶ filewin:/C:/Direc/TMA/CPAS/W10/CPAS, MT, W10, SCED 476, SEC 015, TMA, Teacher4.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, TMA 377C, SEC 001, TMA, Teacher5.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, TMA 377B, SEC 001, TMA, Teacher6.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, SCED 476, SEC 030, TMA, Teacher7.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, MT, F09, SCED 476, SEC 030, TMA, Teacher2.csv¶"] It now looks like this Set Variable[$directories; Value:"filewin:/C:/Direc/TMA/CPAS/W10/CPAS, US, W10, TMA 377, SEC 001, TMA, Teacher1.csv¶filewin:/C:/Direc/TMA/CPAS/W10/CPAS, US, W10, SCED 476, SEC 015, TMA, Teacher3.csv¶filewin:/C:/Direc/TMA/CPAS/W10/CPAS, MT, W10, SCED 476, SEC 015, TMA, Teacher4.csv¶filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, TMA 377C, SEC 001, TMA, Teacher5.csv¶filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, TMA 377B, SEC 001, TMA, Teacher6.csv¶filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, SCED 476, SEC 030, TMA, Teacher7.csv¶filewin:/C:/Direc/TMA/CPAS/F09/CPAS, MT, F09, SCED 476, SEC 030, TMA, Teacher2.csv¶"] I also put in a go to the layout I'm importing in to make sure it worked properly, and no problems. Thanks for the help bcooney.
  2. Thanks for the reply. As far as I know the paths are valid. The commas are only part of the file name. ex: CPAS, US, W10, TMA 377, SEC 001, TMA, Teacher1.csv is the name of the file in the directory filewin:/C:/Direc/TMA/CPAS/W10 Since FileMaker does not have Arrays I set up a variable as you can see below, that had the pilcrow as a delimiter, which is the default for FM. I guess one thing I might not have been clear on is that these are not .txt files, they are .csv. I was making this script go to each .csv file and import it. Below you can find the script. I very much appreciate the help! Set Variable[$counter; Value:1] Loop Set Variable[$directories; Value:"filewin:/C:/Direc/TMA/CPAS/W10/CPAS, US, W10, TMA 377, SEC 001, TMA, Teacher1.csv¶ filewin:/C:/Direc/TMA/CPAS/W10/CPAS, US, W10, SCED 476, SEC 015, TMA, Teacher3.csv¶ filewin:/C:/Direc/TMA/CPAS/W10/CPAS, MT, W10, SCED 476, SEC 015, TMA, Teacher4.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, TMA 377C, SEC 001, TMA, Teacher5.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, TMA 377B, SEC 001, TMA, Teacher6.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, SCED 476, SEC 030, TMA, Teacher7.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, MT, F09, SCED 476, SEC 030, TMA, Teacher2.csv¶"] Set Variable[$foundCount; Value:ValueCount($directories)] Set Variable[$path; Value:MiddleValues($directories;$counter;1)] Import Records[No dialog; “$path”; Add; Windows ANSI] Perform Script[“Merge Records”] Set Variable[$counter; Value:$counter+1] Exit Loop If[$counter>$foundCount] End Loop
  3. Hey all, I have many, 200+, csv files that are updated very often. I am wanting to be able to auto import all of these csv files into a table in filemaker. So I wrote some code in C# to extract all my file names as follows filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, TMA 377B, SEC 001, TMA, Teacher1.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, US, F09, SCED 476, SEC 030, TMA, Teacher2.csv¶ filewin:/C:/Direc/TMA/CPAS/F09/CPAS, MT, F09, SCED 476, SEC 030, TMA, Teacher3.csv¶ I then have put these into an array inside filemaker, all 200+ file directories. I then set a variable to change what file extension it is defined as, and go through the entire array one by one. I was wanting to set up a loop where I could import all of these files by using the import function as follows. Import Records["$path"; Add; Windows ANSI] $path changes as follows Set Variable[$path;Value:MiddleValues($directories;$counter;1)] $counter = $counter + 1 In my data viewer the $path is changing correctly to the next path as it should. My problem is that when Import Records["$path"; Add; Windows ANSI] is called the second time and then after it seems to just skip the script, so it will only perform the import function once. I also tried to do multiple calls of the Import Records script and it still did the same thing. Any ideas on how I could get this to import all my csv files calling the script only once?
  4. Cool, thanks a lot John. Brandon
  5. So I'm trying to do an automated save as pdf in my database. What I want to do is make it possible for someone to save a file by just pasting their path from a Windows Explorer address bar into a custom dialog box in FileMaker. The only problem I am running into is converting the "" over to a "/". For instance if I want to save the pdf in the path C:Documents and SettingsAdministratorDesktop then I need to tell filemaker to find and replace all the 's with a /. And my final save path will look like this filewin:/C:/Documents and Settings/Administrator/Desktop/. The problem I am facing in doing this is that Filemaker recognizes as an operator for division and will not let me put it into a Calculation for a text. ex: Substitute ( $path; ""; "/") Gives me the error "This text constant does not end with a quotation mark." Any ideas???
  6. This definitely will work. It will be a slow process because IWP changes how text is displayed, and because of the amount of radio button sets I will need to set up. If there are no other solutions this is what I will do.
  7. I've set them up as Custom Value Lists...
  8. Hey guys, I have a value list assigned to a radio button field, but the values or text I have displayed in it is lengthy. A user would have to use the scrollbar to scroll across the page in order to read the entire text, that is if I extended the field the full length of the text. In Filemaker I noticed it will not wrap my fields to the next line if my field is too small, however, with IWP my text does wrap to the next line just as I would want it to. My database will be used through both IWP and the FM Program. I have both Asian and Roman Line Breaking selected under File/File Options/Text. I've also tried to change my font smoothing settings in windows xp using both Standard and Clear Type smoothing. Any suggestions? Thanks, Brandon
  9. So I created a simple solution with your help and researching the topic a bit more. Set Variable [$layoutID: GetNthRecord ( Form Assignment: LayoutID; get ( PortalRowNumber ) )] Go to Related Record[From Table: "Forms"; Using layout:$layoutID] Thank you so much for your help, it really helped me understand the concepts better! Brandon
  10. Thanks for the reply. The concept I'm having problems understanding is how am I supposed to appropriately assign the scriptparameter to the formID? I'm guessing I would need to do this by a calculation associated with the get(PortalRowNumber) fx. But my problem here is that in the Forms Assignment table I have multiple classes assigned to an individual form. For example inside my Forms Assignment table I have three records. The three records assign form1 and form2 to class1 and form1 to class2. If I am using the get(PortalRowNumber) to reference the record number of the related record in the Forms Assign table then I would be receiving one when I needed three since the assignment for form1 to class2 is in the third record. So in summary I'm still falling short on how to appropriately reference directly to the correct related record that is displayed in the portal. Thanks, Brandon
  11. So I'm trying to navigate between records to the appropriate layout. In my database I have different forms that students need to take and fill out. Which forms the students need to take is dependent on which classes they are in. So I have a Student table, a Enrollment table which relates which classes have which students and vice-versa, the Course table, and then the Forms Assignment table which only has two fields (course id and form name). The last table in my database is linked directly to the student and is the Forms table. This table contains all of the different forms a student can take and displays the different forms by using different layouts. From the student table/layout I have setup a portal that shows me the related records from the form assignment table using the form name field. This portal is working properly and displaying the correct form names. Now I want to put a link inside the row in the portal displaying the form name. I've assigned a button "Go to Related Record" with Get related record from the Forms table, but then I want to show the record using layout name by calculation. This is where I'm having problems. I don't understand what parameters filemaker is really wanting from me in the calculation. If I'm able to somehow grab the contents of the names in the form assignment table then I think this will be possible, but like I was saying I hardly know how to script anything in Filemaker. I'm very new to Filemaker and would really appreciate any suggestions!
×
×
  • Create New...

Important Information

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