🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Operator with conditional value

User: "vhromero"
New Altair Community Member
Updated by Jocelyn

Hi,

I have an attribute named order_status with 4 possible values: cancelled, pending, processing and processed
and I would like to generate a new attribute named 'label'
with this condition:

if (order_status = 'cancelled' or 'pending')
  value = 'purchased'
THEN
  value = 'not purchased'

Any advice will be appreciate

I am not sure what operator to use and how to implement this condition

Thank you

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "Andrew2"
    New Altair Community Member
    Hello

    Use the 'generate attributes' operator with a suitable if then else. You're very close with your example.

    Regards,

    Andrew
    User: "vhromero"
    New Altair Community Member
    OP
    Hi Andrew,

    Thanks!

    Done with the Operator Generate Attribute: 
    if(matches(order_status, "processing") || matches(order_status, "processed"), "COMPRADO", "NO COMPRADO")

    Now, how can hide/delete the order_status  attribute?

    Thank you
    User: "swissruss"
    New Altair Community Member
    Hi,

    'Select Attributess' with the single attribute setting, 'order_status' and 'invert selection' ticked should get rid of it.

    Regards,

    Russ