Grid with filter?

Hi, I am trying to make a grid with filter above. I wrote this SAIL:
= load(
local!BUfilter,
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: - 1,
sort: {
field: "InvestmentMain.InvID",
ascending: false
}
),
with(
local!datasubset: if(
isnull(
local!BUfilter
),
rule!getAllInvestments(
local!pagingInfo
),
rule!getInvestmentByBU(
local!BUfilter,
local!pagingInfo
)
),
a!dashboardLayout(
firstColumnContents: {
a!textField(
label: "Filter by Bu",
value: local!BUfilter,
saveInto: local!BUfilter,
refreshAfter: "KEYPRESS"
),
a!gridField(
totalCount: local!datasubset.totalCount,
columns: {
a!gridTextColumn(
label: "ID",
data: local!datasubset.data.InvestmentMain.InvID,
field: "InvestmentMain.InvID...

OriginalPostID-97336

OriginalPostID-97336

  Discussion posts and replies are publicly visible

Parents
  • ...",
    links: apply(
    a!recordLink(
    recordType: cons!INVESTMENT_RECORD,
    identifier: _
    ),
    local!datasubset.identifiers
    )
    ),
    a!gridTextColumn(
    label: "Business Unit",
    data: local!datasubset.data.InvestmentMain.BusinessUnit,
    alignment: "RIGHT",
    field: "InvestmentMain.BusinessUnit"
    )
    },
    value: local!pagingInfo,
    saveInto: local!pagingInfo
    )
    }
    )
    )
    )

    The result is that I see the grid but when I write on the Filter field I get this error: "Expression evaluation error in rule 'getinvestmentbybu' (called by rule 'investmentsgrid'): Error evaluating function 'queryruleexec' : Rule [getInvestmentByBU]: The data type [{http://www.pirelli.com/Investment/appian}InvestmentMain] does not have a field with the name [InvestmentMain]".

    Rul...
Reply
  • ...",
    links: apply(
    a!recordLink(
    recordType: cons!INVESTMENT_RECORD,
    identifier: _
    ),
    local!datasubset.identifiers
    )
    ),
    a!gridTextColumn(
    label: "Business Unit",
    data: local!datasubset.data.InvestmentMain.BusinessUnit,
    alignment: "RIGHT",
    field: "InvestmentMain.BusinessUnit"
    )
    },
    value: local!pagingInfo,
    saveInto: local!pagingInfo
    )
    }
    )
    )
    )

    The result is that I see the grid but when I write on the Filter field I get this error: "Expression evaluation error in rule 'getinvestmentbybu' (called by rule 'investmentsgrid'): Error evaluating function 'queryruleexec' : Rule [getInvestmentByBU]: The data type [{http://www.pirelli.com/Investment/appian}InvestmentMain] does not have a field with the name [InvestmentMain]".

    Rul...
Children
No Data