• Resolved 3rio

    (@3rio)


    Hi
    I’m trying to implement a rule similar to https://adtribes.io/create-a-if-field-y-is-empty-than-do-x-rule/

    I have a custom attribute A which can have value “B” or “C”. Depending ob this value I’d like to use the the value of custom attribute B1 or C1:

    So I configured:
    Rule1: A (Custom attribute) is equal to B, Then B1 (Custom attribute)
    Rule2: A (Custom attribute) is equal to C, Then C1 (Custom attribute)

    However, the result is always “B” or “C”. Expected would be either the content of B1 or C1.

    Any idea what’s wrong?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    Thanks for using our plugin and reaching out to us. Could you share a screenshot of the rules you created?

    Thread Starter 3rio

    (@3rio)

    Thanks for the quick response, here it is: https://snipboard.io/oAc9G2.jpg
    In this version I wanted to default to Quality select r in case there is no match – however it also doesn’t work. So it seems the condition is not working at all.

    Hi,

    Thanks for the screenshot. The blog post and the rule in it is only intended for attributes that have ’empty’ values and need to be replaced with the value of another attribute.

    Unfortunately the rule you created won’t work and is not supported by the plugin.
    The only thing that would work is when you put a value in the is-column. For example when a product name contains the word ‘men’ make the value of another attribute ‘male’: https://www.dropbox.com/s/jtdef1kaq0xsn2n/rule-example-1234.png?dl=0

    Hope this helps?

    Thread Starter 3rio

    (@3rio)

    ok, so it would theoretically be possible to have a workaround like this: https://snipboard.io/VAhPd6.jpg
    – First replace the first value by “empty”
    – Then test if empty. If yes, then use value from the other attribute
    – Second, replace the second value with “empty”
    – Test again for empty. If yes, then use the value from yet another attribute

    However, does not work either..

    No unfortunately that won’t work. Rules are not executed in a specific order.

    Thread Starter 3rio

    (@3rio)

    Well, anyway, thanks for your support.
    In this case it would be a feature request 🙂

    As an idea: We’ve built something like this for importing data into Woocommerce where we needed to validate/map/create content based on the raw input we get. It doesn’t have a nice GUI, but instead just a PHP file where you can add all the rules and filters you like from any source to any destination field (it operates directly on a DB table). Filters are just rules which execute a “kill” command which deletes/omits the product.
    For each rule we have:
    – destination field (which field is to be modified)
    – filter (under what condition to apply the rule)
    – rule (rule to apply; any php functionality)

    Rebuilding and adding features to the rules and filter section has been on our developers to-do list for some time now so we’ll add this feature request to it 🙂

    Hi,

    Assuming the issue at hand has been resolved and our support is no longer required I am going to close this topic for now for housekeeping reasons.

    Do not hesitate to reach out to us again whenever you need our help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Rule to populate field from other field not working’ is closed to new replies.