Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Update Metafield Customer VAT with Metafield Company VAT

Update Metafield Customer VAT with Metafield Company VAT

Freed0me
Tourist
7 0 7

Hi, 

I am unable to figure out why my metafield is not being filled from the company value. For some reason the value is blank. 

The error I am getting is Got error updating metafield: "Value can't be blank." For value: "", Type: single_line_text_field

I am not good at this so please bear with me if this is basic stuff. Please see flow below

 

Freed0me_0-1722525014838.png

Freed0me_1-1722525034026.png

 

Replies 5 (5)

RPiii
Shopify Staff
89 16 33

I suspect you might need to reference the metafield namespace and key as well — so something like metafields_item.custom.vat_customer.value instead of metafields_item.value but hard to tell from screenshots. You should also be able to find the individual metafield key in the variable picker and drop in the correct reference. Do you have a link to the workflow?

Freed0me
Tourist
7 0 7

Yeah I assume I need to fill in the metafield references somehow but I can't seem to pass that info without getting errors no matter how I format. I've exported and uploaded to wetransfer below.
https://we.tl/t-T0TwlG0qzY

I am not able to find any specific metafields in the variable selector. It only allows to select "metafields" then "value".

RPiii
Shopify Staff
89 16 33

Maybe this video will help:https://descriptusercontent.com/published/1d9595e2-f0d0-4e23-b957-61dc541734d4/original.mp4

 

From the variable picker, you can select or add metafield definitions for orders, products, customers, etc. Does that help you find the path to the relevant metafield?

Freed0me
Tourist
7 0 7

I don't have permission to open

 

RPiii
Shopify Staff
89 16 33

Does this link work? https://descriptusercontent.com/published/1d9595e2-f0d0-4e23-b957-61dc541734d4/original.mp4

Also, liquid can be a bit complicated and problems aren't obvious. Using a Log output action can make it easier to debug the results of your expressions until you get the desired result.