Hi,
We wrote below code for dropdown on .jade file
+smDropdown(id=“diptank-attendants” multi=true type=“linked” collection=“Diptanks” item=“Diptank” field=“attendants” itemid=item._id items=attendants keyfield="_id" displayfield=“displayname” value=item.attendants)
NOTE: It uses the Select2 control behind the scenes (https://select2.github.io/), and overrides the data to which the dropdown subscribes to by reading the value of the filter box and only returning the top results from the server.
+smDropdown Attributes getting data from it’s .js file code below on .js file
attendants: function() {
var users = DB.Users.find({ “globalroles.DiptankAttendant”: true }, { sort: { name: 1 }});
return users.fetch();
}
But the output is no record found.
Can you please suggest to get data from db, or we are missing something here ?