4
I often find myself needing to declare a function like

```
local procedure DoSomethingWith(Ints: List of [Integer])
```

...where Ints is, e.g., a list of fields to pass to AddLoadFields(), or a list of Applied Entry Nos, or whatever.

However, for just a small number of (not dynamic) elements, this becomes tedious very quickly, leading to code like

```
var Ints: List of [Integer];
Ints.Add(42);
DoSomethingwith(Ints);
```

and I don't want to have to add single-element overloads just taking an Integer, etc. - because that's more faff and more maintenance.

Could it instead be possible to construct and pass a 'temporary' List or Dictionary directly in the call? rather than having to separately declare and populate it. Then the above would be simply

```
DoSomethingWith( [42] )
```

where `[42]` is your preferred syntax for 'create a list with these elements', and would resolve to List of [Integer] and select the right procedure overload.

Thanks for looking!


Dictionary could be passed something like:

```
DoMoreWith( [ ['Key1', 'Val1'], ['Key2', 'Val2'] ] )
```

```
Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team