function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dev_AryaDev_Arya 

How to implement Community > Manage Audience based on field criteria (UI does not have NOT equal to operator) using APIs?

Hi, We have a requirement related to Manage Audience for our Partner community (This question here is a follow up of the same question I posted on success community, seeking developers approach). The page variation should be based on users profile and country, for example, if user's profile is 'abc' and user's account country IS NOT 'Germany', only then the page should be visible. I have done profile restriction, and under Profile selection, one could choose user's  account country picklist field but enter criteria does not show  'construct a formula' panel, one cannot formulate it unlike other places. Hence I put couple of combinations like :<>'Germany' ; <>"Germany" ; != "Germany" ; != 'Germany', (also tried with the abbreviation for the country i.e 'de'). But it is not working. 
Attached screenshot for the reference.
User-added image
 
From the success community I got the answe saying not possible from UI:
"The only operator that is being supported for user field is EQUALS, we do not currently support Not EQUAL or any other operators that you may see in other places. It is something we are planning to do in the future." - Ismail Kacini

So now I am looking for developer side answers in case anyone has achieved this.
Any suggestion will be highly appreciated. Thanks.

Cheers,Dev
Best Answer chosen by Dev_Arya
Dev_AryaDev_Arya
In case someone else also got stuck with the same issue.

I found the answer, we can create a formulae field based on the value of the country. And we can check the user field condition based on that formulae field. Its a work around but it works.

Cheers, Dev