Forum Discussion

rbitente's avatar
rbitente
New Member
7 years ago
Solved

DataSource.Error: Query is either selecting too many fields or the filter conditions

Hello Guys !   I am facing the folling problem to retrieve the objetic list from Salesforce   DataSource.Error: Query is either selecting too many fields or the filter conditions are too complica...
  • Stachu's avatar
    Stachu
    7 years ago

     

    let
    Fonte = Salesforce.Data(),
    Payroll_element__c = Fonte{0}[Data]
    in
    Payroll_element__c

    the highlighted in red part means that you drill down to the first row of the column Data - and that's not what you want correct?


    if Table.ColumnNames worsk for you, then you can try something like this:

     

    let
        Fonte = Salesforce.Data()
        ColumnsToBeSelected = Table.FromList(Table.ColumnNames(Fonte)),
        FilterColumns = Table.SelectRows(ColumnsToBeSelected, each ([Column1] = "Data")),
        FilteredColumnsAsList = FilterColumns[Column1],
        Custom1 = Table.SelectColumns(Fonte, FilteredColumnsAsList)
    in
        Custom1

    assuming that Table.ColumnNames returns a list of columns from your Salesforce dataset, you could then filter the relevant columns only when selecting the FilterColumns step