[ic] search-region.coretag
mihai at airdelights.com
mihai at airdelights.com
Thu Dec 10 14:01:37 UTC 2020
Thank you very much Peter. I will look into this.
______________________
Mihai Dan
Air Delights, Inc.
https://www.airdelights.com
1 (800) 440-5556
-----Original Message-----
From: "Peter" <peter at pajamian.dhs.org>
Sent: Wednesday, December 9, 2020 4:59pm
To: interchange-users at interchangecommerce.org
Subject: Re: [ic] search-region.coretag
On 9/12/20 11:11 am, mihai at airdelights.com wrote:
> 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
> "
> ...]
See: http://interchange.rtfm.info/icdocs/tags/search-region.html and
http://interchange.rtfm.info/icdocs/Search_parameters.html.
> 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".
Close, see the second link above for documentation on these args.
> 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.
Remove the leading and trailing "/". Also see
http://interchange.rtfm.info/icdocs/Interchange_search_engine.html#Coordinated_and_joined_searches
for more info.
Peter
_______________________________________________
interchange-users mailing list
interchange-users at interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users
More information about the interchange-users
mailing list