GETVALID FeedHelper Extension

Template Functions: GETVALID

StoreAutomator Template functions can be used to program your template output using functions  and the GETVALID function could be very useful and helpful in creating business rules or formulas.

The GETVALID function looks at multiple fields and outputs the first valid value found in the fields.

For Example,

Let's say we have 4 custom fields named test1, test2, test3, and test4. Let's give test 2 the value "T-Shirt" and test4 the value "Pants". We did not enter any values in our remaining fields as shared in the image below.

mceclip0.png

GETVALID({Product.CustomFields[test1]},{Product.CustomFields[test2]},{Product.CustomFields[test3]},{Product.CustomFields[test4]})

Let's write the function as above. The function will first look to see if there is a value in the test1 custom field, when it sees that there is no value, it will check whether there is a value in the test2 custom field, and because it finds a value here, it will output the value "T-Shirt" as shared below.

mceclip1.png

When we move the “test4” “Pants” formulae where the test1 field was and and move test 1 to the last place in the function, GETVALID will return the first value "Pants" as the output.

mceclip2.png

StoreAutomator allows you to combine and use this and many other functions, and easily manage your data.

Please refer to the article called Template Functions and Syntax to learn other functions.

Was this article helpful?

0 out of 0 found this helpful