Jump to content

Collating Related records and combining data in a seperate field


MutantST
 Share

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

Recommended Posts

Hi All,

Hitting a wall at the moment with performing a find and with those found records, selecting some of the information and then for want of a better word "pasting" that info into another field.

My example is:

Photo shoot booking has been made. It has numerous related records of the subjects of who will be involved plus their contact details. I am trying to gather the subject name and contact info from this related table and have it available to paste into a secondary program like, word, ical or textedit.

Are there any methods that you can suggest that may work?

 

FM-Relationship-Table.jpg

Edited by MutantST
crap spelling
Link to comment
Share on other sites

Copying data from related records is one thing. "Collating" it into a field is another. You could place a COPY button under a portal to Subjects, and have the script go to the related records, using a layout that shows only the fields you are interested in, and do Copy All Records/Requests[].

--
P.S. The part of the graph that you show is hardly readable, but it doesn't look right. Presumably, a subject can participate in many bookings - so it cannot have a BookingID foreign key. Instead, you should have a join table between Bookings and Subjects.

Link to comment
Share on other sites

Thanks for your comment. Unfortunate that the graph looks too small for you, although it looks fine on my screen. Luckily you saw enough information and have been able to comment. 

Thank you again, as the copy all records/requests works well and I am getting the required info from the tables. I am finding the formatting of the info problematic though as it brings back and pastes all the information in a Tab delimited format. Is there any chance you know how I can retrieve this info without the tabs/spaces included?

Records returned as below . . 

Chelsea Devlin    21    021021021        [email protected]    

Simon E    42    021145554        [email protected]    Admin support

 

Link to comment
Share on other sites

16 minutes ago, MutantST said:

I would prefer a comma

And if one of the fields contains a comma?

Anyway, this is not going to be as simple, because Filemaker does not provide direct access to the clipboard. To do this natively, you would have to Copy All Records, then paste the result into a global text field, set that field to Substitute ( gTextfield ; Char ( 9 ) ; "," ) and copy the result.

Alternatively, you could use a plugin that allows manipulating the clipboard directly, or - if you work on OS X exclusively - do the same thing using AppleScript.

Link to comment
Share on other sites

This is what I am using at the moment and to no avail.

Set Variable [ $Bookingid; Value:BookingTable::BookingID ]
Go to Layout [ “Subjects” (Subjects) ]
Perform Find [ Specified Find Requests: Find Records; Criteria: BookingTable::BookingID: “$Bookingid” ]
[ Restore ]
Copy All Records/Requests
Unsort Records
Go to Layout [ original layout ]
Paste [ BookingTable::SubjectnamesGlobal ] [ Select ]
Set Field [ BookingTable::SubjectnamesGlobal; Substitute ( BookingTable::SubjectnamesGlobal ; Char ( 9 ) ; "," ) ] Copy [ BookingTable::SubjectnamesGlobal ]
[ Select ]
Paste [ BookingTable::Subjectnames ] [ No style ]

Link to comment
Share on other sites

Hi All,

Thanks for your help on this. I was running into problems with this script as I did not have the Subjectnameglobal on my layout. Now it is there, I am getting the results I require. By the way, does Char ( 9 ) mean? is that the number for a space character?

 

Link to comment
Share on other sites

This topic is 2264 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
 Share

×
×
  • Create New...

Important Information

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