Anh_Tran Posted September 21, 2002 Posted September 21, 2002 I have a few record found ...and how can I create a field that contains all data from record one to the last record? Thanks
CobaltSky Posted September 21, 2002 Posted September 21, 2002 Perhaps the simplest way to do this is to make sure that you are on a list layout and that the cursor is not in a field, then hold down the Shift key (Windows) or Option key (Mac OS) and choose Copy from the Edit menu. That will copy the contents of all records (including all fields except containers which are on the current layout) to the clipboard, and you can paste them anywhere you like. Field values will be separated by tabs and record data will be separated by carriage returns. If you want to automate the process, the Copy All Records' script step does the same thing, and a subsequent 'Paste script step will complete the procedure for you. If you want to achieve the same thing without disturbing the contents of the clipboard (or having to store them somewhere and recover them afterwards), another alternative would be to use a global text field and a Loop/Set Field/EndLoop scripted sequence to compile field contents from each record into the global field. Hope the above suggestions give you something to work with.
LiveOak Posted September 21, 2002 Posted September 21, 2002 It depends upon what you mean by "all data" and what you want to do with the data. Do you mean all data in a single field or all data in all fields? What do you want to do with this data? If you want to print it, just create a print layout. If you want to view the data, a layout can be created. If you want to export the data, the export function will allow you to select all the fields. You can also create a text field which concatenates the contents of all fields. The copy all function can be used to put all the record data on the clipboard. -bd
Anh_Tran Posted September 21, 2002 Author Posted September 21, 2002 Ok Let me clear by this Dear all, Sorry my english ...hope you all understand. I have a database named A with fields (3 fields) Projectno, Invoiceno ,comment 1, 123, A 2, 222, B 1, 129 ,C When I use a find by Projectno with Projectno =1, how can I get like below Projectno Invoiceno comment 1, 123 ,AC 1 ,129, AC What i mean is if same project I will get all the comments related to that projectno together. Do I use a calculated field or use script to to that? I really have no idea how to start. I don't see "Copy All" script and I really don't understand by that method. What I really want is concatenate all the single record from record number one to the last record and put into a field like the example above If you have an example like that , Can I have a look of it Thanks all
LiveOak Posted September 21, 2002 Posted September 21, 2002 If you just want to display the results of your search, create a Columnar list/report or Table View layout and place the three fields on the layout. I'm still not sure if this is what you are asking. -bd
Anh_Tran Posted September 21, 2002 Author Posted September 21, 2002 Dear LiveOak, I know you don't understand what i am asking. Ok let me clear more. I a a field named Employee ( text) record number 1 : John record number 2: Bill record number 3: Paul How can I get "JohnBillPaul " together ...Do I have to create another field to get this or some script which can do that. That is what I mean . I really need your help Thanks
Fitch Posted September 21, 2002 Posted September 21, 2002 A script would be something like this: Go To Related Records (Projectno, show only related) Set field (globalComment, "") Loop . Set field (globalComment, globalComment & comment) . Go to record (next, exit after last) End Loop Replace (no dialog, comment, globalComment)
Anh_Tran Posted September 22, 2002 Author Posted September 22, 2002 Dear Tom Your logic is quite right and give me an idea. Do I have to create a relationship in same database on Projectno field or with another database? Thanks Tom
Fitch Posted November 18, 2002 Posted November 18, 2002 I was just going through my old replies and saw the follow-up didn't get answered -- sorry about that. The script will work with a self-join or a related file, but if it's using a related file, only the Go To Related Records step would be in the original file. Then you'd use the Perform Script (external) step and the rest of the script would be in the related file.
Recommended Posts
This topic is 8111 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 accountSign in
Already have an account? Sign in here.
Sign In Now