Extend validateSettings() to cover field/column mappings where setting_type=="vector" (which are currently being ignored).
Easy enough to brute force it was a loop (like the one below), but maybe there's a more elegant way?
checkMultipleFieldSettings <- function(fieldKey, settings, data){
stopifnot(typeof(fieldKey)=="list", typeof(settings)=="list")
allValues <- getSettingValue(key=fieldCheck$key,settings=settings)
stopifnot(typeof(allValues)=="list")
allKeys<-list()
for(i in 1:length(allValues)){
newFieldKey<-fieldKey
newFieldKey[[length(fieldKey)+1]]<-i
allKeys[[i]]<-newfieldKey
}
checks <-allKeys %>% purrr::map(checkFieldSettings, settings=settings, data=data)
return(checks)
}
Extend
validateSettings()to cover field/column mappings wheresetting_type=="vector"(which are currently being ignored).Easy enough to brute force it was a loop (like the one below), but maybe there's a more elegant way?