var title = "Test"; 
        	var content = "test";
        	
        	var communityService = new CommunityService(); 
            var community = communityService.newCommunity();
            community.setTitle(title);
            community.setContent(content);	
            //community.setTags(tags);
          
            // Create the community
            communityService.createCommunity(community).then(  
            		function(community) { 
            			console.log("Community " + community);
                        community.load().then(
                            function(community) { 
                            	// Get community ID
                                var communityUuid = community.getCommunityUuid();
                                
                                results.push({data : data || "<empty>"});
                                //dom.setText("json", json.jsonBeanStringify(results));
                                var res =  data.viewentry;
                                for(var x in res){ 
    	                            var memberId = res[x].entrydata[1].text[0];
                                	console.log(" " + memberId);
                                	communityService.addMember( communityUuid, memberId, {});
                                    
                                }
                            	
                                // Add community members
                                for (var i = 0; i < searchBox.members.length; i++) {
                                	var member = searchBox.members[i];
                                }
                               
                            },
                            function(error) {
                                alert(error);
                            }
                        );
                    },
                    function(error) {
                        handleError(dom, error);
                    }
                );