Json combined search action

QuestionsJson combined search action
Peter Broekman asked 5 years ago

Hi how would I make a Json combined And OR statement. Like to search om year = 2018 AND datatype is Budget OR Forecast, below fails and all other stuff I tried 🙂

$sarr = <<< SEARCH_JSON
{
“groupOp”:”And”,
“rules”:
[
{“field”:”FCYear”,”op”:”eq”,”data”:”{$defaultyear}”},
{“field”:”Datatype”,”op”:”eq”,”data”:”Forecast” ||
“field”:”Datatype”,”op”:”eq”,”data”:”Budget”}
]

}

2 Answers
Abu Ghufran Staff answered 5 years ago

Search JSON for complex conditions, demo code here:

https://gist.github.com/gridphp/9122f2727d6b60fdf33ee75a11404036

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Peter Broekman answered 5 years ago

Thanks, works like a charm!!! Highly appreciated

Your Answer

16 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?