Using the Linq._In method

I am having an issue using this function. The documents shows the example

.Add(Linq._In('Status', [TInvoiceStatus.Approved, TInvoiceStatus.Rejected]))

The array is specified as Values: TArray<Variant>

I have an array (created as required)

MyArray: TArray<Variant>; //the values are all strings

but if I call

TEntityListArgs(FArgs).Criteria.Add(Linq._In('MyField', MyArray));

I get the exception

E2250 There is no overloaded version of '_In' that can be called with these arguments

Any ideas of how to implement this? thanks

Most probably you are having an issue with the first parameter. Instead of 'MyField' do something like Dic.TInvoiceStatus.MyField. Because ._In Expects the first parameter as of type TSimpleProjection, not as a string.

1 Like

Thanks. What I found that worked (at least it compiled :wink:) was the form


1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.