use collection by condition #6879
Unanswered
HoannvRelipa
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
"collection": {
"$switch": {
"branches": [
{
"case": {
"$in": [
"{{ category }}",
[
"Consumption item",
"Jan-navi"
]
]
},
"then": "consumptionsellorders"
},
{
"case": {
"$eq": [
"{{ category }}",
"Blocks"
]
},
"then": "blocksellorders"
},
{
"case": {
"$eq": [
"{{ category }}",
"UGC Equipment"
]
},
"then": "ugcequipmentsellorders"
},
{
"case": {
"$eq": [
"{{ category }}",
"LAND"
]
},
"then": "landsellorders"
},
{
"case": {
"$eq": [
"{{ category }}",
"LAND Object"
]
},
"then": "landobjectsellorders"
},
{
"case": {
"$eq": [
"{{ category }}",
"Tickets"
]
},
"then": "ticketsellorders"
},
{
"case": {
"$in": [
"{{ category }}",
[
"Equipment",
"UGC Clay",
"Special item",
"Egg"
]
]
},
"then": "equipmentsellorders"
}
],
"default": "consumptionsellorders"
}
}
When I use the above syntax, I get the error "name must be an instance of str", I checked by putting the swich in the aggregate, it returns the result, is it possible that the condition cannot be used in the collection? If not, is there any way I can assign the other conditions?
Beta Was this translation helpful? Give feedback.
All reactions