Add custom field information from linked card to custom field in original card
Asked by Nicole Miara:

Hi,

I have 2 cards- one containing mentee information, the other containing mentor information.

Once the 2 persons are in the mentoring , i link them by attaching one to another as trello attachment.

I want to add custom fields from the attachment to the card it is attached to.

How can i do that?

I tried Buttler with the following command:

when a card is moved into list "Active Mentoring", lookup the first card linked in the attachments, and set custom field "E-Mail" to "{{%Mentee E-Mail}}"

This does not work- what did i do wrong?


Answers:
author: Michael Pryor
body: One good way to troubleshoot Butler is to try making the rule very simple and see what happens. Then if that works, add in the pieces until you figure out what isn't working.

So for example, you could start with

when a card is moved into list "Active Mentoring", add a Red label - just to check it's working.

Then try

when a card is moved into list "Active Mentoring", lookup the first card linked in the attachments, and change the title to the first card's title

etc.

comments: author: Nicole Miara
body: Thanks for your reply. I did like you said to check what is the false "thought".

wrt: when a card is moved into list "Active Mentoring", lookup the first card linked in the attachments, and change the title to the first card's title

That is exactly what is NOT working:

I want to add the linked cards custom fields to the triggercard. e.g. i want that the name of the mentor appears as custom field "mentor name" in the mentee card (triggercard).

Basically I want to "merge" some of the information. This "take some information and copy it to another card" didnt work.

I only managed a workaround by using triggercard:

when an attachment is added to a card, find the first card linked in the attachments, and set custom field "Mentee" to "{triggercardname}"... but basically I want to utilize a formula, that is applicable not only to the triggercard name but also to other custom fields, etc.

Please let me know if you need any further explanation![2020-11-24 20_25_25-Mentor_ Tobias auf ACTIVE MENTORING _ Trello.png](https://community.atlassian.com/t5/image/serverpage/image-id/119494iFEF45DE6340CF4ED/image-size/large?v=v2&px=999 "2020-11-24 20_25_25-Mentor_ Tobias auf ACTIVE MENTORING _ Trello.png")


author: Michael Pryor
body: When you look up a card, all the card variables reference that looked up card and all the {trigger... variables reference the original card.   

"When we **find** another card, that card becomes the current card, and all actions going forward occur on that card."

<https://help.trello.com/article/1193-butler-card-lookups>


author: Nicole Miara
body: Hi Michael, thanks for sharing the link.

Very specific: can I have a butler functionality to fill the triggercard with information from a linked card?

Nicole


author: Michael Pryor
body: I just got the details from the Butler experts:  
Use `lookup` instead of `find` . The former doesn't change the current card in the context.  

`when an attachment is added to a card, lookup the first card linked in the attachments, and rename the card to "{foundcardname}"`  
seems to do the trick


Tags: butler

custom-field

variable