The popIntention() method gets the specified intention, intentionName , constrained by the optional secondArgKey parameter. The retrieved intention is removed from the intentions list.
intention = popIntention( intentionName , secondArgKey )
|
intentionName |
String |
Name of intention to be retrieved and removed from list. |
|
secondArgKey |
String |
(Optional) Secondary key that must be present as an argument of the intentionName for the reference to be removed and returned. |
|
Object |
Requested intention. |
var context = this.getContext();var search = context.get('search');
if (search.getIntentionReference('setfields')) {
search.popIntention('setfields');
}