You'll need to describe what you are doing in more detail. A portal indicates that you have at least two tables with a relationship. You'll need to describe that relationship and then also describe in what form you want to email those records as you might email them as
1) an attached pdf report
2) text included in the email body that lists the data in the portal
3) as a snapshot link (Requires that the recipient have access to your database)
I have table Order and Lists, and I put my portal in table Order. Those two tables are linked with field FC. FC=FC is the relationship. And creation in table List can change table Order.
In portal of table Order, I enter data and data will demonstrate on table List. Now I want to read all rows in Order portal, and email with text. I know how to email with text, but I have problem writing script to read all rows of records in portal. Model is the field in table List that I want to read and mail.
This script only read first line of portal record:
Go to Portal Row[ Select; first]
Go to Portal Row[select; Next; exit after last]
Go to field[Order::Model]
If you want to see this in the body of your email:
where each row is a single field in your portal, you can use the list function as part of the calculation for the body of your email:
List ( List::Model )
No need for a script and I don't see any reason to create new records just to get a list to send out as part of your email. (New record in your script is creating new Order record each time and this keeps it from getting past the first portal row as this takes you to a new record with what is most likely an empty portal. Then go to portal row exits the loop.)
Thank you so much Phil! That's exactly what I want to do.
I have another question: There are quantity data regarding to each model, how can I send email like this:
Model a Quantity 1
Model b Quantity 2
Model C Quantity 3
Or there's other ways I can do?
In the list table, define a calculation field that combines the data the way you want to see one row of data in your email. Use the list function to list this calculation field.
Thank you so much Phil! It works perfectly!
I got another question: I want to add contacts and record the date I enter those contact. It will look like this:
Contact 1 Contact 2 Contact 3
Date 1 Date 2 Date 3
How can the date update automatically when I enter contact, and date1 will not change when I enter later contact?
I'd use a related table of records for this. One record for each contact and date pair. The date field can then be set to auto-enter the date created or date modified.
what if they are on the same table?
It makes it harder to work with them where it is very easy to do if they are in a related table.
If they are in the parent table, you'd need to use a less flexible method for storing multiple dates and contacts.
You might use a series of individual fields, a pair of repeating fields or text fields with values separated by returns.
Non of which are as simple or as flexible as using a portal to a related table where each record has a contact field and a date field.
Oh, I see. I will try with related table.
Back to my earlier question, what if I want to save model and quantity date from Order table to another related table in certain fields?
Thank you so much for your patience and excellent advice!
what if I want to save model and quantity date from Order table to another related table in certain fields?
Can you post an example of what you want to do and why? (Knowing why sometimes helps me to avoid suggesting something that meets the immediate request but fails to reach the ultimate goal of what you are trying to do.)
I want to maker order from Order table with portal, and want to save those records so that I will have a backup for order history and detail information.
In table Order, I use portal to enter data and run calculation through related table List. Then I want to save information in portal to related table Records to build an archieve for order history.
Don't you keep that data in your order table and related tables? Why do you need a separate "history" table?
I think you need to layout what tables you have dn the function of each. A typical invoicsing system is built around these relationships:
Does this match what you have?