Skip to content

Commit

Permalink
Merge pull request #103 from jamiewhths/fix-ai-3819
Browse files Browse the repository at this point in the history
AI-3819: Only add parent columns to query if there are fields defined on `parentVarNames`
  • Loading branch information
akbertram authored Oct 28, 2023
2 parents 2b4bcf6 + 9b7f8dd commit 5fb12f9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions R/records.R
Original file line number Diff line number Diff line change
Expand Up @@ -837,13 +837,15 @@ varNames.activityInfoFormTree <- function(x, style = defaultColumnStyle(), addNa
}))
parentVarNames <- parentVarNames[lengths(parentVarNames)!=0]
}

if(identical(style$columnNames, "pretty")) {
parentVarNames <- paste("Parent", parentVarNames, sep = " ")
} else {
parentVarNames <- paste("@parent", parentVarNames, sep = ".")

if (!is.null(parentVarNames)) {
if(identical(style$columnNames, "pretty")) {
parentVarNames <- paste("Parent", parentVarNames, sep = " ")
} else {
parentVarNames <- paste("@parent", parentVarNames, sep = ".")
}
}

vrNames <- c(vrNames, "@parent", parentVarNames)
}
if (style$recordId) vrNames[length(vrNames)+1] <- "_id"
Expand Down

0 comments on commit 5fb12f9

Please sign in to comment.