Issue:
We are attempting to solve for the Note Attribute Fields. Because these fields are not required in Shopify, the Note Attribute number may differ for each order. We are trying to solve for that with the following (see example for poFile:
{{#contains $.[note_attributes[0\]].name "poFile"}} $.[note_attributes[0\]].value
{{else}}{{#contains $.[note_attributes[1\]].name "poFile"}} $.[note_attributes[1\]].value
{{else}}{{#contains $.[note_attributes[2\]].name "poFile"}} $.[note_attributes[2\]].value
{{else}}{{#contains $.[note_attributes[3\]].name "poFile"}} $.[note_attributes[3\]].value
{{else}}{{#contains $.[note_attributes[4\]].name "poFile"}} $.[note_attributes[4\]].value
{{else}}{{#contains $.[note_attributes[5\]].name "poFile"}} $.[note_attributes[5\]].value
{{else}}{{#contains $.[note_attributes[6\]].name "poFile"}} $.[note_attributes[6\]].value
{{else}}{{#contains $.[note_attributes[7\]].name "poFile"}} $.[note_attributes[7\]].value
{{else}}{{#contains $.[note_attributes[8\]].name "poFile"}} $.[note_attributes[8\]].value
{{else}}{{#contains $.[note_attributes[9\]].name "poFile"}} $.[note_attributes[9\]].value
{{else}}{{#contains $.[note_attributes[10\]].name "poFile"}} $.[note_attributes[10\]].value
{{else}}{{#contains $.[note_attributes[11\]].name "poFile"}} $.[note_attributes[11\]].value
{{else}} undefined {{/contains}} {{/contains}}{{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} "
The error we are getting speaks to a NetSuite field; screenshot is below.
Source | Code | Message |
netsuite | exceeded_max_field_length | "Failed to add Shopify Order 4-21396. the field custbody19 contained more than the maximum number (300) of characters allowed." |
Resolution:
This is the formula that should be used:
{{#each $.note_attributes}}{{#compare this.name "===" "poFile"}}{{this.value}}{{/compare}}{{/each}}
Comments
0 comments
Please sign in to leave a comment.