Hello,
I am trying to understand some code which displays our orders in Interchange. This code uses the search-region tag to filter out orders.
[.search-region more=1 arg="
...
sf=deleted
se=1
op=ne
sf=status
se=pending_approval
op=eq
"
...]
I think I figured out that "sf" is the argument name, "se" is the value, and "op" is the operation which connects the two. So the code above reads as "deleted ne 1" and "status eq pending_approval".
What I am trying to do is display orders that have the status "pending_approval" as well as "pending_payment". My approach to this was to do a regular expression for status, such as...
sf=status
se=/pending_approval|pending_payment/
op==~
(status =~ /pending_approval|pending_payment/)
The =~ operator works fine if I just compare a phrase, such as "pending_payment", but does not return anything if I try to compare it to a regex.
My question is, is what I'm trying to do not possible? Can I not pass a regular expression as the value to an argument? Or am I not passing the regex in correctly?
I've tried quotes, single quotes, and a few other things when passing the regex.
As always, any help is much appreciated. Thank you for your time.
______________________
Mihai Dan
Air Delights, Inc.
https://www.airdelights.com
1 (800) 440-5556
_______________________________________________
interchange-users mailing list
interchange-users@interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users
I am trying to understand some code which displays our orders in Interchange. This code uses the search-region tag to filter out orders.
[.search-region more=1 arg="
...
sf=deleted
se=1
op=ne
sf=status
se=pending_approval
op=eq
"
...]
I think I figured out that "sf" is the argument name, "se" is the value, and "op" is the operation which connects the two. So the code above reads as "deleted ne 1" and "status eq pending_approval".
What I am trying to do is display orders that have the status "pending_approval" as well as "pending_payment". My approach to this was to do a regular expression for status, such as...
sf=status
se=/pending_approval|pending_payment/
op==~
(status =~ /pending_approval|pending_payment/)
The =~ operator works fine if I just compare a phrase, such as "pending_payment", but does not return anything if I try to compare it to a regex.
My question is, is what I'm trying to do not possible? Can I not pass a regular expression as the value to an argument? Or am I not passing the regex in correctly?
I've tried quotes, single quotes, and a few other things when passing the regex.
As always, any help is much appreciated. Thank you for your time.
______________________
Mihai Dan
Air Delights, Inc.
https://www.airdelights.com
1 (800) 440-5556
_______________________________________________
interchange-users mailing list
interchange-users@interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users