I am trying to pass a dataset variable to display a specific category. Inside the filterFunc I have the following code which does not seem to work:
// Search by category
_global._filter = “username”;
var _category:String = String(item._global._filter);
var _categoryID:Number = _category.indexOf(“true”);
if (_categoryID != -1) {
return true;
} return false;
This does not work, but if I use the following code, it will work fine:
var _category:String = String(item.username);
var _categoryID:Number = _category.indexOf(“true”);
if (_categoryID != -1) {
return true;
} return false;
I am assuming I have to transform the string to an object, similar to how you access a button, but cannot get the syntax right. For example, to access a button (id) from a variable you use:
var my_btn = Eval(_name + "_btn");
// Based on the onPress Event, fire the search term
my_btn.onPress = function(evt:Object) {
// Add functionality here
}
Any help would be appreciated, thanks in advance