This function accepts a list representing a single row from a report and
selects either the value or label for the report columns to turn into a one
row tbl_df
that will usually be bound to the other rows in the report
format_report_row(
x,
labels = TRUE,
guess_types = TRUE,
bind_using_character_cols = FALSE
)
list
; a single element from the rows
element of a fact
map. When the data is in a tabular format, this element usually has the same
length as the number of columns with each element having a label and value
element.
logical
; an indicator of whether the returned data should
be the label (i.e. formatted value) or the actual value. By default, the labels
are returned because these are what appear in the Salesforce dashboard and
more closely align with the column names. For example, "Account.Name" label
may be "Account B"
and the value 0016A0000035mJEQAY
. The former
(label) more accurately reflects the "Account.Name".
logical
; indicating whether or not to use col_guess()
to try and cast the data returned in the recordset. If TRUE
then
col_guess()
is used, if FALSE
then all fields will be returned
as character. This is helpful when col_guess()
will mangle field values
in Salesforce that you'd like to preserve during translation into a tbl_df
,
like numeric looking values that must be preserved as strings ("48.0").
logical
; an indicator of whether to
cast the data to all character columns to ensure that bind_rows
does not fail because two paginated recordsets have differing datatypes for the
same column. Set this to TRUE
rarely, typically only when having this
set to FALSE
returns an error or you want all columns in the data to be
character.
tbl_df
; a single row data frame with the data for the row that
the supplied list represented in the report's fact map.