Jump to content

patrick

Members
  • Posts

    6
  • Joined

  • Last visited

patrick's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Chuck, Thanks for the offer however the environment is Windows only. quote: If you're on Windows, there's no way I know to get around all 192 sets of if statements. Perhaps someone else here will know how. If you're unfamiliar with AppleScript, or you don't have access to a Mac, or you just don't want to tackle it yourself, let me know. I would be able to do it for you if you like, for about an hour's work. Chuck
  2. Oops, my repeat loop should read (2nd line): Repeat with i = 1 to FieldList.count thisField = FieldList If["not IsValid(indoRelShip::thisField )"] Set Field["thisField ","indoRelShip::thisField "] End If end repeat So much for rushing...
  3. Guys, thanks for your help. I can now enter the script. However my problem is this : I have 192 fields to search. Which means that I have to enter that If statement 192 times with appropriate modifications like below: If["not IsValid(indoRelShip::Games1)"] Set Field["Games1","indoRelShip::Games1"] End If If["not IsValid(indoRelShip::Games2)"] Set Field["Games2","indoRelShip::Games2"] End If etc... 192 times Is it possible within that script window to have an array and then use that array to pass a param to a repeat loop? That's how I would do it normally: FieldList = (Games1, Games2, etc...) Repeat with i = 1 to FieldList.count thisField = Field.count If["not IsValid(indoRelShip::thisField )"] Set Field["thisField ","indoRelShip::thisField "] End If end repeat That would save heaps of time and space. Once again, thanks for any suggestions.
  4. Hi Chuck, Thanks for your post yesterday. I am still having problems with scripting inside FM. Could you possibly shed some light of what is going on here with the If statement? 1/ In the Script Definition window I see this: if ["not IsEmpty(indoRelShip::Games1)"] instead of, as you have it in your example : if [not IsEmpty(indoRelShip::Games1)] Why is the program adding quotes to my code? All I type in the Specify Calculation window is : not IsEmpty(indoRelShip::Games1) where indoRelShip is my SelfJoin and Games1 the first field I am searching through 2/ [Games1 , indoRelShip::Games1] I can't get the program to accept the line above in the Specify Calculation window. I want to write: Set Field [ Games1 , indoRelShip::Games1] and it keeps rejecting this with claims of too many operators?? Is the scripting case-sensitive? Wish I had more flexibility in the script window. ie wish I could write the code myself not rely on a function menu to clickon. Very frustrating. I am a programmer by the way. Thanks again for any help, Patrick quote: Originally posted by Chuck: Set up a self join relationship based on the field that you want the merge to be based on. In this case it would be the name field. Place a portal of that relationship on a layout, and script a loop through the portal, setting fields from related records to fields in your current record. If you allow the deletion of records in the portal, then once you've gotten the information you can delete the related records (since you have the data in the current record) and move on the the next record in a loop. Just to make sure that it's all working right, since the final script would delete records, I would make sure to have a backup of the database. The script would look like this: Go to Record/Request/Page [ First ] Loop Go to Portal Row [ SelfJoin ] Loop If [ not IsEmpty ( SelfJoin::Sports ) ] Set Field [ Sports, SelfJoin::Sports ] End If If [ not IsEmpty ( SelfJoin::Music ) ] Set Field [ Music, SelfJoin::Music ] End If If [ not isEmpty ( SelfJoin::Arts ) ] Set Field [ Arts, SelfJoin::Arts ] End If Go to Portal Row [ Next, Exit after last ] End Loop Go to Record/Request/Page [ Next, Exit after last ] End Loop This assumes that only one of the records will have information you want to keep for each individual field.
  5. Thanks to whoever posted a reply to my call for help yesterday. I am having problems writing my script (especially the IF statements) with what was given to me in the script example, but I'll give it another bash today. If all fails, I may ask again for help. Thanks for the help anyhow, Patrick
  6. Hi all, Filemaker Pro 5.0 Is there a way to merge records within the same database? A (very) simplified example would be : Number : Name : Sports : Music : Arts : 1 : Henri : T5 : : : 2 : Henri : : : M6 : 3 : Henri : : P8 : : I am looking for something which would combine these 3 records into one without losing any data. ie. 1 : Henri : T5 : P8 : M6 : Thanks, patrick
×
×
  • Create New...

Important Information

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