AnsweredAssumed Answered

Finding AF Notification by Category?

Question asked by gnmazero on Jun 27, 2016
Latest reply on Jun 28, 2016 by gnmazero

Is there a way of finding all AF Notifications in a certain Notification Category? Currently our workflow is to find all of the AF Notifications, get their name to find their AF Element counterpart and find whether or not they are in a certain Element Category. Here's a code snippet :

        private static List<string> FindElementNamesByCategory(string categoryName, AFDatabase afDB)
        {
            AFCategory afCategory = new AFCategory(categoryName);
            var afElements = AFElement.FindElementsByCategory(afDB, null, afCategory, true, AFSortField.Name, AFSortOrder.Ascending, 100);
            List<string> piTagNames = new List<string>();
            foreach (AFElement element in afElements)
            {
                piTagNames.Add(element.Name);
            }
            return piTagNames;
        }

 

Instead of doing it this way we want to find all AF Notifications by Notification Category, shown in the picture below.

Notification Category.jpg

Outcomes