Hi all,
At this moment, when I add an item to a checklist, it finds the {checklistitemname} on the board and links the card together.
The checklistitemname card has a customfield "Bio" checked or unchecked standard.
When the checklistitemname card is linked to the triggercard, I want it to copy the customfield value of "Bio".
Use-case:
I have a card "TRIGGER" and a card "ITEM".
ITEM has a custom field "Bio" checked.
TRIGGER has a custom field "Bio" unchecked (standard) and has a checklist. To this checklist, ITEM is added. TRIGGER and ITEM are now added to the Trello attachments and linked to each other.
Now, because ITEM has "Bio" checked, I also want TRIGGER to check the custom field "Bio".
Is this possible?
Thanks in advance!
I think you are the same person that posted it Reddit. I am going to build a specific end point that handles this use case.
lookup a card titled "ITEM" in list "Lookup", and post to url "https://jviwoq.deta.dev/update_checkbox?api_key=14a...............21d7&token=be9f...................a6cb4" with payload "{"card_id" : "{triggercardidlong}", "alt_card_id" : "{foundcardidlong}", "cf_name" : "CF_Checkbox"}"
The endpoing with redoc :
https://jviwoq.deta.dev/redoc#operation/update_checkbox_update_checkbox_post
The documentation on github :
Hi Milynnus,
Thanks for the effort!
This is the rule I'm using:
when an item starting with "{checklistitemname}" is added to a checklist, lookup a card titled "{checklistitemname}", and post to url "https://jviwoq.deta.dev/update_checkbox?api_key=14a...............21d7&token=be9f...................a6cb4" with payload "{\"card_id\" : \"{triggercardidlong}\", \"alt_card_id\" : \"{foundcardidlong}\", \"Bio\" : \"Bio_Checkbox\"}
The {checklistitemname} card has Custom field "Bio" checked.
When I add {checklistitemname} to card "TRIGGER" it doesn't check the "Bio" checkbox on card TRIGGER.
It gives the following error in my butler warning box:
There was an error requesting the URL https://jviwoq.deta.dev/update_checkbox?api_key=14a...............21d7&token=be9f...................a6cb4:
422 {"detail":[{"loc":["body","cf_name"],"msg":"field required","type":"value_error.missing"}]}
Any ideas?
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Couple of observations :
I have update my code to support the case where the alt_card (target) and the corresponding CF is not on the same board.
Thanks for trying.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @milynnus ,
1. I'm unsure what that means. I've definitely used the "POST to ..." option in the automation butler.
2. Woops, I've done that now.
3. I've changed the code, I hope it's okay now:
when an item starting with "{checklistitemname}" is added to a checklist, lookup a card titled "{checklistitemname}", and post to url "https://jviwoq.deta.dev/update_checkbox?api_key=a20xxxxxxxxxxxxxxxxxxxxxxx225fc&token=21fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2b" with payload "{\"card_id\" : \"{triggercardidlong}\", \"alt_card_id\" : \"{foundcardidlong}\", \"cf_name\" : \"Bio_Checkbox\"}"
Is this how it should be? It's currently still not ticking the checkbox, giving me this error:
"400 {"result":"The custom field(s) is not a checkbox or custom field not found"}
"
So I changed the code to:
when an item starting with "{checklistitemname}" is added to a checklist, lookup a card titled "{checklistitemname}", and post to url "https://jviwoq.deta.dev/update_checkbox?api_key=a20xxxxxxxxxxxxxxxxxxxxxxx225fc&token=21fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2b" with payload "{\"card_id\" : \"{triggercardidlong}\", \"alt_card_id\" : \"{foundcardidlong}\", \"cf_name\" : \"Bio\"}"
This gives the result:
"result":"OK"}
But it still doesn't tick the box.
Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Congrats 🎉 you have got further.
The first error is when you supplied a cf that is not of type = checkbox or there is no checkbox CF matching the name.
The end point takes the checkbox status from the first card and update the cf of the second (alt_card_id). Since I cannot see your board, I can be definitive.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @milynnus ,
Thanks haha! With your help ofcourse.
I'll try to explain it a little more in-depth, so I've made a test case:
I have two cards, as shown above: Trigger and Item.
"Item" is a one-time input, this is the product. It's either bio or not, so this is checked only once and that's permanent.
"Trigger" is the customer order, so each time a customer places an order, the employee creates a new card.
Then, the product (Item) gets linked to the customer order (Trigger), this is done by adding "Item" to a checklist in card "Trigger". It links the cards.
The moment "Item" is added to a checklist in card "Trigger", I want it to check if "Item" has custom field "Bio" checked, yes/no. And I want it to copy this value to "Trigger".
Any other suggestions? I think perhaps the triggercardidlong/foundcardidlong aren't correct, though I'm unsure because I truly have no experience in this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if I understand you correctly,
your card_id will be {foundcardidlong} and your alt_card_id is {triggercardidlong}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.