All emails / telephonecalls / whatsapp messages in a survey

Bly clicking on the top message it searched for all messages of that contact/company and I can scroll them detailed.
No more searching for me now.

2 Likes

This is great! Thanks for sharing!

@dmitry-grist Is it possible or in theplanning that I can link a field inside this table to another Grist table. For instance, I have an accounts card with company name. I would like a link that opens the company entry in Grist.

Hi there!

I’m not 100% sure on exactly what you want so I’ve tried to cover all bases with the information below.

If you’re looking to have a card on the page you took a screenshot of, you can add a Card Widget. It looks like you might already have that set up though. I have added instructions below just in case. If you’re looking to have a hyperlink that would open the Accounts page to the correct company, you can do that using an anchor link. I have added instructions on how to do this below but there are two options. You can add the hyperlink column to the Berichten table or to the Accounts card. Instructions for both below - if adding to the Accounts card, be sure to read the instructions in italics.

Accounts Card
To add a card that shows Company information for the selected record, select the green Add New button > Add Widget to Page. Select Card Widget and Select Data from Accounts. Then, Select By Berichten - Contact. Add to Page.

When you select a contact in the Berichten table, it will show the record from the account table. In the screenshot below, I have selected Wonka Industries in the Berichten table. The contact record from the Accounts table appears in the Accounts card.

If you want to include a link on this card that opens the Accounts page to this specific record, follow the steps below but instead of adding the link on the Berichten table, just edit the formula within the Accounts page. Then, add the field to your Accounts Card. See notes below in italics.

Anchor link
This will be a link in one doc that when you click it will open the other table but will have the correct company selected. I created a mini version of your Berichten table with Name, Contact and Company Name as well as an Accounts table with Contact and Company Name. As you can see in the screenshot below, the Contact column in the Berichten table is a reference column to the Contact column in the Accounts table.

I have a fourth column, “Link to Account”. Create this column in your Berichten table. This is where we will be generating that hyperlink. if you want to add this to the Accounts card, you won’t need this column.

To start, set the formula = SELF_HYPERLINK(). You’ll see in the screenshot below, it just generates a hyperlink to the document, but not to anywhere specific in the document - that’s our next step.

Navigate back to the Accounts page and add a new column in the Accounts table. I’ve named mine Anchor Link. We will be deleting this column in the end, it’s just for reference. When you hover over the row number on the left hand side of your table, a little arrow appears for each row. Select the arrow for Row 1 and select “Copy anchor link”. Paste into the Anchor Link column for Row 1.

If adding the hyperlink to the Accounts card, do not delete this column - this is what you will be using.

I’ve done this for several rows to show a pattern - You’ll notice that everything in the link remains the same except the number that comes after r. This is our row ID. Every row has $id as a unique identifier. You can see this in my Row ID column. If you ever want to see the row IDs in a table, create a new formula column with the formula = $id

Remember that SELF_HYPERLINK() generates our document link and we need to add to that link to match the anchor links we see above. We will use a little bit of python to accomplish this in the next step. For now, copy everything in the link for row 1 that comes after the document name. For me, it’s /p/2#a1.s2.r1.c8

If you are adding this to the Account Card, copy this then create the formula in the Anchor Link column of the Accounts table (the current column) using the steps below.

image

Navigate back to the Berichten page, where we have our column “Link to Account” which is currently just = SELF_HYPERLINK(). Our final formula is going to look similar to this;

FORMULA = SELF_HYPERLINK()+"/p/2#a1.s2.r{}.c8".format($Contact.id)

We need to edit the Link to Account formula - After SELF_HYPERLINK(), add a plus sign then a set of quotes (""). Paste what you copied (from the Accounts table) in between the quotes. You should have something in the same format as the formula below;

FORMULA = SELF_HYPERLINK()+"/p/2#a1.s2.r1.c8"

Now, we want to update this so it will be applicable for all rows (not just row 1). Replace the 1 after r with squiggly brackets {};

SELF_HYPERLINK()+"/p/2#a1.s2.r{}.c8"

Then, we will add the following onto the end of the existing formula;

.format($COLUMN_NAME.id)

Where $COLUMN_NAME is the name of your reference column. In my example, the $Contact column is the reference column and this column is referencing data from the Accounts Contact column of the Accounts table.

If adding the Accounts card, the formula will be SELF_HYPERLINK()+"/p/2#a1.s2.r{}.c6".format($id)
Since there is no reference column, we are just using the row id

In my screenshot below, you’ll see that the {} was filled in with the correct row ID for the Company. I have InGen highlighted. The Link to Account hyperlink shows r4 and in my Accounts table, you can see that the Row ID is 4.

Now you have a hyperlink to the Company on the other page. When you click it, it will take you to that page and to the correct row for the Company.

If you created this formula column on the Accounts table to be added to the Account card, navigate back to the Berichten page then select the Accounts card. In the panel on the right hand side, select Card then make the Anchor Link field visible by hovering over the field then clicking the eye icon.

image

Now you have a link that will take you from this page to the Accounts page with the correct record selected

image

If you have any questions on this, please let me know! Happy to clarify anything. Hope this helps!

2 Likes

WOW amazing, thank you very much for the detailed instructions. Just what I wanted.

2 Likes

Or I need a 80 inch screen so I can get all in just 1 screen:)

1 Like