Sebastiaan Naafs - van Dijk
04/19/2024, 11:49 AMsknowlton
04/19/2024, 11:54 AMdataObj.getGroupSetting()[ 'get#local.item()#' ]
the other option would be invoke()miguel-f
04/19/2024, 11:54 AMEvaluate("rc.groupObj.getGroupsetting().get#local.item#()") it would be something like rc.groupObj.getGroupsetting()["get#local.item#()"]Sebastiaan Naafs - van Dijk
04/19/2024, 12:03 PMSebastiaan Naafs - van Dijk
04/19/2024, 12:07 PM#invoke(rc.groupObj.getGroupsetting(), "get#local.item#")# gives me the value I am looking for!
Great, thnx, never thought of working with invoke that way. Usually think of invoke as instantiating an object / CFC and getting the functions from it to use.Sebastiaan Naafs - van Dijk
04/19/2024, 12:09 PM#rc.groupObj.getGroupsetting()["get#local.item#"]()#
Is that weird or do I just not get it why it works with such a notation?Sebastiaan Naafs - van Dijk
04/19/2024, 12:11 PMmiguel-f
04/19/2024, 12:17 PMsknowlton
04/19/2024, 2:33 PMinvoke() used to, at least on ACF, clone the context, which could get expensive. I don't think it still does but also haven't used ACF since 2018. we very rarely have to use invoke() though, bracket notation does it for us when we need dynamic invocation.
good call in having evaluate() be a red flag though