Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Any-Operator on List-Types #598

Open
Steinliiippp opened this issue Mar 28, 2024 · 1 comment
Open

Support for Any-Operator on List-Types #598

Steinliiippp opened this issue Mar 28, 2024 · 1 comment

Comments

@Steinliiippp
Copy link

Are there any plans to support access to properties on Lists like resource.Users.Name? Currently you get the exception "No property or field 'Name' exists in type 'List`1'". Which directs me to the problem, that the MemberExpression builder does not note the List-Type and tries to just build the expression just as usually.

At this point we would need an interception to the Any-Method and then build the nested (Sub)Expression for the generic type of the list. Afterwards it needs to be set as expression to the Any-Method call of the List (Users).

Are there any plans to support this? Maybe for the first level or even for nested lists with chained Any-Method-Calls?

@sebastianwhiffen
Copy link

sebastianwhiffen commented Apr 10, 2024

I am also interested in this, currently getting this error

{
"rule": {
"ruleName": "SecurityValidation",
"properties": null,
"operator": null,
"errorMessage": "Error message",
"enabled": true,
"ruleExpressionType": 0,
"workflowsToInject": null,
"rules": null,
"localParams": null,
"expression": "securities.Any(security => security.objId == 2576460 )",
"actions": null,
"successEvent": "Success event"
},
"isSuccess": false,
"childResults": null,
"inputs": {
"JsonElement": {
"securities": [
{
"loanId": "M305666",
"objId": 2576460,
//theres more
}
],
"needVehicleInspection": false
}
},
"actionResult": {
"output": null,
"exception": null
},
"exceptionMessage": "Exception while parsing expression securities.Any(security => security.objId == 2576460) - ')' or ',' expected"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants