= load( with( local!matches: where( apply( search( ri!filter, _ ), ri!labels ) ), if( ( /* no values found */ length( local!matches ) = 0 ), /* ADDED THE CASE OF NOT FOUND */ 'type!{http://www.appian.com/ae/types/2009}DataSubset'( data: { "RESULT NOT FOUND" }, identifiers: { -1 /* should be better define here a constant like the following: * cons!valueFor_RESULT_NOT_FOUND */ } ), 'type!{http://www.appian.com/ae/types/2009}DataSubset'( data: index( ri!labels, local!matches ), identifiers: index( ri!identifiers, local!matches ) ) ) ) )