Linking Multiple Items

Hello Everyone,

I could use some help. Ideally I would like to create a form that can easily be emailed.

I have Client orders in one table, each order is linked to a customer and the products they will be shipped. On the Product table there is a Retail price and product description.

I am trying to get the specific products for a customers order, price and descriptions in a long text form that can be easily copied.

Thanks in advance,

BH

Bump + 15characters.

Hi @Ben.H

Do you have a Line Item table? Because I cannot see it in the screenshot.

In the Line Item table (which should have the Order, Item, Qty, Price, and Description) you can make a Formula that concatenates the item with the required fields. You can then create a Rollup Field in the Order table that uses Arrayjoin is \n as a line breaker to get a full description of the order.

Let me know if you need more help. If this helps you, please mark it as a solution so others can see it easily.

BR,
Mo

@Ben.H Checking to see if the comment from @Mohamed_Swellam gave you the info that you need. Do you still need help with this?

Hi Justin and Moe,

Here is where I am at with this problem:

I would like to have this in a field

then from the same line insert the respective product title, retail value and product description.

is there a simple text formatting to pull the data into the field?

if I do =products with no html formatting it works fine, but with formatting and multiple fields…

Ben

What you want is doable. First, you don’t need “=” at the front of the formula. Just launch straight into the formula itself. In a spreadsheet, the leading “=” tells the system that what’s coming up is a formula, not a literal value. With Airtable, formula fields only contain formulas, so this distinction isn’t necessary.

To insert field values, you’ll need to wrap the literal text of your HTML in quotes, and add the field values at the appropriate places using the & concatenation operator (in Airtable formulas, + is only for math operations; & is for concatenating strings). Airtable supports both single and double quotes around string literals. Because the HTML contains double quotes, you can wrap it in single quotes and it’ll work.

Here’s very roughly how it would look (I’m not retyping that whole thing :slight_smile: ):

'<p style="text-align: center;"> ...etc... font-size: 14px;">' & {Product Title} & '</span> ... etc ... rgb(127, 92, 92);">' & {Retail Value $} & '</span> ...etc... rgb(127, 92, 92);">' & {Product Description} & '</span> ...etc... </p>'

Broken down, here’s the general pattern to follow:

'Literal string' & {Field Name} & 'Another string' & {Field Name 2} ...

@Justin_Barrett very clever but I am getting an error

BH

You’re missing an & after {Products} before your next literal string section begins.

@Justin_Barrett semantics haha

ok great, that works now, but the formatting isn’t quite right.

its come out as product title, product title, description, description.
any ideas how to make it title, description, title, description?

BH

I think ill try it in the product field instead of order field brb

edit:

I put the html in the product table and that formatted perfectly.
On the order table I tried a rollup field with the values but I am getting a formula error.

Any ideas @Justin_Barrett

I’ve been away for a bit, but I would have suggested that as a next step, so I’m glad you found it.

What field are you aggregating with the rollup, what formula are you using, and what’s the error?

Its a roll up of the previously discussed formulas. There is no formula except the one that exists on the other table. There is no specific error code.

@Justin_Barrett

Sorry that I wasn’t clear. I was talking about the aggregation formula in the rollup field. That formula combines the individual field output from the records collected by the rollup.

You said above that you were getting a formula error with the rollup. That’s why I’m asking what your rollup aggregation formula is, and what error you’re getting.

I think I have solved it. I changed the field to lookup instead of roll up. Standby while I test this out.

BH

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.