Art Posted March 11, 2003 Posted March 11, 2003 OK, I've looked through all 25 pages of "portal" posts all the way back to year 2000 but haven't found the answer to my question. Basically it's this: I have a portal in one db that pulls from several fields in another db and I end up with 6 to 8 or so rows of data. It all looks very good on screen. However, I need to put that data into a "stable" field (like a text field) where each row of the portal would be on a seperate line of the text field. The information from this field will be taken via an applescript to a layout in an InDesign template (The template has to pull the data from a single field in order to make this thing work). The question is: can it be done? I don't want to access just one portal row and I don't want to access just one field from a portal row. I want the who shebang. Any help is gratefully received. Art
willi Posted March 11, 2003 Posted March 11, 2003 Hi, you need a script with a loop: go to the portal, go to first row, set field .., go to next row(exit after last). Willi
Art Posted March 11, 2003 Author Posted March 11, 2003 I've got to be missing something here. I tried writing the script. I selected the first row of the portal and then did a set field command. But nothing pasted. How do I copy the data in the first row. If I choose "copy" it asks for a field to copy, rather than the selected first row of the portal. I don't see any way to copy the selection. Boy . . . I guess I'm a little duh. . . here.
Pupiweb Posted March 12, 2003 Posted March 12, 2003 Three options: 1. IF related entries are short (< 255 characters) and unique you can create a relational value list and a calc, text, unstored ValueLIstItens(Yourfile,"VLName") will return the related items, one per line 2. Use the Troi Text plugin that has a function doing what you mention 3. Use a script, like Go to related records (ThePortalRelationship, Show) Perform script in the related file (see below) Set field (gText,"") //gText is a global text field Loop Set field (gText, gText & "PP" & Your text field) //PP symbolizes a return Go to record next, exit after last End Loop Set field (gText, Middle (gText,2,99999) //Clears the first return End the script in the original file with Set field (YourText field, ThePortalRelationship::gText)
BobWeaver Posted March 12, 2003 Posted March 12, 2003 There is also a fourth option: # Main Script -- In main file Go to Related Record [show only related] Perform script [external RelatedFile::CopyAll] Paste [TextField] # CopyAll Script -- In Related File # Go to a layout that contains the fields you want to copy Go to Layout [MyWorkingLayout] Copy All Records
Art Posted March 12, 2003 Author Posted March 12, 2003 I appreciate the ideas but I don't think they'll work for me. You see, while the values may be unique to one record, they aren't to all records. And I don't want to copy all records. Here's the layout - I have a file with names and addresses I have a second file with individual names of family members for those main addresses in file 1 In file 1 I have a portal that displays the member names of each family drawn from file 2. Alongside each first name I also pulled their birthday from file 2 and one other piece of information. So, I want to be able to collect the first names of each basic family unit, along with their birthday, and put that into a static text field for use in my InDesign template. Does this make sense? I hope so
BobWeaver Posted March 13, 2003 Posted March 13, 2003 Yes. What you will have to do is one of the options described above. But you will have to do it for every record in your main file. So you will need a loop: Go to Record/Request [first] Loop # Perform one of the options previously described # above on the current record Go to Record/Request [Next, exit after last] End Loop
Art Posted March 17, 2003 Author Posted March 17, 2003 OK, I think I'm getting close. Below is the script that I'm using and it's copying only the last related record into the final field instead of having the final field showing all the related records in a line. What am I doing wrong? Any ideas? Thanks again for your help. By the way, the "Holding Temporary" field is a global field
Recommended Posts
This topic is 8259 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