Access Custom Field Variables of another Card in Butler
Asked by Vongsawat:

Is there a way to directly access custom field variables such as {{%this}} in Butler, but in conjunction with Find/Lookup? Some equivalent of {found{%this}}?? {{found%this}}???


Answers:
author: Mike
body: Not exactly---right now, Custom Fields variables like that {{%foo}} will only return the value of the current card Butler is looking at. For example, if you tell Butler to

`find a card named X, and post comment {{%text}}`  
it will post the value of the Test custom field on the found card, not the original, which it sounds like is what you want to do.  
The only way to apply the value of a custom field on another card is to use {customfieldvalue}, but that specifically requires a trigger like `when a custom field is xxx`  
For example:  
`when custom field x is set, find card y and set custom field x to {customfieldvalue}`  
Do feel free to reach out at <https://trello.com/contact> and we'll be glad to take a closer look at what you're doing!

comments: author: WG Trello Admin
body: That worked Brilliantly for me. thank you!

copy one custom field value into the same custom field on another board.  
"when custom field "xxxx" is set, for each card linked in the attachments, set custom field "xxxx" to "{customfieldvalue}""


author: Robin Moore
body: Trello custom fields are just asinine, even more so in Butler. I want to lookup a card on the Contacts board to auto-fill contact info on new cards on my Orders board, and I managed to do it with a bunch of rules but it's slow and clunky. The ability to pass custom fields between cards is badly needed.


author: Diego Juzgado
body: I have discovered a method to accomplish your desired task, although it may involve some complexity. The key idea is to add items to a checklist using the values from the custom fields you intend to use after performing the "find-lookup" operation. Subsequently, you can employ the itemlistname to populate other custom fields in different cards or boards. Following this, you can delete the previously created checklist.

Take a look at this automation card button:

add an empty checklist named "VMem" to the card, add item "{{%NHistoria}}" to checklist "VMem", create a new card with title "{cardname}" in list "Activos" on board "Pacientes", link the cards together, find the first card linked in the attachments, for each checklist item in a checklist named "VMem", find the first card linked in the attachments, set custom field "NHistoria" to "{checklistitemname}", find the first card linked in the attachments, remove all the items from checklist "VMem", add item "{{%Telefonos}}" to checklist "VMem", find the first card linked in the attachments, set custom field "Telefonos" to "{checklistitemname}", find the first card linked in the attachments, remove the "VMem" checklist from the card, and unlink the cards

You can repeat this process as many times as necessary for other custom fields.

While it may not be straightforward to grasp, it functions flawlessly for me. Perhaps someone else could streamline it even further.


author: michaja_broertjes
body: Not sure if this is anything like you're looking for, but I found a way to create a sum total off a custom field set in multiple cards in a certain list.

The use case is for invoicing, so I have one list called 'Line items' and one (empty) list called 'Total'. When a card is added to 'Total', Butler will rename the card to 'Total', link all the cards in 'Line items' and then for each linked card set the custom field 'Subtotal' to the value of 'Subtotal'. This doesn't change the value but it will cause another rule to trigger, because it triggers whenever the custom field 'Subtotal' is set. That rule then finds the card 'Total' and updates a custom field 'Total' with the value of 'Total' + {customfieldvalue}. So this only works with the first card in the list 'Total'.

Here are the two rules:

```
when a card is added to list "Total" by anyone, rename the card to "Total", collect all cards in list "Line items" into linked items in checklist "Line items", for each card linked from an item in checklist "Line items", set custom field "Subtotal" to "{{%Subtotal}}"
```

```
when custom field "Subtotal" is set by anyone, find a card titled "Total" in list "Total", and set custom field "Total" to "{{%Total}} + {customfieldvalue}"
```

comments: author: michaja_broertjes
body: I just added this extra action to the first rule:

```
find a card titled "Total" in list "Total", and remove the "Line items" checklist from the card
```

This removes the checklist that was created earlier, but maybe you like it if it stays with the card, so it's optional.


author: Andy McAfee
body: [@michaja_broertjes](/t5/user/viewprofilepage/user-id/856432) Wow! Brilliant. Thanks for the idea.


Tags: butler

custom-field