Lists the organic groups current user is not a member I want to create a view that lists the groups user is not a member of.
Tried to add the filter criteria -:(author)user:current(no),but it displays the groups user is a member &amp; only filters the  groups manage(created) by user. 
Views-:7.x-3.7
og-:7.x-2.3
You can create a view that lists all groups the current user is not a member of, but you need to develop your own custom Drupal module for it (if anybody knows of a simpler way, please share your knowledge).

The general idea is as follows: Create a view that lists all groups. In your custom module, implement the hook hook_views_query_alter. There, add a condition to the view's query that checks whether the current user is or isn't a member of a group.

You can create the view that lists all groups via the website, or implement it in your custom module as well. For the latter, you can get a rough idea from tutorials like this.

In the database, the memberships are stored in the table og_membership. The field gid refers to the group's node id in the node table. The user who is member of the group is referred as an "Entity". So for each membership, the field entity_type is "user", and etid is the user id. So, a user is a member of a group if there exists a record in og_membership with the user's id in etid, "user" as entity_type and the group's id as gid. The other way around, if a user is not member in a group, such a membership record doesn't exist. In plain SQL, you could say something like (for user id 123)

SELECT n.nid, n.title
FROM node AS n
WHERE NOT EXISTS (
  SELECT *
  FROM og_membership AS m
  WHERE n.id=m.gid AND m.entity_type = "user" AND m.etid = 123
);


In your custom module, you need to add this NOT EXISTS-Condition to the view's query. To do that, you implement the hook hook_views_query_alter. The following is a rough idea of what the implementation should look like:

// the parameters are a reference to the view and the query, respectively
function MY_CUSTOM_MODULE_views_query_alter(&amp;$view, &amp;$query) {

  // get the current user's info from the global scope
  global $user;

  // alter only the query for the correct view, not for every view on the site
  if($view-&gt;name == "MY_VIEWS_NAME" &amp;&amp; $view-&gt;current_display == "MY_CURRENT_DISPLAY") {
    // the subquery to check for memberships
    $member_query = "SELECT * FROM {og_membership} AS m WHERE m.entity_type = 'user' AND m.etid = :uid AND m.gid = node.id";
    // add a new expression to the WHERE part of your view's query
    $query-&gt;add_where_expression("AND", "NOT EXISTS (" . $member_query . ")", array(":uid" =&gt; $user-&gt;uid));
  }
}