Error Evaluating UI Expression Expression evaluation error at function rule!VFM_VehicleReportinterface: Rule 'vfm_vehiclereportinterface' has 1 parameters, but instead passed 0 parameters.

Hello,

I have created a pie chart and a Grid i two separate interfaces. Now I have taken a new interface and I have designed two sections one for Pie chart and another for Grid. But while creating a report and opening it throws an error - "Error Evaluating UI Expression
Expression evaluation error at function rule!VFM_VehicleReportinterface: Rule 'vfm_vehiclereportinterface' has 1 parameters, but instead passed 0 parameters."

I have also checked in 'vfm_vehiclereportinterface' but couldn't make out the parameters, Thus I request a help. 

  Discussion posts and replies are publicly visible

  • Please check the Rule Inputs in VFM_vehicleReportInterface - likely there is one rule input in that rule, and when you call it, you've passed in 0 parameters. If you want the rule input to be null on load, you can define the parameter and just have "rule!VFM_VehicleReportInterface(ruleInput: null)" which should solve your issue.

  • Hello Ashvin,

    Yes there is no input rule for this, as the both are graphs how can I use an input rule? The below is the code what i have written for the combination of two interfaces, though I couldn't find the rule input in it. Can you please help where in the code shall I make the change to over come the error.

    =a!formLayout(
    label: "Report",
    instructions: "",
    contents: {
    a!sectionLayout(
    label: "Pie Chart ",
    contents: {load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: -1,
    sort: a!sortInfo(
    field: "make",
    ascending: true
    )
    ),
    with(
    local!datasubset: queryrecord(
    cons!VFM_ReportBuilder,
    a!query(
    aggregation: a!queryAggregation(aggregationColumns: {
    a!queryAggregationColumn(field: "make", aggregationFunction: "COUNT"),
    a!queryAggregationColumn(field: "model", isGrouping: true),
    a!queryAggregationColumn(field: "licenseplate", isGrouping: true),
    a!queryAggregationColumn(field: "category", aggregationFunction: "COUNT"),
    }),
    pagingInfo: local!pagingInfo
    )
    ),
    a!pieChartField(
    label: "Display vehicle Information",
    series: {
    a!forEach(
    items: local!datasubset,
    expression: a!chartSeries(
    label: index(fv!item, "make", null),
    data: index(fv!item, "make", null)
    )
    )
    }
    )
    )
    )
    }
    ),
    a!sectionLayout(
    label: "Grid layout",
    contents: {load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 20,
    sort: a!sortInfo(
    field: "make",
    ascending: true
    )
    ),
    with(
    local!datasubset: queryrecord(
    cons!VFM_ReportBuilder,
    a!query(
    selection: a!querySelection(columns: {
    a!queryColumn(field: "make"),
    a!queryColumn(field: "model"),
    a!queryColumn(field: "licenseplate"),
    a!queryColumn(field: "category"),
    }),
    pagingInfo: local!pagingInfo
    )
    ),
    a!gridField(
    totalCount: local!datasubset.totalCount,
    columns: {
    a!gridTextColumn(
    label: "make of Vehicle",
    field: "make",
    data: index(local!datasubset.data, "make", null)
    ),
    a!gridTextColumn(
    label: "model of Vehicle",
    field: "model",
    data: index(local!datasubset.data, "model", null)
    ),
    a!gridTextColumn(
    label: "licenseplate",
    field: "licenseplate",
    data: index(local!datasubset.data, "licenseplate", null)
    ),
    a!gridTextColumn(
    label: "category of Vehicle",
    field: "category",
    data: index(local!datasubset.data, "category", null)
    )
    },
    value: local!pagingInfo,
    saveInto: local!pagingInfo
    )
    )
    )
    }
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {},
    secondaryButtons: {}
    ),
    validations: {}
    )
  • Hi Nellorea,
    I have understood your error, may be you have rule inputs in vfm_vehicleReportinterface() interface but didn't pass parameters when calling the vfm_vehicleReportinterface() interface that's the reason you getting an error on "Error Evaluating UI Expression
    Expression evaluation error at function rule!VFM_VehicleReportinterface: Rule 'vfm_vehiclereportinterface' has 1 parameter, but instead passed 0 parameters.". If you don't want ruleinpts parameter then delete the rule inputs directly.
    if you want to pass the parameters then call the interface as rule!VFM_VehicleReportinterface(ri!ruleinputs). without parameters rule!VFM_VehicleReportinterface().
  • Hi,

    I think you have a rule input in your interface vfm_vehiclereportinterface, but you are not passing that to the main rule where you are calling vfm_vehiclereportinterface rule. Pass the rule inputs to main rule which are present in vfm_vehiclereportinterface.
  • Hi Devi,
    I have deleted all the rule inputs directly and this worked. Thank You..!!