"a" to "agg" in AppService When blocks