Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Portal rows to email?


subtracticus
 Share

Recommended Posts

Hi folks,

Novice Filemaker user, new to the forums, so thanks in advance for any help...

 

I have a fairly simple Invoice table with a portal to a Line Item table (which is in turn related to a Products table). What I want to do is generate an email from the Invoice table that lists each line item in the portal. So far I've been able to create a button with a calculation for the email body that will give me the first item in the portal, but I can't figure out how to get the rest of the portal rows in there.

Link to comment
Share on other sites

Why not just create a pdf from record and email that .

 

PDF will be an image of the current Invoice(s)

 

The way it is setup using portals this would be the easiest way.

I would have set up the Invoice table to lookup info in the Products

table. This way you have permenate record of the invoice.

What happens to the invoice IF the Products Table becomes corrupted?

Link to comment
Share on other sites

Why not just create a pdf from record and email that .

 

PDF will be an image of the current Invoice(s)

 

The way it is setup using portals this would be the easiest way.

I would have set up the Invoice table to lookup info in the Products

table. This way you have permenate record of the invoice.

What happens to the invoice IF the Products Table becomes corrupted?

 

Thanks for the suggestion. However, I'm using this to generate product orders from a vendor and I think it would work better for the person receiving the orders if they were just text rather than PDFs, if possible.

 

Also, the line items table is looking up info from the products table. That will create a permanent record, correct? Unless you're suggesting that I could somehow do away with the line items table altogether and lookup directly from the invoice. If that's the case, I don't know how that would work...

Link to comment
Share on other sites

Maybe this will work:

 

1. Add a Calc Field to your line Items Table that returns the line of text you would like in your email for each line item record. LineItemForEmail.

 

2. Create a list layout based on the line items table that just has the LineItemForEmail field on it. LINE ITEMS LIST LAYOUT

 

From your invoice layout that has the portal of line items, run a script that:

 

2. Goes to related record using a LINE ITEMS LIST LAYOUT, shows only related records.

 

3. creates a Variable $EmailLineItemsText

 

4. Loops thru each related record appending the data and RETURNS as you need

 

5. Exits loop after the last record

 

6. Generates the email and include the $EmailLineItemsText variable where you want in the body of the email.

 

7. goes back to the original layout

Link to comment
Share on other sites

Maybe this will work:

 

1. Add a Calc Field to your line Items Table that returns the line of text you would like in your email for each line item record. LineItemForEmail.

 

2. Create a list layout based on the line items table that just has the LineItemForEmail field on it. LINE ITEMS LIST LAYOUT

 

From your invoice layout that has the portal of line items, run a script that:

 

2. Goes to related record using a LINE ITEMS LIST LAYOUT, shows only related records.

 

3. creates a Variable $EmailLineItemsText

 

4. Loops thru each related record appending the data and RETURNS as you need

 

5. Exits loop after the last record

 

6. Generates the email and include the $EmailLineItemsText variable where you want in the body of the email.

 

7. goes back to the original layout

 

Awesome... I think I follow you, although I haven't done any scripting in Filemaker before today. I got the PDF solution up and running but I'll see what I can do with this method on Monday. Thanks for the advice.

Link to comment
Share on other sites

i'm having some trouble figuring out how to script this portion:

 

3. creates a Variable $EmailLineItemsText

 

4. Loops thru each related record appending the data and RETURNS as you need

 

5. Exits loop after the last record

 

help?

Link to comment
Share on other sites

i'm having some trouble figuring out how to script this portion:

 

3. creates a Variable $EmailLineItemsText

 

4. Loops thru each related record appending the data and RETURNS as you need

 

5. Exits loop after the last record

 

help?

 

Everyone is new once.

 

Go to Portal Row [First]

Loop

Set Variable [$EmailLineItemsText, $EmailLineItemsText& Left("¶", Length($EmaiLLineItemsText)) & PortalTable::Field A & " "&PortalTable::Field B]

Go to Portal Row [Next, Exit After Last]

End Loop

 

 

or, if you prefer --

 

Go to Related Records [PortalTable, Show, using Layout ]

Loop

Set Variable [$EmailLineItemsText, $EmailLineItemsText&Left("¶", Length($EmailLineItemsText)) & PortalTable::Field A & " " & PortalTable::Field B]

Go to Record [Next, Exit After Last]

End Loop

Go to Layout [original layout]

Link to comment
Share on other sites

Everyone is new once.

 

Go to Portal Row [First]

Loop

Set Variable [$EmailLineItemsText, $EmailLineItemsText& Left("¶", Length($EmaiLLineItemsText)) & PortalTable::Field A & " "&PortalTable::Field B]

Go to Portal Row [Next, Exit After Last]

End Loop

 

 

or, if you prefer --

 

Go to Related Records [PortalTable, Show, using Layout ]

Loop

Set Variable [$EmailLineItemsText, $EmailLineItemsText&Left("¶", Length($EmailLineItemsText)) & PortalTable::Field A & " " & PortalTable::Field B]

Go to Record [Next, Exit After Last]

End Loop

Go to Layout [original layout]

 

Thanks. I finally figured it out on my own just before you posted but it's interesting to see the different ways of accomplishing the same thing.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use