Hello. I am trying to filter out json objects from an array. The goal is to:
1. Allow through the filter anyone whose job title is null.
2. Block anyone whose job title contains 'Director' or 'Manager'
3. Allow all remaining
I tried the following, but its not quite right and all objects seems to pass though.
@OR(equals(item()?['JobTitle'], null), or(not(contains(item()?['JobTitle'], 'Manager')), not(contains(item()?['JobTitle'], 'Director'))))
The data is formatted as:
[
Thanks in advance.
-e
Solved! Go to Solution.
Please use the below expression:
@and(not(contains(item()?['JobTitle'], 'Director')),not(contains(item()?['JobTitle'], 'Manager')))
Very close.
See below.
@OR(equals(item()?['JobTitle'], null), and(not(contains(item()?['JobTitle'], 'Director')),not(contains(item()?['JobTitle'], 'Manager'))))
Please use the below expression:
@and(not(contains(item()?['JobTitle'], 'Director')),not(contains(item()?['JobTitle'], 'Manager')))
Will this cover the null check? Seems to still be an issue.
Very close.
See below.
@OR(equals(item()?['JobTitle'], null), and(not(contains(item()?['JobTitle'], 'Director')),not(contains(item()?['JobTitle'], 'Manager'))))
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
12 | |
9 | |
7 | |
7 | |
7 |
User | Count |
---|---|
19 | |
18 | |
17 | |
10 | |
7 |